Skip to content

ValidatorHelper

Namespace: ThinkGeo.Core

public static class ValidatorHelper

Inheritance Object → ValidatorHelper

Methods

CheckImageFormatIsValid(String, Collection<String>, String)

public static void CheckImageFormatIsValid(string imageFormat, Collection<string> outputFormats, string exceptionMessage)

Parameters

imageFormat String

outputFormats Collection<String>

exceptionMessage String

CheckItemInCollection(String, Collection<String>, String)

public static void CheckItemInCollection(string item, Collection<string> items, string exceptionMessage)

Parameters

item String

items Collection<String>

exceptionMessage String

CheckItemsInCollection(Collection<String>, Collection<String>, String)

public static void CheckItemsInCollection(Collection<string> items, Collection<string> itemCollection, string exceptionMessage)

Parameters

items Collection<String>

itemCollection Collection<String>

exceptionMessage String

CheckIEnumerableIsNotNullNorEmpty(IEnumerable, String, String)

public static void CheckIEnumerableIsNotNullNorEmpty(IEnumerable values, string parameterName, string exceptionMessage)

Parameters

values IEnumerable

parameterName String

exceptionMessage String

CheckLayerHasBoundingBox(Boolean)

public static void CheckLayerHasBoundingBox(bool hasBoundingBox)

Parameters

hasBoundingBox Boolean

CheckFeatureColumnValueContainsColon(String, String)

public static void CheckFeatureColumnValueContainsColon(string value, string parameterName)

Parameters

value String

parameterName String

CheckFeatureSourceCanExecuteSqlQuery(Boolean)

public static void CheckFeatureSourceCanExecuteSqlQuery(bool canExecuteSqlQuery)

Parameters

canExecuteSqlQuery Boolean

CheckNumberIsByte(Int32, String)

public static void CheckNumberIsByte(int number, string paramterName)

Parameters

number Int32

paramterName String

CheckUriIsValid(Uri)

public static void CheckUriIsValid(Uri uri)

Parameters

uri Uri

CheckStreamIsWritable(Stream, String)

public static void CheckStreamIsWritable(Stream stream, string parameterName)

Parameters

stream Stream

parameterName String

CheckStringIsNotNullNorEmptyForOperation(String, String)

public static void CheckStringIsNotNullNorEmptyForOperation(string value, string exceptionMessage)

Parameters

value String

exceptionMessage String

CheckStatus()

public static void CheckStatus()

CheckLongIsNotGreaterThanUInt32MaxValue(Int64)

public static void CheckLongIsNotGreaterThanUInt32MaxValue(long value)

Parameters

value Int64

CheckScaleIsValid(Double, String)

public static void CheckScaleIsValid(double scale, string parameterName)

Parameters

scale Double

parameterName String

CheckZoomLevelSetIsValid(ZoomLevelSet, String)

public static void CheckZoomLevelSetIsValid(ZoomLevelSet zoomLevelSet, string parameterName)

Parameters

zoomLevelSet ZoomLevelSet

parameterName String

CheckFileIsWriteable(FileAccess, String)

internal static void CheckFileIsWriteable(FileAccess readWriteMode, string parameterName)

Parameters

readWriteMode FileAccess

parameterName String

CheckImageIsNotNullInPointStyle(GeoImage)

public static void CheckImageIsNotNullInPointStyle(GeoImage image)

Parameters

image GeoImage

CheckDrawingLineCapIsValid(DrawingLineCap, String)

public static void CheckDrawingLineCapIsValid(DrawingLineCap drawingLineCap, string parameterName)

Parameters

drawingLineCap DrawingLineCap

parameterName String

CheckGeoDashCapIsValid(GeoDashCap, String)

public static void CheckGeoDashCapIsValid(GeoDashCap geoDashCap, string parameterName)

Parameters

geoDashCap GeoDashCap

parameterName String

CheckDrawingLineJoinIsValid(DrawingLineJoin, String)

public static void CheckDrawingLineJoinIsValid(DrawingLineJoin drawingLineJoin, string parameterName)

Parameters

drawingLineJoin DrawingLineJoin

parameterName String

CheckLineDashStyleIsValid(LineDashStyle, String)

public static void CheckLineDashStyleIsValid(LineDashStyle lineDashStyle, string parameterName)

Parameters

lineDashStyle LineDashStyle

parameterName String

CheckDrawingLevelIsValid(DrawingLevel, String)

public static void CheckDrawingLevelIsValid(DrawingLevel drawingLevel, string parameterName)

Parameters

drawingLevel DrawingLevel

parameterName String

CheckGeoImageIsValid(GeoImage, String, GeoCanvas)

public static void CheckGeoImageIsValid(GeoImage image, string parameterName, GeoCanvas canvas)

Parameters

image GeoImage

parameterName String

canvas GeoCanvas

CheckIconImageAndIconFilePathAreInvalid(String, GeoImage)

public static void CheckIconImageAndIconFilePathAreInvalid(string iconFilePath, GeoImage iconImage)

Parameters

iconFilePath String

iconImage GeoImage

CheckRandomColorTypeIsValid(RandomColorType, String)

public static void CheckRandomColorTypeIsValid(RandomColorType colorType, string parameterName)

Parameters

colorType RandomColorType

parameterName String

CheckGroupLayerIsNotEmpty(GeoCollection<Layer>)

public static void CheckGroupLayerIsNotEmpty(GeoCollection<Layer> layers)

Parameters

layers GeoCollection<Layer>

CheckQueryTypeIsValid(QueryType, String)

public static void CheckQueryTypeIsValid(QueryType queryType, string parameterName)

Parameters

queryType QueryType

parameterName String

CheckFeatureSourceCollectionIsNotEmpty(Collection<FeatureSource>)

public static void CheckFeatureSourceCollectionIsNotEmpty(Collection<FeatureSource> featureSources)

Parameters

featureSources Collection<FeatureSource>

CheckBuildIndexModeIsValid(BuildIndexMode, String)

public static void CheckBuildIndexModeIsValid(BuildIndexMode buildIndexMode, string parameterName)

Parameters

buildIndexMode BuildIndexMode

parameterName String

CheckOverwriteModeIsValid(OverwriteMode, String)

public static void CheckOverwriteModeIsValid(OverwriteMode overwriteMode, string parameterName)

Parameters

overwriteMode OverwriteMode

parameterName String

CheckRebuildRecordIdModeIsValid(BuildRecordIdMode, String)

public static void CheckRebuildRecordIdModeIsValid(BuildRecordIdMode rebuildRecordIdMode, string parameterName)

Parameters

rebuildRecordIdMode BuildRecordIdMode

parameterName String

CheckDbfColumnDecimalLengthIsValid(DbfColumnType, Int32)

public static void CheckDbfColumnDecimalLengthIsValid(DbfColumnType columnType, int decimalLength)

Parameters

columnType DbfColumnType

decimalLength Int32

CheckPanDirectionIsValid(PanDirection, String)

public static void CheckPanDirectionIsValid(PanDirection panDirection, string parameterName)

Parameters

panDirection PanDirection

parameterName String

CheckColumnNameIsInFeature(String, IEnumerable<Feature>)

public static void CheckColumnNameIsInFeature(string columnName, IEnumerable<Feature> features)

Parameters

columnName String

features IEnumerable<Feature>

CheckShapeIsValidForOperation(BaseShape)

public static void CheckShapeIsValidForOperation(BaseShape shape)

Parameters

shape BaseShape

CheckShapeIsValid(BaseShape, String)

public static void CheckShapeIsValid(BaseShape shape, string parameterName)

Parameters

shape BaseShape

parameterName String

CheckFeatureIsValid(Feature, String)

public static void CheckFeatureIsValid(Feature feature, string parameterName)

Parameters

feature Feature

parameterName String

CheckShapeValidationModeIsValid(ShapeValidationMode, String)

public static void CheckShapeValidationModeIsValid(ShapeValidationMode shapeValidationMode, string parameterName)

Parameters

shapeValidationMode ShapeValidationMode

parameterName String

CheckExtentIsValid(RectangleShape, String)

public static void CheckExtentIsValid(RectangleShape extent, string parameterName)

Parameters

extent RectangleShape

parameterName String

CheckStartingPointIsValid(StartingPoint, String)

public static void CheckStartingPointIsValid(StartingPoint startingPoint, string parameterName)

Parameters

startingPoint StartingPoint

parameterName String

CheckWkbByteOrderIsValid(WkbByteOrder, String)

public static void CheckWkbByteOrderIsValid(WkbByteOrder wkbByteOrder, string parameterName)

Parameters

wkbByteOrder WkbByteOrder

parameterName String

CheckRingOrderIsValid(RingOrder, String)

public static void CheckRingOrderIsValid(RingOrder ringOrder, string parameterName)

Parameters

ringOrder RingOrder

parameterName String

CheckFeatureIsValid(Feature)

public static void CheckFeatureIsValid(Feature feature)

Parameters

feature Feature

CheckShapeIsAreaBaseShape(BaseShape)

public static void CheckShapeIsAreaBaseShape(BaseShape shape)

Parameters

shape BaseShape

CheckShapeIsPointShape(BaseShape)

public static void CheckShapeIsPointShape(BaseShape shape)

Parameters

shape BaseShape

CheckShapeIsMultipointShape(BaseShape)

public static void CheckShapeIsMultipointShape(BaseShape shape)

Parameters

shape BaseShape

CheckShapeIsLineBaseShape(BaseShape)

public static void CheckShapeIsLineBaseShape(BaseShape shape)

Parameters

shape BaseShape

CheckSimplificationTypeIsValid(SimplificationType, String)

public static void CheckSimplificationTypeIsValid(SimplificationType simplificationType, string parameterName)

Parameters

simplificationType SimplificationType

parameterName String

CheckReturningColumnsTypeIsValid(ReturningColumnsType, String)

public static void CheckReturningColumnsTypeIsValid(ReturningColumnsType returningColumnsType, string parameterName)

Parameters

returningColumnsType ReturningColumnsType

parameterName String

CheckAreaUnitIsValid(AreaUnit, String)

public static void CheckAreaUnitIsValid(AreaUnit areaUnit, string parameterName)

Parameters

areaUnit AreaUnit

parameterName String

CheckWktIsValid(String, String)

public static void CheckWktIsValid(string wkt, string parameterName)

Parameters

wkt String

parameterName String

CheckBufferCapTypeIsValid(BufferCapType, String)

public static void CheckBufferCapTypeIsValid(BufferCapType bufferCapType, string parameterName)

Parameters

bufferCapType BufferCapType

parameterName String

CheckDistanceUnitIsValid(DistanceUnit, String)

public static void CheckDistanceUnitIsValid(DistanceUnit distanceUnit, string parameterName)

Parameters

distanceUnit DistanceUnit

parameterName String

CheckPointLineIsIntersected(PointShape, String, LineShape, String, Double)

public static void CheckPointLineIsIntersected(PointShape pointShape, string pointShapeName, LineShape lineShape, string lineShapeName, double tolerance)

Parameters

pointShape PointShape

pointShapeName String

lineShape LineShape

lineShapeName String

tolerance Double

CheckPointSymbolTypeIsValid(PointSymbolType, String)

public static void CheckPointSymbolTypeIsValid(PointSymbolType symbolType, string parameterName)

Parameters

symbolType PointSymbolType

parameterName String

CheckPointTypeIsValid(PointType, String)

public static void CheckPointTypeIsValid(PointType pointType, string parameterName)

Parameters

pointType PointType

parameterName String

CheckCanParseStringToDouble(String, String)

public static void CheckCanParseStringToDouble(string value, string parameterName)

Parameters

value String

parameterName String

CheckStringIsNotNullNorWhiteSpace(String, String)

public static void CheckStringIsNotNullNorWhiteSpace(string value, string parameterName)

Parameters

value String

parameterName String

CheckStringIsValidDecimalDegree(String, String)

public static void CheckStringIsValidDecimalDegree(string value, string parameterName)

Parameters

value String

parameterName String

CheckObjectsAreNotAllNull(Object, Object, String, String)

public static void CheckObjectsAreNotAllNull(object firstObject, object secondObject, string firstParameterName, string secondParameterName)

Parameters

firstObject Object

secondObject Object

firstParameterName String

secondParameterName String

CheckTypeIsSupport(Object, String)

public static void CheckTypeIsSupport(object instance, string typeName)

Parameters

instance Object

typeName String

CheckCanvasWidthIsLargerThanZero(Double, String)

public static void CheckCanvasWidthIsLargerThanZero(double canvasWidth, string parameterName)

Parameters

canvasWidth Double

parameterName String

CheckCanvasHeightIsLargerThanZero(Double, String)

public static void CheckCanvasHeightIsLargerThanZero(double canvasHeight, string parameterName)

Parameters

canvasHeight Double

parameterName String

CheckGeographyUnitIsMeter(GeographyUnit, String)

public static void CheckGeographyUnitIsMeter(GeographyUnit geographyUnit, string parameterName)

Parameters

geographyUnit GeographyUnit

parameterName String

CheckObjectIsNotNull(Object, String)

public static void CheckObjectIsNotNull(object parameterObject, string parameterName)

Parameters

parameterObject Object

parameterName String

CheckObjectIsNotNull(Object, String, String)

public static void CheckObjectIsNotNull(object parameterObject, string parameterName, string exceptionMessage)

Parameters

parameterObject Object

parameterName String

exceptionMessage String

CheckInputValueIsLargerThan(Double, String, Double, RangeCheckingInclusion)

public static void CheckInputValueIsLargerThan(double inputValue, string parameterName, double minValue, RangeCheckingInclusion includeMinValue)

Parameters

inputValue Double

parameterName String

minValue Double

includeMinValue RangeCheckingInclusion

CheckDateTimeIsInRange(DateTime, String, DateTime, RangeCheckingInclusion, DateTime, RangeCheckingInclusion)

public static void CheckDateTimeIsInRange(DateTime inputDate, string parameterName, DateTime minDate, RangeCheckingInclusion includeMinValue, DateTime maxDate, RangeCheckingInclusion includeMaxValue)

Parameters

inputDate DateTime

parameterName String

minDate DateTime

includeMinValue RangeCheckingInclusion

maxDate DateTime

includeMaxValue RangeCheckingInclusion

CheckAreIntegerStrings(IEnumerable<String>, String)

public static void CheckAreIntegerStrings(IEnumerable<string> ids, string parameterName)

Parameters

ids IEnumerable<String>

parameterName String

CheckGeoCanvasIsInDrawing(Boolean)

public static void CheckGeoCanvasIsInDrawing(bool isDrawing)

Parameters

isDrawing Boolean

CheckScaleIsLargerThanZero(Double, String)

public static void CheckScaleIsLargerThanZero(double imageScale, string parameterName)

Parameters

imageScale Double

parameterName String

CheckInputValueIsLargerThanZero(Double, String)

public static void CheckInputValueIsLargerThanZero(double value, string parameterName)

Parameters

value Double

parameterName String

CheckObjectIsTargetType(Object, Type, String)

public static void CheckObjectIsTargetType(object objectToTest, Type targetType, string operationName)

Parameters

objectToTest Object

targetType Type

operationName String

CheckLatitudeIsInRange(Double, String)

public static void CheckLatitudeIsInRange(double latitude, string parameterName)

Parameters

latitude Double

parameterName String

CheckLongitudeIsInRange(Double, String)

public static void CheckLongitudeIsInRange(double longitude, string parameterName)

Parameters

longitude Double

parameterName String

CheckInputValueIsInRange(Double, String, Double, RangeCheckingInclusion, Double, RangeCheckingInclusion)

public static void CheckInputValueIsInRange(double inputValue, string parameterName, double minValue, RangeCheckingInclusion includeMinValue, double maxValue, RangeCheckingInclusion includeMaxValue)

Parameters

inputValue Double

parameterName String

minValue Double

includeMinValue RangeCheckingInclusion

maxValue Double

includeMaxValue RangeCheckingInclusion

CheckInputValueIsInRange(Double, String, Double, RangeCheckingInclusion, Double, RangeCheckingInclusion, String)

public static void CheckInputValueIsInRange(double inputValue, string parameterName, double minValue, RangeCheckingInclusion includeMinValue, double maxValue, RangeCheckingInclusion includeMaxValue, string exceptionMessage)

Parameters

inputValue Double

parameterName String

minValue Double

includeMinValue RangeCheckingInclusion

maxValue Double

includeMaxValue RangeCheckingInclusion

exceptionMessage String

CheckInputValueIsInRange(Double, String, Double, Double)

public static void CheckInputValueIsInRange(double inputValue, string parameterName, double minValue, double maxValue)

Parameters

inputValue Double

parameterName String

minValue Double

maxValue Double

CheckInputValueIsLessThan(Double, String, Double, RangeCheckingInclusion)

public static void CheckInputValueIsLessThan(double inputValue, string parameterName, double maxValue, RangeCheckingInclusion includeMaxValue)

Parameters

inputValue Double

parameterName String

maxValue Double

includeMaxValue RangeCheckingInclusion

CheckInputValueIsValidDecimalDegree(Double, String)

public static void CheckInputValueIsValidDecimalDegree(double value, string parameterName)

Parameters

value Double

parameterName String

CheckInputValueIsNotNaNNorInfinity(Double, String)

public static void CheckInputValueIsNotNaNNorInfinity(double value, string parameterName)

Parameters

value Double

parameterName String

CheckFeatureSourceIsOpen(Boolean)

public static void CheckFeatureSourceIsOpen(bool isOpen)

Parameters

isOpen Boolean

CheckRtreeSpatialIndexIsOpen(Boolean)

public static void CheckRtreeSpatialIndexIsOpen(bool isOpen)

Parameters

isOpen Boolean

CheckRasterSourceIsOpen(Boolean)

public static void CheckRasterSourceIsOpen(bool isOpen)

Parameters

isOpen Boolean

CheckIsFastMode(Boolean)

public static void CheckIsFastMode(bool fastMode)

Parameters

fastMode Boolean

CheckStringIsNotNullNorEmpty(String, String)

public static void CheckStringIsNotNullNorEmpty(string value, string parameterName)

Parameters

value String

parameterName String

CheckWkbIsValid(Byte[], String)

public static void CheckWkbIsValid(Byte[] wkb, string parameterName)

Parameters

wkb Byte[]

parameterName String

CheckHtmlColorIsValid(String, String)

public static void CheckHtmlColorIsValid(string htmlColor, string parameterName)

Parameters

htmlColor String

parameterName String

CheckFeatureSourceIsEditable(Boolean)

public static void CheckFeatureSourceIsEditable(bool isEditable)

Parameters

isEditable Boolean

CheckCanModifyColumnStructure(Boolean)

public static void CheckCanModifyColumnStructure(bool canModifyColumnStructure)

Parameters

canModifyColumnStructure Boolean

CheckSpatialIndexIsDeletable(Boolean)

public static void CheckSpatialIndexIsDeletable(bool isDeletable)

Parameters

isDeletable Boolean

CheckFeatureSourceIsInTransaction(Boolean)

public static void CheckFeatureSourceIsInTransaction(bool isInTransaction)

Parameters

isInTransaction Boolean

CheckFeatureSourceIsNotInTransaction(Boolean)

public static void CheckFeatureSourceIsNotInTransaction(bool isInTransaction)

Parameters

isInTransaction Boolean

CheckImageFormatSupport(String)

public static void CheckImageFormatSupport(string imageFormat)

Parameters

imageFormat String

CheckFileIsExist(String)

public static void CheckFileIsExist(string pathFilename)

Parameters

pathFilename String

CheckFileIsNotExist(String)

public static void CheckFileIsNotExist(string pathFilename)

Parameters

pathFilename String

CheckConnectionStringIsNotNull(String)

public static void CheckConnectionStringIsNotNull(string connectionString)

Parameters

connectionString String

CheckLayerIsOpened(Boolean)

public static void CheckLayerIsOpened(bool isOpen)

Parameters

isOpen Boolean

CheckLayerIsNotOpenedNorDrawing(Boolean)

public static void CheckLayerIsNotOpenedNorDrawing(bool isOpenOrDrawing)

Parameters

isOpenOrDrawing Boolean

CheckGeographyUnitIsValid(GeographyUnit, String)

public static void CheckGeographyUnitIsValid(GeographyUnit geographyUnit, string parameterName)

Parameters

geographyUnit GeographyUnit

parameterName String

CheckProjectionConverterIsOpen(Boolean)

public static void CheckProjectionConverterIsOpen(bool isOpen)

Parameters

isOpen Boolean