FileConfigurationExtensions Class

Extension methods for Microsoft.Extensions.Configuration.FileConfigurationProvider.

Namespace
Microsoft.Extensions.Configuration
Assemblies
  • Microsoft.Extensions.Configuration.FileExtensions

Syntax

public class FileConfigurationExtensions
class Microsoft.Extensions.Configuration.FileConfigurationExtensions

Methods

GetFileProvider(Microsoft.Extensions.Configuration.IConfigurationBuilder)

Gets the default Microsoft.Extensions.FileProviders.IFileProvider to be used for file-based providers.

Arguments:builder (Microsoft.Extensions.Configuration.IConfigurationBuilder) – The Microsoft.Extensions.Configuration.IConfigurationBuilder.
Return type:Microsoft.Extensions.FileProviders.IFileProvider
Returns:The Microsoft.Extensions.Configuration.IConfigurationBuilder.
public static IFileProvider GetFileProvider(this IConfigurationBuilder builder)
SetBasePath(Microsoft.Extensions.Configuration.IConfigurationBuilder, System.String)

Sets the FileProvider for file-based providers to a PhysicalFileProvider with the base path.

Arguments:
Return type:

Microsoft.Extensions.Configuration.IConfigurationBuilder

Returns:

The Microsoft.Extensions.Configuration.IConfigurationBuilder.

public static IConfigurationBuilder SetBasePath(this IConfigurationBuilder builder, string basePath)
SetFileProvider(Microsoft.Extensions.Configuration.IConfigurationBuilder, Microsoft.Extensions.FileProviders.IFileProvider)

Sets the default Microsoft.Extensions.FileProviders.IFileProvider to be used for file-based providers.

Arguments:
Return type:

Microsoft.Extensions.Configuration.IConfigurationBuilder

Returns:

The Microsoft.Extensions.Configuration.IConfigurationBuilder.

public static IConfigurationBuilder SetFileProvider(this IConfigurationBuilder builder, IFileProvider fileProvider)