public FixedLengthRecordWriter(TextWriter writer, FixedLengthSchema schema, FixedLengthOptions options) { this.writer = writer; this.metadata = new FixedLengthWriterMetadata() { Schema = schema, Options = options.Clone() }; }
public FixedLengthRecordWriter(TextWriter writer, FixedLengthSchema schema, FixedLengthOptions options) { this.writer = writer; Metadata = new FixedLengthRecordContext() { ExecutionContext = new FixedLengthExecutionContext() { Schema = schema, Options = options.Clone() } }; }
/// <summary> /// Initializes a new FixedLengthComplexColumn with the given schema and options. /// </summary> /// <param name="columnName">The name of the column.</param> /// <param name="schema">The schema of the data embedded in the column.</param> /// <param name="options">The options to use when parsing the embedded data.</param> public FixedLengthComplexColumn(string columnName, FixedLengthSchema schema, FixedLengthOptions options) : base(columnName) { if (schema == null) { throw new ArgumentNullException("schema"); } if (options == null) { throw new ArgumentNullException("options"); } this.schema = schema; this.options = options.Clone(); }
/// <summary> /// Initializes a new FixedLengthReader with the given schema. /// </summary> /// <param name="reader">A reader over the fixed-length document.</param> /// <param name="schema">The schema of the fixed-length document.</param> /// <param name="options">The options controlling how the fixed-length document is read.</param> /// <exception cref="ArgumentNullException">The reader is null.</exception> /// <exception cref="ArgumentNullException">The schema is null.</exception> public FixedLengthReader(TextReader reader, FixedLengthSchema schema, FixedLengthOptions options = null) { if (reader == null) { throw new ArgumentNullException("reader"); } if (schema == null) { throw new ArgumentNullException("schema"); } if (options == null) { options = new FixedLengthOptions(); } parser = new FixedLengthRecordParser(reader, schema, options); this.schema = schema; this.options = options.Clone(); }
private FixedLengthReader(Stream stream, FixedLengthSchema schema, FixedLengthOptions options, bool ownsStream) { if (stream == null) { throw new ArgumentNullException("stream"); } if (schema == null) { throw new ArgumentNullException("schema"); } if (options == null) { throw new ArgumentNullException("options"); } reader = new RecordReader(stream, options.Encoding, options.RecordSeparator, ownsStream); this.schema = schema; this.options = options.Clone(); }
private FixedLengthWriter(Stream stream, FixedLengthSchema schema, FixedLengthOptions options, bool ownsStream) { if (stream == null) { throw new ArgumentNullException("stream"); } if (schema == null) { throw new ArgumentNullException("schema"); } if (options == null) { throw new ArgumentNullException("options"); } this.writer = new StreamWriter(stream, options.Encoding ?? Encoding.Default); this.schema = schema; this.ownsStream = ownsStream; this.options = options.Clone(); }
public FixedLengthRecordWriter(TextWriter writer, FixedLengthSchema schema, FixedLengthOptions options) { this.writer = writer; this.schema = schema; this.options = options.Clone(); }