Class FileConfigurationSource
- Namespace
- Acuit.Pinpoint.Configuration
- Assembly
- Acuit.Pinpoint.Configuration.dll
Represents a base class for file based IConfigurationSource.
public abstract class FileConfigurationSource : IConfigurationSource
- Inheritance
-
FileConfigurationSource
- Implements
- Derived
- Inherited Members
Properties
FileProvider
Used to access the contents of the file.
public IFileProvider FileProvider { get; set; }
Property Value
OnLoadException
Will be called if an uncaught exception occurs in FileConfigurationProvider.Load.
public Action<FileLoadExceptionContext> OnLoadException { get; set; }
Property Value
Optional
Determines if loading the file is optional.
public bool Optional { get; set; }
Property Value
Path
The path to the file.
public string Path { get; set; }
Property Value
ReloadDelay
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 int ReloadDelay { get; set; }
Property Value
ReloadOnChange
Determines whether the source will be loaded if the underlying file changes.
public bool ReloadOnChange { get; set; }
Property Value
Methods
Build(IConfigurationBuilder)
Builds the IConfigurationProvider for this source.
public abstract IConfigurationProvider Build(IConfigurationBuilder builder)
Parameters
builder
IConfigurationBuilder
Returns
EnsureDefaults(IConfigurationBuilder)
Called to use any default settings on the builder like the FileProvider or FileLoadExceptionHandler.
public void EnsureDefaults(IConfigurationBuilder builder)
Parameters
builder
IConfigurationBuilder
ResolveFileProvider()
If no file provider has been set, for absolute Path, this will creates a physical file provider for the nearest existing directory.
public void ResolveFileProvider()