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); }
public HexFileManager() { recordParser = new HexRecordParser(); recordValidator = new HexRecordValidator(); }