OffsetDateTimePatternConverter Class

Summary

A JSON converter for types which can be represented by a single string value, parsed or formatted from an NodaTime.Text.IPattern`1.
Assembly
Rocket.Surgery.Azure.Storage.dll
Namespace
Rocket.Surgery.Azure.Storage.Converters
Base Types
  • NodaConverterBase<OffsetDateTime>
graph BT Type-->Base0["NodaConverterBase<OffsetDateTime>"] Type["OffsetDateTimePatternConverter"] class Type type-node

Syntax

public sealed class OffsetDateTimePatternConverter : NodaConverterBase<OffsetDateTime>

Attributes

Type Description
NullableContextAttribute
NullableAttribute

Constructors

Name Summary
OffsetDateTimePatternConverter(Action<OffsetDateTime>, IPattern<OffsetDateTime>[], IPattern<Instant>[]) Creates a new instance with a pattern and an optional validator. The validator will be called before each value is written, and may throw an exception to indicate that the value cannot be serialized.

Properties

Name Value Summary
AlternatePatterns IEnumerable<IPattern<Instant>>
Patterns IEnumerable<IPattern<OffsetDateTime>>

Methods

Name Value Summary
ReadJsonImpl(JsonReader, JsonSerializer) OffsetDateTime
Implemented by concrete subclasses, this performs the final conversion from a non-null JSON value to a value of type T.
WriteJsonImpl(JsonWriter, OffsetDateTime, JsonSerializer) void
Writes the formatted value to the writer.

Extension Methods