ColorHexJsonConverter 类
- 程序集
- ClassIsland.Core.dll
适用于 Avalonia.Media.Color 的值转换器。
public class ColorHexJsonConverter : JsonConverter<Color>
- 继承
-
JsonConverter<Color>ColorHexJsonConverter
- 继承成员
方法
Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Reads and converts the JSON to type Avalonia.Media.Color.
public override Color Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
参数
readerUtf8JsonReaderThe reader.
typeToConvertTypeThe type to convert.
optionsJsonSerializerOptionsAn object that specifies serialization options to use.
返回
- Color
The converted value.
Write(Utf8JsonWriter, Color, JsonSerializerOptions)
Writes a specified value as JSON.
public override void Write(Utf8JsonWriter writer, Color value, JsonSerializerOptions options)
参数
writerUtf8JsonWriterThe writer to write to.
valueColorThe value to convert to JSON.
optionsJsonSerializerOptionsAn object that specifies serialization options to use.