static IEnumerable <Record> GetHeaderRecords(Stream stream, IRecordReader recordReader) { using (var reader = new IgcReader(stream, recordReader)) { Record record; if (!reader.Read(out record) || record.RecordType != RecordType.A) { throw new FileLoadException("Failed to read the A-record"); } while (reader.Read(out record)) { yield return(record); } } }
static IEnumerable<Record> ReadDocument(Stream stream, IRecordReader recordReader) { using (var reader = new IgcReader(stream, recordReader)) { Record record; while (reader.Read(out record)) yield return record; } yield break; }
static IEnumerable <Record> ReadDocument(Stream stream, IRecordReader recordReader) { using (var reader = new IgcReader(stream, recordReader)) { Record record; while (reader.Read(out record)) { yield return(record); } } yield break; }
static IEnumerable<Record> GetHeaderRecords(Stream stream, IRecordReader recordReader) { using (var reader = new IgcReader(stream, recordReader)) { Record record; if (!reader.Read(out record) || record.RecordType != RecordType.A) throw new FileLoadException("Failed to read the A-record"); while (reader.Read(out record)) yield return record; } }