Table of Contents

Class SafeStringEnumConverter<T>

Namespace
NetCord.JsonConverters
Assembly
NetCord.dll
public class SafeStringEnumConverter<T> : JsonConverter<T> where T : struct, Enum

Type Parameters

T
Inheritance
SafeStringEnumConverter<T>
Inherited Members

Constructors

SafeStringEnumConverter()

public SafeStringEnumConverter()

Methods

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

public override T Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

Parameters

reader Utf8JsonReader
typeToConvert Type
options JsonSerializerOptions

Returns

T

ReadAsPropertyName(ref Utf8JsonReader, Type, JsonSerializerOptions)

public override T ReadAsPropertyName(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

Parameters

reader Utf8JsonReader
typeToConvert Type
options JsonSerializerOptions

Returns

T

Write(Utf8JsonWriter, T, JsonSerializerOptions)

public override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options)

Parameters

writer Utf8JsonWriter
value T
options JsonSerializerOptions

WriteAsPropertyName(Utf8JsonWriter, T, JsonSerializerOptions)

public override void WriteAsPropertyName(Utf8JsonWriter writer, T value, JsonSerializerOptions options)

Parameters

writer Utf8JsonWriter
value T
options JsonSerializerOptions