Zum Hauptinhalt springen

CkIdListConverter<TKey>

Namespace: Meshmakers.Octo.ConstructionKit.Contracts.Serialization

System.Text.Json converter for a list of CkId<TElementId> that serializes every element as its full-name string (same shape as CkIdConverter<TKey>).

public class CkIdListConverter<TKey> : JsonConverter<List<CkId<TKey>>>

Type Parameters​

TKey

Inheritance Object → JsonConverter → JsonConverter<List<CkId<TKey>>> → CkIdListConverter<TKey>

Properties​

HandleNull​

public bool HandleNull { get; }

Property Value​

Boolean

Type​

public Type Type { get; }

Property Value​

Type

Constructors​

CkIdListConverter()​

public CkIdListConverter()

Methods​

Read(out Utf8JsonReader, Type, JsonSerializerOptions)​

public List<CkId<TKey>> Read(out Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

Parameters​

reader Utf8JsonReader

typeToConvert Type

options JsonSerializerOptions

Returns​

List<CkId<TKey>>

Write(Utf8JsonWriter, List<CkId<TKey>>, JsonSerializerOptions)​

public void Write(Utf8JsonWriter writer, List<CkId<TKey>> value, JsonSerializerOptions options)

Parameters​

writer Utf8JsonWriter

value List<CkId<TKey>>

options JsonSerializerOptions