private SerializableMember(string name, Getter getter, Formatter formatter, ShouldSerialize?shouldSerialize, bool emitDefault) { Name = name; Getter = getter; Formatter = formatter; ShouldSerialize.SetAllowNull(shouldSerialize); EmitDefaultValue = emitDefault; GeneratedMethod.Clear(); }
private DynamicCellValue(string?n, dynamic?v, Formatter f) { _Name = default; _Name.SetAllowNull(n); Value = v; Formatter = f; }
private RowEndingDetector(ReaderStateMachine stateMachine, Options options, MemoryPool <char> memPool, CharacterLookup charLookup, IReaderAdapter?inner, IAsyncReaderAdapter?innerAsync, ReadOnlyMemory <char> valueSeparatorMemory) { Inner.SetAllowNull(inner); InnerAsync.SetAllowNull(innerAsync); State = stateMachine; stateMachine.Initialize( charLookup, options.EscapedValueStartAndEnd, options.EscapedValueEscapeCharacter,
private DeserializableMember( string name, Setter setter, Parser parser, bool isRequired, Reset?reset, TypeInfo?aheadOfTimeGeneratedType ) { Name = name; Setter = setter; Parser = parser; IsRequired = isRequired; Reset.SetAllowNull(reset); AheadOfTimeGeneratedType.SetAllowNull(aheadOfTimeGeneratedType); }
private HeadersReader( ReaderStateMachine stateMachine, BoundConfigurationBase <T> config, CharacterLookup charLookup, IReaderAdapter?inner, IAsyncReaderAdapter?innerAsync, BufferWithPushback buffer, ReadRowEnding rowEndingOverride ) { LogHelper.StateTransition_NewHeadersReader(); Configuration = config; Inner.SetAllowNull(inner); InnerAsync.SetAllowNull(innerAsync); var options = Configuration.Options; MemoryPool = Configuration.MemoryPool; BufferSizeHint = options.ReadBufferSizeHint; Columns = config.DeserializeColumns; StateMachine = stateMachine; stateMachine.Initialize( charLookup, options.EscapedValueStartAndEnd, options.EscapedValueEscapeCharacter, rowEndingOverride, // this can be something OTHER than what was provided, due to RowEnding.Detect ReadHeader.Never, false, options.WhitespaceTreatment.HasFlag(WhitespaceTreatments.TrimBeforeValues), options.WhitespaceTreatment.HasFlag(WhitespaceTreatments.TrimAfterValues) ); Buffer = buffer; HeaderCount = 0; PushBackLength = 0; WhitespaceTreatment = options.WhitespaceTreatment; }