internal static void Parsing(this List<HexRecord> records, FileStream fs, IHexRecordParser parser)
 {
     using (StreamWriter sr = new StreamWriter(fs))
     {
         foreach(var record in records)
             sr.WriteLine(parser.UnParse(record));
         sr.WriteLine(HexRecord.EOF);
     }
 }
 internal static void Parsing(this List <HexRecord> records, FileStream fs, IHexRecordParser parser)
 {
     using (StreamWriter sr = new StreamWriter(fs))
     {
         foreach (var record in records)
         {
             sr.WriteLine(parser.UnParse(record));
         }
         sr.WriteLine(HexRecord.EOF);
     }
 }
        internal static List<HexRecord> Parsing(this FileStream fs, IHexRecordParser parser)
        {
            List<HexRecord> list = new List<HexRecord>();

            using (StreamReader sr = new StreamReader(fs))
            {
                string record;
                while (!sr.EndOfStream)
                {
                    record = sr.ReadLine();
                    if ((record.GetRecordType() == HexRecordType.ExtendedLinearAddress) ||
                        (record.GetRecordType() == HexRecordType.ExtendedSegmentAddress) ||
                        (record.GetRecordType() == HexRecordType.Data))
                        list.Add(parser.Parse(record));
                }
            }
            return list;
        }
        internal static List <HexRecord> Parsing(this FileStream fs, IHexRecordParser parser)
        {
            List <HexRecord> list = new List <HexRecord>();

            using (StreamReader sr = new StreamReader(fs))
            {
                string record;
                while (!sr.EndOfStream)
                {
                    record = sr.ReadLine();
                    if ((record.GetRecordType() == HexRecordType.ExtendedLinearAddress) ||
                        (record.GetRecordType() == HexRecordType.ExtendedSegmentAddress) ||
                        (record.GetRecordType() == HexRecordType.Data))
                    {
                        list.Add(parser.Parse(record));
                    }
                }
            }
            return(list);
        }
Esempio n. 5
0
 public HexFileManager()
 {
     recordParser = new HexRecordParser();
     recordValidator = new HexRecordValidator();
 }
Esempio n. 6
0
 public HexFileManager()
 {
     recordParser    = new HexRecordParser();
     recordValidator = new HexRecordValidator();
 }