Class Warning
- Namespace
- Uncreated.Warfare.Moderation.Punishments
- Assembly
- Uncreated.Warfare.dll
[JsonConverter(typeof(ModerationEntryConverter))]
public class Warning : Punishment, IModerationEntry
- Inheritance
-
Warning
- Implements
- Inherited Members
Properties
DisplayedTimestamp
The timestamp the player actually sees the warning. This is for when a player is warned while they're offline.
[JsonPropertyName("displayed_utc")]
public DateTimeOffset? DisplayedTimestamp { get; set; }
Property Value
HasBeenDisplayed
false until the player actually sees the warning. This is for when a player is warned while they're offline.
[JsonIgnore]
public bool HasBeenDisplayed { get; }
Property Value
Remarks
Always false for legacy Warnings.
Methods
AddExtraInfo(DatabaseInterface, List<string>, IFormatProvider, CancellationToken)
public override Task AddExtraInfo(DatabaseInterface db, List<string> workingList, IFormatProvider formatter, CancellationToken token = default)
Parameters
dbDatabaseInterfaceworkingListList<string>formatterIFormatProvidertokenCancellationToken
Returns
GetDisplayName()
public override string GetDisplayName()
Returns
ReadProperty(ref Utf8JsonReader, string, JsonSerializerOptions)
public override bool ReadProperty(ref Utf8JsonReader reader, string propertyName, JsonSerializerOptions options)
Parameters
readerUtf8JsonReaderpropertyNamestringoptionsJsonSerializerOptions
Returns
Write(Utf8JsonWriter, JsonSerializerOptions)
public override void Write(Utf8JsonWriter writer, JsonSerializerOptions options)
Parameters
writerUtf8JsonWriteroptionsJsonSerializerOptions