source/R5T.D0062.Chamavia/Code/Extensions/IServiceCollectionExtensions.cs
/// <summary>
/// Adds the <see cref="EnvironmentNameProvider"/> 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 AddEnvironmentNameProvider(this IServiceCollection services,
            IServiceAction<IConfiguration> configurationAction,
            IServiceAction<IDefaultEnvironmentNameProvider> defaultEnvironmentNameProviderAction,
            IServiceAction<IEnvironmentNameConfigurationKeyProvider> environmentNameConfigurationKeyProviderAction)
        {
            services.AddSingleton<IEnvironmentNameProvider, EnvironmentNameProvider>()
                .Run(configurationAction)
                .Run(defaultEnvironmentNameProviderAction)
                .Run(environmentNameConfigurationKeyProviderAction)
                ;
            return services;
        }
public static IServiceCollection AddEnvironmentNameProvider ( this IServiceCollection services , IServiceAction < IConfiguration > configurationAction , IServiceAction < IDefaultEnvironmentNameProvider > defaultEnvironmentNameProviderAction , IServiceAction < IEnvironmentNameConfigurationKeyProvider > environmentNameConfigurationKeyProviderAction ) { services . AddSingleton < IEnvironmentNameProvider , EnvironmentNameProvider > ( ) . Run ( configurationAction ) . Run ( defaultEnvironmentNameProviderAction ) . Run ( environmentNameConfigurationKeyProviderAction ) ; return services ; }
Adds the  implementation of  as a .
Adds the implementation of as a .
IServiceCollection
this
configurationAction
IServiceAction<IConfiguration>
defaultEnvironmentNameProviderAction
IServiceAction<IDefaultEnvironmentNameProvider>
environmentNameConfigurationKeyProviderAction
IServiceAction<IEnvironmentNameConfigurationKeyProvider>