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

Syntax

public sealed class NodaMultiplePatternConverter<T> : NodaConverterBase<T>

Attributes

Type Description
NullableContextAttribute
NullableAttribute

Type Parameters

Name Description
T The type to convert to/from JSON.

Constructors

Name Summary
NodaMultiplePatternConverter(Action<T>, IPattern<T>[]) 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.
NodaMultiplePatternConverter(IPattern<T>[]) Creates a new instance with a pattern and no validator.

Properties

Name Value Summary
Patterns IEnumerable<IPattern<T>>

Methods

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

Extension Methods