Show / Hide Table of Contents

Class PayrollValueConverter

JSON converter for PayrollValue

Inheritance
object
JsonConverter
JsonConverter<PayrollValue>
PayrollValueConverter
Inherited Members
JsonConverter<PayrollValue>.CanConvert(Type)
JsonConverter<PayrollValue>.ReadAsPropertyName(ref Utf8JsonReader, Type, JsonSerializerOptions)
JsonConverter<PayrollValue>.WriteAsPropertyName(Utf8JsonWriter, PayrollValue, JsonSerializerOptions)
JsonConverter<PayrollValue>.HandleNull
JsonConverter<PayrollValue>.Type
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: PayrollEngine.Client.Scripting
Assembly: PayrollEngine.Client.Scripting.dll
Syntax
public class PayrollValueConverter : JsonConverter<PayrollValue>

Constructors

View Source

PayrollValueConverter()

Declaration
public PayrollValueConverter()

Methods

View Source

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Read and convert the JSON to T

Declaration
public override PayrollValue Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
Type Name Description
Utf8JsonReader reader

The Utf8JsonReader to read from

Type typeToConvert

The Type being converted

JsonSerializerOptions options

The JsonSerializerOptions being used

Returns
Type Description
PayrollValue

The value that was converted

Overrides
JsonConverter<PayrollValue>.Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Remarks

A converter may throw any Exception, but should throw JsonException when the JSON is invalid

View Source

Write(Utf8JsonWriter, PayrollValue, JsonSerializerOptions)

Write the value as JSON

Declaration
public override void Write(Utf8JsonWriter writer, PayrollValue value, JsonSerializerOptions options)
Parameters
Type Name Description
Utf8JsonWriter writer

The Utf8JsonWriter to write to

PayrollValue value

The value to convert

JsonSerializerOptions options

The JsonSerializerOptions being used

Overrides
JsonConverter<PayrollValue>.Write(Utf8JsonWriter, PayrollValue, JsonSerializerOptions)
Remarks

A converter may throw any Exception, but should throw JsonException when the JSON cannot be created

Extension Methods

ConsoleExtensions.WriteProperties(object, bool)
ValueTypeExtensions.GetValueType(object)
ObjectInfo.GetPropertyValue(object, string)
ObjectInfo.GetPropertyValue<T>(object, string, T)
ObjectInfo.ResolvePropertyValue(object, string)
ObjectInfo.SetPropertyValue(object, string, object)
  • View Source
☀
☾
Back to top Generated by DocFX