Skip to main content

CkMethodTimeSpanSecondsConverter

Namespace: Meshmakers.Octo.Sdk.ServiceClient.AssetRepositoryServices.Tenants.Methods

Writes and reads a TimeSpan CK method parameter or result as whole seconds, the wire form of the asset repository's TimeSpan GraphQL scalar. Used by the generated method clients.

public sealed class CkMethodTimeSpanSecondsConverter : JsonConverter<TimeSpan>

Inheritance Object → JsonConverter → JsonConverter<TimeSpan> → CkMethodTimeSpanSecondsConverter

Properties​

HandleNull​

public bool HandleNull { get; }

Property Value​

Boolean

Type​

public Type Type { get; }

Property Value​

Type

Constructors​

CkMethodTimeSpanSecondsConverter()​

public CkMethodTimeSpanSecondsConverter()

Methods​

Read(out Utf8JsonReader, Type, JsonSerializerOptions)​

public TimeSpan Read(out Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

Parameters​

reader Utf8JsonReader

typeToConvert Type

options JsonSerializerOptions

Returns​

TimeSpan

Write(Utf8JsonWriter, TimeSpan, JsonSerializerOptions)​

public void Write(Utf8JsonWriter writer, TimeSpan value, JsonSerializerOptions options)

Parameters​

writer Utf8JsonWriter

value TimeSpan

options JsonSerializerOptions