Search Results for

    Show / Hide Table of Contents

    Class ServiceCollectionExtensions

    Inheritance
    Object
    ServiceCollectionExtensions
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Microsoft.Extensions.DependencyInjection
    Assembly: DotEnv.Core.Extensions.Microsoft.DependencyInjection.dll
    Syntax
    public static class ServiceCollectionExtensions

    Methods

    Name Description
    AddCustomEnv(IServiceCollection, String, String)

    Adds the environment vars based on the environment (development, test, staging or production). This registers IEnvReader as a singleton and calls the LoadEnv() method.

    AddCustomEnv<TSettings>(IServiceCollection, String, String)

    Adds the environment vars based on the environment (development, test, staging or production). This registers TSettings as a singleton and calls the LoadEnv() method.

    AddDotEnv(IServiceCollection)

    Adds the environment vars using a service. This registers IEnvReader as a singleton and calls the Load() method.

    AddDotEnv(IServiceCollection, String[])

    Adds the environment vars using a service. This registers IEnvReader as a singleton and calls the Load() method.

    AddDotEnv<TSettings>(IServiceCollection)

    Adds the environment vars using a service. This registers TSettings as a singleton and calls the Load() method.

    AddDotEnv<TSettings>(IServiceCollection, String[])

    Adds the environment vars using a service. This registers TSettings as a singleton and calls the Load() method.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright 2022-2023 DotEnv.Core