Show / Hide Table of Contents

    Class Validate

    Class that provides extension methods for common validation operations.

    Inheritance
    System.Object
    Validate
    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 Validate

    Methods

    | Improve this Doc View Source

    ThrowIfDefaultValue<T>(T, String)

    Throws an System.ArgumentException if the analyzed variable has the default value for it's type.

    Declaration
    public static void ThrowIfDefaultValue<T>(this T o, string paramName = "")
    
        where T : IConvertible
    Parameters
    Type Name Description
    T o

    The variable to analyze.

    System.String paramName

    The parameter name to use.

    Type Parameters
    Name Description
    T

    The type of the System.IConvertible.

    | Improve this Doc View Source

    ThrowIfNull(Object, String)

    Throws an System.ArgumentNullException if the analyzed object reference is null.

    Declaration
    public static void ThrowIfNull(this object o, string paramName = "")
    Parameters
    Type Name Description
    System.Object o

    The object reference to analyze.

    System.String paramName

    The parameter name to use.

    | Improve this Doc View Source

    ThrowIfNullOrWhiteSpace(String, String)

    Throws am System.ArgumentNullException if the analyzed string is null or white space only.

    Declaration
    public static void ThrowIfNullOrWhiteSpace(this string str, string paramName = "")
    Parameters
    Type Name Description
    System.String str

    The string to analyze.

    System.String paramName

    The parameter name to use.

    • 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.