Class DelegateSerializationConverter
- Namespace
- Scaleout.Streaming.DigitalTwin.Core
- Assembly
- ScaleOut.Streaming.DigitalTwin.Core.dll
Serializes a dictionary of user defined timer handlers/delegates.
public class DelegateSerializationConverter : JsonConverter<Dictionary<string, TimerMetadata>>
- Inheritance
-
JsonConverterDelegateSerializationConverter
- Inherited Members
-
JsonConverter<Dictionary<string, TimerMetadata>>.WriteJson(JsonWriter, Dictionary<string, TimerMetadata>, JsonSerializer)JsonConverter.CanReadJsonConverter.CanWrite
Methods
ReadJson(JsonReader, Type, Dictionary<string, TimerMetadata>, bool, JsonSerializer)
Reads serialized JSON stream that represents a dictionary of user defined timer delegates and deserializes it to a live dictionary with deserialized timer delegates.
public override Dictionary<string, TimerMetadata> ReadJson(JsonReader reader, Type objectType, Dictionary<string, TimerMetadata> existingValue, bool hasExistingValue, JsonSerializer serializer)
Parameters
reader
JsonReaderThe Newtonsoft.Json.JsonReader to read from.
objectType
TypeType of the object.
existingValue
Dictionary<string, TimerMetadata>The existing value of object being read.
hasExistingValue
boolThe existing value has a value.
serializer
JsonSerializerThe calling serializer.
Returns
- Dictionary<string, TimerMetadata>
Deserialized dictionary of the user defined timer delegates.
WriteJson(JsonWriter, Dictionary<string, TimerMetadata>, JsonSerializer)
Writes the JSON representation of the digital twin internal dictionary that might contain user defined timer delegates.
public override void WriteJson(JsonWriter writer, Dictionary<string, TimerMetadata> value, JsonSerializer serializer)
Parameters
writer
JsonWriterThe Newtonsoft.Json.JsonWriter to write to.
value
Dictionary<string, TimerMetadata>The timer handler dictionary.
serializer
JsonSerializerThe calling serializer.