Struct ShapeValidationResult
This structure represents the result of the validation method performed on a shape.
public struct ShapeValidationResult
- Inherited Members
Remarks
This is used to determine if an validation rule was broken for a shape. This structure also returns the description of the violation.
Constructors
ShapeValidationResult(bool, string)
This constructor allows you to set the IsValid and ValidationErrors properties.
public ShapeValidationResult(bool isValid, string validationErrors)
Parameters
isValid
boolThis parameter describes whether the object has passed its validation method.
validationErrors
stringThis parameter describes the list of errors if the object did not pass its validation method. The errors are separated by semicolons.
Remarks
None
Properties
IsValid
This property describes whether the object has passed its validation method.
public bool IsValid { get; }
Property Value
- bool
This property returns either true or false, depending on whether the object has passed its validation method.
Remarks
None
ValidationErrors
This property describes the list of errors if the object did not pass its validation method.
public string ValidationErrors { get; }
Property Value
- string
This property returns the list of errors if the object did not pass its validation method.
Remarks
If there are multiple errors, they will be separated by semicolons. If the object passed its validations, then this string will be empty.
Methods
Equals(object)
This method is an override of the Equals functionality.
public override bool Equals(object obj)
Parameters
obj
object
Returns
Remarks
None
GetHashCode()
This method is an override of the GetHashCode functionality.
public override int GetHashCode()
Returns
Remarks
None
Operators
operator ==(ShapeValidationResult, ShapeValidationResult)
This method is an override of the == functionality.
public static bool operator ==(ShapeValidationResult sourceShapeValidationResult, ShapeValidationResult targetShapeValidationResult)
Parameters
sourceShapeValidationResult
ShapeValidationResulttargetShapeValidationResult
ShapeValidationResult
Returns
Remarks
None
operator !=(ShapeValidationResult, ShapeValidationResult)
This method is an override of the != functionality.
public static bool operator !=(ShapeValidationResult sourceShapeValidationResult, ShapeValidationResult targetShapeValidationResult)
Parameters
sourceShapeValidationResult
ShapeValidationResulttargetShapeValidationResult
ShapeValidationResult
Returns
Remarks
None