InstantPatternConverter 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<Instant>
graph BT Type-->Base0["NodaConverterBase<Instant>"] Type["InstantPatternConverter"] class Type type-node

Syntax

public sealed class InstantPatternConverter : NodaConverterBase<Instant>

Attributes

Type Description
NullableContextAttribute
NullableAttribute

Constructors

Name Summary
InstantPatternConverter(IPattern<Instant>[], IPattern<OffsetDateTime>[]) 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<OffsetDateTime>>
Patterns IEnumerable<IPattern<Instant>>

Methods

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

Extension Methods