Table of Contents

RemoveConfigurationSource Method

Definition

Namespace
Cuemon.Extensions.Hosting
Assemblies
Cuemon.Extensions.Hosting.dll
Source
src/Cuemon.Extensions.Hosting/HostBuilderExtensions.cs

RemoveConfigurationSource(IHostBuilder, Func<IHostEnvironment, IConfigurationSource, bool>)

Provides a way to remove a source of the IConfigurationBuilder.

public static IHostBuilder RemoveConfigurationSource(this IHostBuilder hostBuilder, Func<IHostEnvironment, IConfigurationSource, bool> predicate)

Parameters

hostBuilder IHostBuilder

The IHostBuilder to extend.

predicate Func<IHostEnvironment, IConfigurationSource, bool>

The function delegate that will determine if a source should be removed from the Sources depending on the HostingEnvironment.

Returns

IHostBuilder

The same instance of the IHostBuilder for chaining.