Прочитај на енглеском

Делите путем


FileConfigurationExtensions Class

Definition

Provides extension methods for FileConfigurationProvider.

C#
public static class FileConfigurationExtensions
Inheritance
FileConfigurationExtensions

Remarks

For more information and examples, see File configuration provider.

Methods

GetFileLoadExceptionHandler(IConfigurationBuilder)

Gets a default action to be invoked for file-based providers when an error occurs.

GetFileProvider(IConfigurationBuilder)

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

SetBasePath(IConfigurationBuilder, String)

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

SetFileLoadExceptionHandler(IConfigurationBuilder, Action<FileLoadExceptionContext>)

Sets a default action to be invoked for file-based providers when an error occurs.

SetFileProvider(IConfigurationBuilder, IFileProvider)

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

Applies to

Производ Верзије
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)