Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

FileConfigurationSource Class

Definition

Namespace:
Microsoft.Extensions.Configuration
Assembly:
Microsoft.Extensions.Configuration.FileExtensions.dll
Package:
Microsoft.Extensions.Configuration.FileExtensions v11.0.0-preview.5.26302.115
Source:
FileConfigurationSource.cs
Source:
FileConfigurationSource.cs
Source:
FileConfigurationSource.cs
Source:
FileConfigurationSource.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Provides the base class for file-based IConfigurationSource.

public ref class FileConfigurationSource abstract : Microsoft::Extensions::Configuration::IConfigurationSource
public abstract class FileConfigurationSource : Microsoft.Extensions.Configuration.IConfigurationSource
type FileConfigurationSource = class
 interface IConfigurationSource
Public MustInherit Class FileConfigurationSource
Implements IConfigurationSource
Inheritance
FileConfigurationSource
Derived
Implements

Constructors

Name Description
FileConfigurationSource()

Initializes a new instance of FileConfigurationSource.

Properties

Name Description
FileProvider

Gets or sets the provider used to access the contents of the file.

OnLoadException

Gets or sets the action that's called if an uncaught exception occurs in FileConfigurationProvider.Load.

Optional

Gets or sets a value that indicates whether loading the file is optional.

Path

Gets or sets the path to the file.

ReloadDelay

Gets or sets the number of milliseconds that reload will wait before calling Load.

ReloadOnChange

Gets or sets a value that indicates whether the source will be loaded if the underlying file changes.

Methods

Name Description
Build(IConfigurationBuilder)

Builds the IConfigurationProvider for this source.

EnsureDefaults(IConfigurationBuilder)

Called to use any default settings on the builder like the FileProvider or FileLoadExceptionHandler.

ResolveFileProvider()

Creates a physical file provider for the file's directory if no file provider has been set, for absolute Path.

Applies to


Feedback

Was this page helpful?