source/R5T.D0062.D0063/Code/Extensions/IServiceCollectionExtensions.cs
/// <summary>
/// Adds the <see cref="AspNetCoreEnvironmentVariableEnvironmentNameProvider"/> implementation of <see cref="IEnvironmentNameProvider"/> as a <see cref="ServiceLifetime.Singleton"/>.
/// </summary>
Adds the  implementation of  as a .
Adds the implementation of as a .
public static IServiceCollection AddAspNetCoreEnvironmentVariableEnvironmentNameProvider(this IServiceCollection services,
            IServiceAction<IDefaultEnvironmentNameProvider> defaultEnvironmentNameProviderAction,
            IServiceAction<IEnvironmentVariableProvider> environmentVariableProviderAction)
        {
            services
                .AddSingleton<IEnvironmentNameProvider, AspNetCoreEnvironmentVariableEnvironmentNameProvider>()
                .Run(defaultEnvironmentNameProviderAction)
                .Run(environmentVariableProviderAction)
                ;
            return services;
        }
public static IServiceCollection AddAspNetCoreEnvironmentVariableEnvironmentNameProvider ( this IServiceCollection services , IServiceAction < IDefaultEnvironmentNameProvider > defaultEnvironmentNameProviderAction , IServiceAction < IEnvironmentVariableProvider > environmentVariableProviderAction ) { services . AddSingleton < IEnvironmentNameProvider , AspNetCoreEnvironmentVariableEnvironmentNameProvider > ( ) . Run ( defaultEnvironmentNameProviderAction ) . Run ( environmentVariableProviderAction ) ; return services ; }
Adds the  implementation of  as a .
Adds the implementation of as a .
IServiceCollection
this
defaultEnvironmentNameProviderAction
IServiceAction<IDefaultEnvironmentNameProvider>
environmentVariableProviderAction
IServiceAction<IEnvironmentVariableProvider>