Class AnalogSensorTypeConverter
Class to convert an AnalogSensorType to and from JSON
Inheritance
System.Object
System.Text.Json.Serialization.JsonConverter
System.Text.Json.Serialization.JsonConverter<AnalogSensorType>
AnalogSensorTypeConverter
Inherited Members
System.Text.Json.Serialization.JsonConverter<DuetAPI.Machine.AnalogSensorType>.CanConvert(System.Type)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: DuetAPI.Machine
Assembly: DuetAPI.dll
Syntax
public class AnalogSensorTypeConverter : JsonConverter<AnalogSensorType>
Methods
Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Read an AnalogSensorType from JSON
Declaration
public override AnalogSensorType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.Text.Json.Utf8JsonReader | reader | JSON reader |
System.Type | typeToConvert | Type to convert |
System.Text.Json.JsonSerializerOptions | options | Serializer options |
Returns
Type | Description |
---|---|
AnalogSensorType | Read value |
Overrides
System.Text.Json.Serialization.JsonConverter<DuetAPI.Machine.AnalogSensorType>.Read(System.Text.Json.Utf8JsonReader, System.Type, System.Text.Json.JsonSerializerOptions)
Write(Utf8JsonWriter, AnalogSensorType, JsonSerializerOptions)
Write an AnalogSensorType to JSON
Declaration
public override void Write(Utf8JsonWriter writer, AnalogSensorType value, JsonSerializerOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.Text.Json.Utf8JsonWriter | writer | JSON writer |
AnalogSensorType | value | Value to serialize |
System.Text.Json.JsonSerializerOptions | options | Write options |
Overrides
System.Text.Json.Serialization.JsonConverter<DuetAPI.Machine.AnalogSensorType>.Write(System.Text.Json.Utf8JsonWriter, DuetAPI.Machine.AnalogSensorType, System.Text.Json.JsonSerializerOptions)