Search Results for

    Show / Hide Table of Contents

    Class PropertyValidationResult

    The result that must be returned from a custom validation delegate tha matches the PropertyValidationDelegate<TValue> delegate.

    Inheritance
    Object
    PropertyValidationResult
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: BionicCode.Utilities.Net
    Assembly: BionicCode.Utilities.Net.Common.dll
    Syntax
    public class PropertyValidationResult

    Constructors

    | Improve this Doc View Source

    PropertyValidationResult(Boolean, IEnumerable<Object>)

    Constructor.

    Declaration
    public PropertyValidationResult(bool isValid, IEnumerable<object> errorMessages)
    Parameters
    Type Name Description
    Boolean isValid

    true when the validation has successfully passed. false when the validation has failed.

    IEnumerable<Object> errorMessages

    A collection of error messasge objects that can be displayed in the UI. It's expected that the client will generate one message for each validation error of the currently validated property.

    | Improve this Doc View Source

    PropertyValidationResult(Boolean, Object)

    Constructor.

    Declaration
    public PropertyValidationResult(bool isValid, object errorMessage)
    Parameters
    Type Name Description
    Boolean isValid

    true when the validation has successfully passed. false when the validation has failed.

    Object errorMessage

    An error messasge object that can be displayed in the UI.

    Properties

    | Improve this Doc View Source

    ErrorMessages

    A collection of error message objects.

    Declaration
    public IEnumerable<object> ErrorMessages { get; }
    Property Value
    Type Description
    IEnumerable<Object>

    It usually contains one message for each property error.

    | Improve this Doc View Source

    IsValid

    Returns whether tha validation was successful or has failed.

    Declaration
    public bool IsValid { get; }
    Property Value
    Type Description
    Boolean

    true when the validation has successfully passed. false when the validation has failed.

    Methods

    | Improve this Doc View Source

    Deconstruct(out Boolean, out IEnumerable<Object>)

    Deconstructor.

    Declaration
    public void Deconstruct(out bool isValid, out IEnumerable<object> errorMessages)
    Parameters
    Type Name Description
    Boolean isValid
    IEnumerable<Object> errorMessages
    Remarks

    This deconstructor was mainly introduced to suppport backwards compatibility withlegacy versions where the delegate was returning a ValueTuple.

    Extension Methods

    HelperExtensionsCommon.ToDictionary(Object)
    HelperExtensionsCommon.ToFlatDictionary(Object)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX