Click or drag to resize

WikiDateTimeOffsetConverter Class

This is preliminary documentation and is subject to change.

Handles the conversion between MediaWiki API timestamp and its CLR counterparts. This specific class handles the timestamp represented by DateTimeOffset.
Inheritance Hierarchy
SystemObject
  System.Text.Json.SerializationJsonConverter
    System.Text.Json.SerializationJsonConverterDateTimeOffset
      WikiClientLibrary.InfrastructuresWikiDateTimeOffsetConverter

Namespace: WikiClientLibrary.Infrastructures
Assembly: WikiClientLibrary (in WikiClientLibrary.dll) Version: 0.9.0-int.2+447d1d590e6726b7881f750a0a0e42908f3e417e
Syntax
public class WikiDateTimeOffsetConverter : JsonConverter<DateTimeOffset>

The WikiDateTimeOffsetConverter type exposes the following members.

Constructors
 NameDescription
Public methodWikiDateTimeOffsetConverterInitializes a new instance of the WikiDateTimeOffsetConverter class
Top
Properties
 NameDescription
Public propertyHandleNullGets a value that indicates whether should be passed to the converter on serialization, and whether Null should be passed on deserialization.
(Inherited from JsonConverterDateTimeOffset)
Public propertyTypeGets the type being converted by the current converter instance.
(Inherited from JsonConverterDateTimeOffset)
Top
Methods
 NameDescription
Public methodCanConvertDetermines whether the specified type can be converted.
(Inherited from JsonConverterDateTimeOffset)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodReadReads and converts the JSON to type T.
(Overrides JsonConverterTRead(Utf8JsonReader, Type, JsonSerializerOptions))
Public methodReadAsPropertyNameReads a dictionary key from a JSON property name.
(Inherited from JsonConverterDateTimeOffset)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodWriteWrites a specified value as JSON.
(Overrides JsonConverterTWrite(Utf8JsonWriter, T, JsonSerializerOptions))
Public methodWriteAsPropertyNameWrites a dictionary key as a JSON property name.
(Inherited from JsonConverterDateTimeOffset)
Top
Remarks

This converter uses ISO 8601 format to serialize the timestamp, and uses "infinity" for and .

This converter uses and to parse the timestamp. See their documentation respectively for more behavioral information.

See Also