Ejemplo n.º 1
0
 public static FileError ShapeRecordGeometryLineCountMismatch(this IShapeFileRecordProblemBuilder builder,
                                                              int expectedLineCount, int actualLineCount)
 {
     return(builder
            .Error(nameof(ShapeRecordGeometryLineCountMismatch))
            .WithParameters(
                new ProblemParameter("ExpectedLineCount", expectedLineCount.ToString()),
                new ProblemParameter("ActualLineCount", actualLineCount.ToString()))
            .Build());
 }
Ejemplo n.º 2
0
 public static FileError ShapeRecordShapeTypeMismatch(this IShapeFileRecordProblemBuilder builder,
                                                      ShapeType expectedShapeType, ShapeType actualShapeType)
 {
     return(builder
            .Error(nameof(ShapeRecordShapeTypeMismatch))
            .WithParameters(
                new ProblemParameter("ExpectedShapeType", expectedShapeType.ToString()),
                new ProblemParameter("ActualShapeType", actualShapeType.ToString()))
            .Build());
 }
Ejemplo n.º 3
0
        // record

        public static FileError HasShapeRecordFormatError(this IShapeFileRecordProblemBuilder builder, Exception exception)
        {
            if (exception == null)
            {
                throw new ArgumentNullException(nameof(exception));
            }

            return(builder
                   .Error(nameof(HasShapeRecordFormatError))
                   .WithParameters(
                       new ProblemParameter("Exception", exception.ToString()))
                   .Build());
        }
Ejemplo n.º 4
0
 public static FileError ShapeRecordGeometrySelfIntersects(this IShapeFileRecordProblemBuilder builder)
 {
     return(builder.Error(nameof(ShapeRecordGeometrySelfIntersects)).Build());
 }
Ejemplo n.º 5
0
 public static FileError ShapeRecordGeometryMismatch(this IShapeFileRecordProblemBuilder builder)
 {
     return(builder.Error(nameof(ShapeRecordGeometryMismatch)).Build());
 }