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
readerJsonReaderThe Newtonsoft.Json.JsonReader to read from.
objectTypeTypeType of the object.
existingValueDictionary<string, TimerMetadata>The existing value of object being read.
hasExistingValueboolThe existing value has a value.
serializerJsonSerializerThe 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
writerJsonWriterThe Newtonsoft.Json.JsonWriter to write to.
valueDictionary<string, TimerMetadata>The timer handler dictionary.
serializerJsonSerializerThe calling serializer.