Table of Contents

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
JsonConverter
DelegateSerializationConverter
Inherited Members
JsonConverter<Dictionary<string, TimerMetadata>>.WriteJson(JsonWriter, Dictionary<string, TimerMetadata>, JsonSerializer)
JsonConverter.CanRead
JsonConverter.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 JsonReader

The Newtonsoft.Json.JsonReader to read from.

objectType Type

Type of the object.

existingValue Dictionary<string, TimerMetadata>

The existing value of object being read.

hasExistingValue bool

The existing value has a value.

serializer JsonSerializer

The 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 JsonWriter

The Newtonsoft.Json.JsonWriter to write to.

value Dictionary<string, TimerMetadata>

The timer handler dictionary.

serializer JsonSerializer

The calling serializer.