OffsetDateTimePatternConverter.

OffsetDateTimePatternConverter(Action<OffsetDateTime>, IPattern<OffsetDateTime>[], IPattern<Instant>[]) Constructor

Summary

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.

Syntax

public OffsetDateTimePatternConverter(Action<OffsetDateTime> validator, IPattern<OffsetDateTime>[] patterns, IPattern<Instant>[] alternatePatterns)

Parameters

Name Type Description
validator Action<OffsetDateTime> The validator to call before writing values. May be null, indicating that no validation is required.
patterns IPattern<OffsetDateTime>[]
alternatePatterns IPattern<Instant>[]

Return Value

Type Description
void