Exemplo n.º 1
0
 public FixedLengthRecordWriter(TextWriter writer, FixedLengthSchema schema, FixedLengthOptions options)
 {
     this.writer   = writer;
     this.metadata = new FixedLengthWriterMetadata()
     {
         Schema  = schema,
         Options = options.Clone()
     };
 }
Exemplo n.º 2
0
 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();
 }
Exemplo n.º 4
0
 /// <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();
 }
Exemplo n.º 5
0
 /// <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();
 }
Exemplo n.º 6
0
 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();
 }
Exemplo n.º 7
0
 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();
 }
Exemplo n.º 8
0
 public FixedLengthRecordWriter(TextWriter writer, FixedLengthSchema schema, FixedLengthOptions options)
 {
     this.writer  = writer;
     this.schema  = schema;
     this.options = options.Clone();
 }
Exemplo n.º 9
0
 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();
 }
Exemplo n.º 10
0
 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();
 }
 public FixedLengthRecordWriter(TextWriter writer, FixedLengthSchema schema, FixedLengthOptions options)
 {
     this.writer = writer;
     this.schema = schema;
     this.options = options.Clone();
 }