Search Results for

    Show / Hide Table of Contents

    Class EnvValidator

    Represents the validator of the required keys.

    Inheritance
    Object
    EnvValidator
    Implements
    IEnvValidator
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: DotEnv.Core
    Assembly: DotEnv.Core.dll
    Syntax
    public class EnvValidator : IEnvValidator

    Constructors

    Name Description
    EnvValidator()

    Initializes a new instance of the EnvValidator class.

    EnvValidator(IEnvironmentVariablesProvider)

    Initializes a new instance of the EnvValidator class with environment variables provider.

    Methods

    Name Description
    IgnoreException()

    Disables/ignores RequiredKeysNotPresentException. This method tells the validator not to throw an exception when it encounters one or more errors.

    SetRequiredKeys(String[])

    Sets the required keys by means of a string collection.

    SetRequiredKeys(Type)

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

    SetRequiredKeys<TKeys>()

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

    Validate()

    Validates whether the required keys are present in the application.

    Validate(out EnvValidationResult)

    Validates whether the required keys are present in the application.

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