Example #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());
 }
Example #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());
 }
Example #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());
        }
Example #4
0
 public static FileError ShapeRecordGeometrySelfIntersects(this IShapeFileRecordProblemBuilder builder)
 {
     return(builder.Error(nameof(ShapeRecordGeometrySelfIntersects)).Build());
 }
Example #5
0
 public static FileError ShapeRecordGeometryMismatch(this IShapeFileRecordProblemBuilder builder)
 {
     return(builder.Error(nameof(ShapeRecordGeometryMismatch)).Build());
 }