BlueprintIdConverter
Namespace: Meshmakers.Octo.ConstructionKit.Contracts.BlueprintCatalogs.Serialization
Converter for System.Text.Json and YamlDotNet for BlueprintId
public class BlueprintIdConverter : JsonConverter<BlueprintId>, IYamlTypeConverter
Inheritance Object → JsonConverter → JsonConverter<BlueprintId> → BlueprintIdConverter
Implements IYamlTypeConverter
Properties
HandleNull
public bool HandleNull { get; }
Property Value
Type
public Type Type { get; }
Property Value
Constructors
BlueprintIdConverter()
public BlueprintIdConverter()
Methods
Accepts(Type)
public bool Accepts(Type type)
Parameters
type Type
Returns
ReadYaml(IParser, Type, ObjectDeserializer)
public object ReadYaml(IParser parser, Type type, ObjectDeserializer rootDeserializer)
Parameters
parser IParser
type Type
rootDeserializer ObjectDeserializer
Returns
WriteYaml(IEmitter, Object, Type, ObjectSerializer)
public void WriteYaml(IEmitter emitter, object value, Type type, ObjectSerializer rootSerializer)
Parameters
emitter IEmitter
value Object
type Type
rootSerializer ObjectSerializer
Read(out Utf8JsonReader, Type, JsonSerializerOptions)
public BlueprintId Read(out Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
reader Utf8JsonReader
typeToConvert Type
options JsonSerializerOptions
Returns
Write(Utf8JsonWriter, BlueprintId, JsonSerializerOptions)
public void Write(Utf8JsonWriter writer, BlueprintId value, JsonSerializerOptions options)
Parameters
writer Utf8JsonWriter
value BlueprintId
options JsonSerializerOptions
ReadAsPropertyName(out Utf8JsonReader, Type, JsonSerializerOptions)
public BlueprintId ReadAsPropertyName(out Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
reader Utf8JsonReader
typeToConvert Type
options JsonSerializerOptions
Returns
WriteAsPropertyName(Utf8JsonWriter, BlueprintId, JsonSerializerOptions)
public void WriteAsPropertyName(Utf8JsonWriter writer, BlueprintId value, JsonSerializerOptions options)
Parameters
writer Utf8JsonWriter
value BlueprintId
options JsonSerializerOptions