Class EventSourceIdJsonConverter<T>
- Namespace
- Cratis.Chronicle.Events
- Assembly
- Cratis.Chronicle.dll
Represents a JsonConverter<T> for EventSourceId<T> that serializes the typed value as a plain string for wire compatibility with EventSourceId.
public class EventSourceIdJsonConverter<T> : JsonConverter<EventSourceId<T>> where T : IComparable
Type Parameters
TThe underlying type wrapped by EventSourceId<T>.
- Inheritance
-
EventSourceIdJsonConverter<T>
- Inherited Members
- Extension Methods
Constructors
EventSourceIdJsonConverter()
public EventSourceIdJsonConverter()
Methods
Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
public override EventSourceId<T>? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
readerUtf8JsonReadertypeToConvertTypeoptionsJsonSerializerOptions
Returns
Write(Utf8JsonWriter, EventSourceId<T>, JsonSerializerOptions)
public override void Write(Utf8JsonWriter writer, EventSourceId<T> value, JsonSerializerOptions options)
Parameters
writerUtf8JsonWritervalueEventSourceId<T>optionsJsonSerializerOptions