Example #1
0
 public CsvOutputAdapter(CsvOutputConfig configInfo, CepEventType eventType)
 {
     this.streamWriter      = configInfo.OutputFileName.Length == 0 ? new StreamWriter(Console.OpenStandardOutput()) : new StreamWriter(configInfo.OutputFileName);
     this.config            = configInfo;
     this.bindtimeEventType = eventType;
     this.mapOrdinalsFromOutputToCepEvent = CsvCommon.MapPayloadToFieldsByOrdinal(configInfo.Fields, eventType);
     this.culture = new CultureInfo(configInfo.CultureName);
 }
Example #2
0
 public CsvInputAdapter(CsvInputConfig configInfo, CepEventType eventType, TInputAdapter inputAdapter)
 {
     this.inputAdapter      = inputAdapter;
     this.config            = configInfo;
     this.fileStreamReader  = new FileStream(configInfo.InputFileName, FileMode.Open, FileAccess.Read, FileShare.None, this.config.BufferSize, true);
     this.buffer            = new byte[this.config.BufferSize];
     this.bindTimeEventType = eventType;
     this.mapOrdinalsFromInputToCepEvent = CsvCommon.MapPayloadToFieldsByOrdinal(this.config.Fields, this.bindTimeEventType);
     this.readyToEnqueue = new ManualResetEvent(true);
 }