internal ReadFormatContext(IBufferReader <TReader> bufferReader, TReader reader, FormatOptions options = null) { if (bufferReader == null) { throw new ArgumentNullException(nameof(bufferReader)); } if (reader == null) { throw new ArgumentNullException(nameof(reader)); } this.BufferReader = bufferReader; this.Reader = reader; this.Options = options ?? new FormatOptions(); }
internal SeccsReader(FormatCollection <IReadFormat <TReader> > formats, FormatOptions options = null) : this(options) { this.Formats = formats ?? throw new ArgumentNullException(nameof(formats)); }
bool IFormat.CanFormat(Type type, FormatOptions options) => CanFormatInheritedTypes ? typeof(T).IsAssignableFrom(type) : type == typeof(T);
public SeccsReader(FormatOptions options = null) { this.Options = options ?? new FormatOptions(); Formats.Discover(); }