private static L ReadLinestringCore <L, P>(BinaryReader reader, Ordinates ordinates, GeometryBuilderBase <L, P> geometryBuilder) { int pointCount = checked ((int)reader.ReadUInt32()); IPointFactory <P> builder = geometryBuilder.GetPointFactory(ordinates); return(geometryBuilder.CreateLinestring( ReadPointsCore(reader, ordinates, builder, pointCount), pointCount)); }
protected static TMultipoint ReadMultipointCore <TMultipoint, TLinestring, TPoint>( [NotNull] BinaryReader reader, Ordinates ordinates, int pointCount, [NotNull] GeometryBuilderBase <TMultipoint, TLinestring, TPoint> geometryBuilder) { IPointFactory <TPoint> builder = geometryBuilder.GetPointFactory(ordinates); const bool reReadPointTypes = true; IEnumerable <TPoint> readPointsCore = ReadPointsCore(reader, ordinates, builder, pointCount, reReadPointTypes); return(geometryBuilder.CreateMultipoint(readPointsCore, pointCount)); }