Microsoft.Extensions.Configuration.FileExtensions by Microsoft

<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="5.0.0" />


Represents a base class for file based IConfigurationSource.
public IFileProvider FileProvider { get; set; }

Used to access the contents of the file.

Will be called if an uncaught exception occurs in FileConfigurationProvider.Load.

public bool Optional { get; set; }

Determines if loading the file is optional.

public string Path { get; set; }

The path to the file.

public int ReloadDelay { get; set; }

Number of milliseconds that reload will wait before calling Load. This helps avoid triggering reload before a file is completely written. Default is 250.

public bool ReloadOnChange { get; set; }

Determines whether the source will be loaded if the underlying file changes.

Builds the IConfigurationProvider for this source.

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

public void ResolveFileProvider()

If no file provider has been set, for absolute Path, this will creates a physical file provider for the nearest existing directory.