Search Results for

    Show / Hide Table of Contents

    Method Bind

    | Improve this Doc View Source

    Bind<TSettings>(out EnvValidationResult)

    Binds the instance of the environment variables provider to a new instance of type TSettings.

    Declaration
    TSettings Bind<TSettings>(out EnvValidationResult result)
        where TSettings : new()
    Parameters
    Type Name Description
    EnvValidationResult result

    The result contains the errors found by the binder.

    Returns
    Type Description
    TSettings

    The new instance of TSettings.

    Type Parameters
    Name Description
    TSettings

    The type of the new instance to bind.

    Remarks

    Binds only read-write properties and, moreover, only sets public properties.

    Exceptions
    Type Condition
    BinderException

    If the binder encounters one or more errors.

    | Improve this Doc View Source

    Bind<TSettings>()

    Binds the instance of the environment variables provider to a new instance of type TSettings.

    Declaration
    TSettings Bind<TSettings>()
        where TSettings : new()
    Returns
    Type Description
    TSettings

    The new instance of TSettings.

    Type Parameters
    Name Description
    TSettings

    The type of the new instance to bind.

    Remarks

    Binds only read-write properties and, moreover, only sets public properties.

    Exceptions
    Type Condition
    BinderException

    If the binder encounters one or more errors.

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