Пример #1
0
        internal static EndSection BuildFrom(BufferedBinaryReader reader)
        {
            var sectionInfos = reader.ReadSectionInfo();

            if (!sectionInfos.Is(SectionCode.EndSection))
            {
                throw new UnexpectedGribSectionException(
                          SectionCode.DataSection,
                          sectionInfos.SectionCode
                          );
            }

            return(new EndSection(sectionInfos.Length, sectionInfos.SectionCode));
        }