public SeparatedValueRecordWriter(TextWriter writer, SeparatedValueSchema schema, SeparatedValueOptions options)
 {
     this.writer            = writer;
     this.schema            = schema;
     this.options           = options.Clone();
     this.quoteString       = String.Empty + options.Quote;
     this.doubleQuoteString = String.Empty + options.Quote + options.Quote;
 }
Esempio n. 2
0
 public SeparatedValueRecordWriter(TextWriter writer, SeparatedValueSchema schema, SeparatedValueOptions options)
 {
     this.writer   = writer;
     this.metadata = new SeparatedValueMetadata()
     {
         Schema  = schema,
         Options = options.Clone()
     };
     this.quoteString       = String.Empty + options.Quote;
     this.doubleQuoteString = String.Empty + options.Quote + options.Quote;
 }
Esempio n. 3
0
 public SeparatedValueRecordParser(RetryReader reader, SeparatedValueOptions options)
 {
     this.reader            = reader;
     Options                = options.Clone();
     separatorMatcher       = SeparatorMatcher.GetMatcher(reader, options.Separator);
     recordSeparatorMatcher = SeparatorMatcher.GetMatcher(reader, options.RecordSeparator);
     if (options.RecordSeparator != null && options.RecordSeparator.StartsWith(options.Separator))
     {
         string postfix = options.RecordSeparator.Substring(options.Separator.Length);
         postfixMatcher = SeparatorMatcher.GetMatcher(reader, postfix);
     }
     separatorLength = Math.Max(Options.RecordSeparator?.Length ?? 2, Options.Separator.Length);
 }
 public SeparatedValueRecordParser(RetryReader reader, SeparatedValueOptions options)
 {
     this.reader                 = reader;
     this.options                = options.Clone();
     this.separatorMatcher       = getMatcher(options.Separator);
     this.recordSeparatorMatcher = getMatcher(options.RecordSeparator);
     if (options.RecordSeparator.StartsWith(options.Separator))
     {
         string postfix = options.RecordSeparator.Substring(options.Separator.Length);
         this.postfixMatcher = getMatcher(postfix);
     }
     this.token = new StringBuilder();
 }
 public SeparatedValueRecordParser(RetryReader reader, SeparatedValueOptions options)
 {
     this.reader = reader;
     this.options = options.Clone();
     this.separatorMatcher = getMatcher(options.Separator);
     this.recordSeparatorMatcher = getMatcher(options.RecordSeparator);
     if (options.RecordSeparator.StartsWith(options.Separator))
     {
         string postfix = options.RecordSeparator.Substring(options.Separator.Length);
         this.postfixMatcher = getMatcher(postfix);
     }
     this.token = new StringBuilder();
 }
Esempio n. 6
0
 public SeparatedValueRecordWriter(TextWriter writer, SeparatedValueSchema schema, SeparatedValueOptions options)
 {
     this.writer = writer;
     Metadata    = new SeparatedValueRecordContext()
     {
         ExecutionContext = new SeparatedValueExecutionContext()
         {
             Schema  = schema,
             Options = options.Clone()
         }
     };
     quoteString       = String.Empty + options.Quote;
     doubleQuoteString = String.Empty + options.Quote + options.Quote;
 }
Esempio n. 7
0
 public SeparatedValueRecordParser(RetryReader reader, SeparatedValueOptions options)
 {
     this.reader                 = reader;
     this.options                = options.Clone();
     this.separatorMatcher       = SeparatorMatcher.GetMatcher(reader, options.Separator);
     this.recordSeparatorMatcher = SeparatorMatcher.GetMatcher(reader, options.RecordSeparator);
     if (options.RecordSeparator != null && options.RecordSeparator.StartsWith(options.Separator))
     {
         string postfix = options.RecordSeparator.Substring(options.Separator.Length);
         this.postfixMatcher = SeparatorMatcher.GetMatcher(reader, postfix);
     }
     this.separatorLength = Math.Max(this.options.RecordSeparator?.Length ?? 2, this.options.Separator.Length);
     this.tokens          = new List <string>();
     this.token           = new StringBuilder();
 }