Show / Hide Table of Contents

    Class Validator

    The supplier of validation logic for for element construction.

    Inheritance
    System.Object
    Validator
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Elements.Validators
    Assembly: Hypar.Elements.dll
    Syntax
    public class Validator

    Properties

    DisableValidationOnConstruction

    Should geometry validation be disabled during construction? Note: Disabling validation can have unforeseen consequences. Use with caution.

    Declaration
    public static bool DisableValidationOnConstruction { get; set; }
    Property Value
    Type Description
    System.Boolean

    Instance

    The validator singleton.

    Declaration
    [Obsolete]
    public static Validator Instance { get; }
    Property Value
    Type Description
    Validator

    Methods

    GetFirstValidatorForType<T>()

    Gets the first validator for the supplied T.

    Declaration
    [Obsolete("Please include validation logic in the constructor of your object. Use the DisableValidationOnConstruction property to disable validation logic.")]
    public IValidator GetFirstValidatorForType<T>()
    Returns
    Type Description
    IValidator

    A validator for T, or null if no validator for T can be found.

    Type Parameters
    Name Description
    T