Example #1
0
        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();
        }
Example #2
0
 internal SeccsReader(FormatCollection <IReadFormat <TReader> > formats, FormatOptions options = null) : this(options)
 {
     this.Formats = formats ?? throw new ArgumentNullException(nameof(formats));
 }
Example #3
0
 bool IFormat.CanFormat(Type type, FormatOptions options) => CanFormatInheritedTypes ? typeof(T).IsAssignableFrom(type) : type == typeof(T);
Example #4
0
        public SeccsReader(FormatOptions options = null)
        {
            this.Options = options ?? new FormatOptions();

            Formats.Discover();
        }