Show / Hide Table of Contents

    Class DataAnnotationsValidator

    Class that represents a helper for dana annotations validator.

    Inheritance
    System.Object
    DataAnnotationsValidator
    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: Fibula.Common.Utilities
    Assembly: Fibula.Common.Utilities.dll
    Syntax
    public static class DataAnnotationsValidator

    Methods

    | Improve this Doc View Source

    TryValidateObject(Object, out IList<ValidationResult>, IDictionary<Object, Object>)

    Performs validation on an object and all of it's primitive properties.

    Declaration
    public static bool TryValidateObject(object obj, out IList<ValidationResult> results, IDictionary<object, object> validationContextItems = null)
    Parameters
    Type Name Description
    System.Object obj

    The object to validate.

    System.Collections.Generic.IList<System.ComponentModel.DataAnnotations.ValidationResult> results

    The results of the validation.

    System.Collections.Generic.IDictionary<System.Object, System.Object> validationContextItems

    Auxiliary items to initialize validation context with.

    Returns
    Type Description
    System.Boolean

    True if the validation passes, false otherwise.

    | Improve this Doc View Source

    TryValidateObjectRecursive<T>(T, out IList<ValidationResult>, IDictionary<Object, Object>)

    Performs validation on an object and all of it's properties, recursing into any non-primitive properties.

    Declaration
    public static bool TryValidateObjectRecursive<T>(T obj, out IList<ValidationResult> results, IDictionary<object, object> validationContextItems = null)
    Parameters
    Type Name Description
    T obj

    The object to validate.

    System.Collections.Generic.IList<System.ComponentModel.DataAnnotations.ValidationResult> results

    The results of the validation.

    System.Collections.Generic.IDictionary<System.Object, System.Object> validationContextItems

    Auxiliary items to initialize validation context with.

    Returns
    Type Description
    System.Boolean

    True if the validation passes, false otherwise.

    Type Parameters
    Name Description
    T

    The type of object.

    | Improve this Doc View Source

    ValidateObjectRecursive<T>(T, IDictionary<Object, Object>)

    Performs validation on an object and all of it's properties, recursing into any non-primitive properties.

    Declaration
    public static void ValidateObjectRecursive<T>(T obj, IDictionary<object, object> validationContextItems = null)
    Parameters
    Type Name Description
    T obj

    The object to validate.

    System.Collections.Generic.IDictionary<System.Object, System.Object> validationContextItems

    Auxiliary items to initialize validation context with.

    Type Parameters
    Name Description
    T

    The type of object.

    • Improve this Doc
    • View Source
    Back to top Copyright © 2018-2020 | The Fibula Project
    Generated using DocFX | Jose L. Nuñez de Caceres et al.