Skip to content

EventSequenceTokenJsonConverter Methods

A System.Text.Json.Serialization.JsonConverter for EventSequenceToken and EventSequenceTokenV2 types.

CanConvert(Type)

override
View source
public override bool CanConvert(Type typeToConvert)
Determines whether the specified type can be converted.

Parameters

typeToConvertType
The type to compare against.

Returns

true if the type can be converted; otherwise, false.

Read(Utf8JsonReader, Type, JsonSerializerOptions)

override
View source
public override StreamSequenceToken? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Reads and converts the JSON to type T.

Parameters

readerUtf8JsonReader
The reader.
typeToConvertType
The type to convert.
optionsJsonSerializerOptions
An object that specifies serialization options to use.

Returns

The converted value.

Write(Utf8JsonWriter, StreamSequenceToken, JsonSerializerOptions)

override
View source
public override void Write(Utf8JsonWriter writer, StreamSequenceToken value, JsonSerializerOptions options)
Writes a specified value as JSON.

Parameters

writerUtf8JsonWriter
The writer to write to.
valueStreamSequenceToken
The value to convert to JSON.
optionsJsonSerializerOptions
An object that specifies serialization options to use.