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);
                }
            }
        }
示例#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;
        }
示例#3
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;
        }
示例#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;
            }
        }