Class Point2DConverter
- Namespace
- Moongate.UO.Data.Json.Converters
- Assembly
- Moongate.UO.Data.dll
Represents Point2DConverter.
public class Point2DConverter : JsonConverter<Point2D>
- Inheritance
-
Point2DConverter
- Inherited Members
Methods
Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Reads and converts the JSON to type Point2D.
public override Point2D Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
readerUtf8JsonReaderThe reader.
typeToConvertTypeThe type to convert.
optionsJsonSerializerOptionsAn object that specifies serialization options to use.
Returns
- Point2D
The converted value.
ReadAsPropertyName(ref Utf8JsonReader, Type, JsonSerializerOptions)
Read Point2D from JSON property name (dictionary key)
public override Point2D ReadAsPropertyName(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
readerUtf8JsonReadertypeToConvertTypeoptionsJsonSerializerOptions
Returns
Write(Utf8JsonWriter, Point2D, JsonSerializerOptions)
Writes a specified value as JSON.
public override void Write(Utf8JsonWriter writer, Point2D value, JsonSerializerOptions options)
Parameters
writerUtf8JsonWriterThe writer to write to.
valuePoint2DThe value to convert to JSON.
optionsJsonSerializerOptionsAn object that specifies serialization options to use.
WriteAsPropertyName(Utf8JsonWriter, Point2D, JsonSerializerOptions)
Write Point2D as JSON property name (dictionary key)
public override void WriteAsPropertyName(Utf8JsonWriter writer, Point2D value, JsonSerializerOptions options)
Parameters
writerUtf8JsonWritervaluePoint2DoptionsJsonSerializerOptions