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)); }