Beispiel #1
0
        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;
        }
Beispiel #2
0
        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);
                }
            }
        }
Beispiel #4
0
        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;
            }
        }