Table of Contents

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

IFileProvider

OnLoadException

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

public Action<FileLoadExceptionContext> OnLoadException { get; set; }

Property Value

Action<FileLoadExceptionContext>

Optional

Determines if loading the file is optional.

public bool Optional { get; set; }

Property Value

bool

Path

The path to the file.

public string Path { get; set; }

Property Value

string

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

int

ReloadOnChange

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

public bool ReloadOnChange { get; set; }

Property Value

bool

Methods

Build(IConfigurationBuilder)

Builds the IConfigurationProvider for this source.

public abstract IConfigurationProvider Build(IConfigurationBuilder builder)

Parameters

builder IConfigurationBuilder

The IConfigurationBuilder.

Returns

IConfigurationProvider

A IConfigurationProvider

EnsureDefaults(IConfigurationBuilder)

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

public void EnsureDefaults(IConfigurationBuilder builder)

Parameters

builder IConfigurationBuilder

The 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()