Search Results for

    Show / Hide Table of Contents

    Method SetRequiredKeys

    | Improve this Doc View Source

    SetRequiredKeys(String[])

    Sets the required keys by means of a string collection.

    Declaration
    public IEnvValidator SetRequiredKeys(params string[] keys)
    Parameters
    Type Name Description
    String[] keys

    The required keys to set.

    Returns
    Type Description
    IEnvValidator

    An instance implementing the fluent interface.

    Implements
    IEnvValidator.SetRequiredKeys(String[])
    Exceptions
    Type Condition
    ArgumentNullException

    keys is null.

    ArgumentException

    The length of the keys list is zero.

    | Improve this Doc View Source

    SetRequiredKeys<TKeys>()

    Sets the required keys by means of the properties of a class or struct.

    Declaration
    public IEnvValidator SetRequiredKeys<TKeys>()
    Returns
    Type Description
    IEnvValidator

    An instance implementing the fluent interface.

    Type Parameters
    Name Description
    TKeys

    The type with the required keys.

    Implements
    IEnvValidator.SetRequiredKeys<TKeys>()
    | Improve this Doc View Source

    SetRequiredKeys(Type)

    Sets the required keys by means of the properties of a class or struct.

    Declaration
    public IEnvValidator SetRequiredKeys(Type keysType)
    Parameters
    Type Name Description
    Type keysType

    The type with the required keys.

    Returns
    Type Description
    IEnvValidator

    An instance implementing the fluent interface.

    Implements
    IEnvValidator.SetRequiredKeys(Type)
    Exceptions
    Type Condition
    ArgumentNullException

    keysType is null.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright ©2021 DotEnv.Core