Esempio n. 1
0
 /// <summary>
 /// Custom constructor using a FileFormat
 /// </summary>
 /// <param name="fileFormat"></param>
 public RecordFormatMap(FileFormat fileFormat)
 {
     foreach (var recordFormat in fileFormat.RecordFormats)
     {
         _regexDictionary[new Regex(string.Format(Pattern, recordFormat.DiscriminatorPattern))] = recordFormat;
         _idDictionary[recordFormat.DiscriminatorPattern] = recordFormat;
     }
 }
Esempio n. 2
0
 /// <summary>
 ///  Constructs an EbcdicReader.
 /// </summary>
 /// <param name="inputStream">the stream to read the data from</param>
 /// <param name="fileFormat">the copybook to use for decoding records</param>
 /// <param name="hasRdw">true if records have a record descriptor word (RDW)</param>
 public EbcdicReader(BufferedStream inputStream, FileFormat fileFormat, bool hasRdw)
 {
     _stream = inputStream;
     _fileFormat = fileFormat;
     _decoder = new EbcdicDecoder(fileFormat.Charset);
     _recordFormatMap = new RecordFormatMap(fileFormat);
     _hasRdw = hasRdw;
 }