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: - builder (Microsoft.Extensions.Configuration.IConfigurationBuilder) – The
Microsoft.Extensions.Configuration.IConfigurationBuilder
to add to. - basePath (System.String) – The absolute path of file-based providers.
Return type: Returns: The
Microsoft.Extensions.Configuration.IConfigurationBuilder
.public static IConfigurationBuilder SetBasePath(this IConfigurationBuilder builder, string basePath)
- builder (Microsoft.Extensions.Configuration.IConfigurationBuilder) – The
-
SetFileProvider
(Microsoft.Extensions.Configuration.IConfigurationBuilder, Microsoft.Extensions.FileProviders.IFileProvider)¶ Sets the default
Microsoft.Extensions.FileProviders.IFileProvider
to be used for file-based providers.Arguments: - builder (Microsoft.Extensions.Configuration.IConfigurationBuilder) – The
Microsoft.Extensions.Configuration.IConfigurationBuilder
to add to. - fileProvider (Microsoft.Extensions.FileProviders.IFileProvider) – The default file provider instance.
Return type: Returns: The
Microsoft.Extensions.Configuration.IConfigurationBuilder
.public static IConfigurationBuilder SetFileProvider(this IConfigurationBuilder builder, IFileProvider fileProvider)
- builder (Microsoft.Extensions.Configuration.IConfigurationBuilder) – The
-