Table of Contents

Class MonitoredOptions<TOptions>

Namespace
Acuit.Pinpoint.Configuration.Options
Assembly
Acuit.Pinpoint.Configuration.dll

Provides a TOptions options instance, monitoring it for changes.

public class MonitoredOptions<TOptions> : IMonitoredOptions<TOptions>, IDisposable where TOptions : class, new()

Type Parameters

TOptions

The options instance type.

Inheritance
MonitoredOptions<TOptions>
Implements
Inherited Members

Constructors

MonitoredOptions(IConfiguration)

Initializes a new instance of the MonitoredOptions<TOptions> class.

public MonitoredOptions(IConfiguration configuration)

Parameters

configuration IConfiguration

The configuration from which to load the options.

Properties

CurrentValue

Gets the current value of the options.

public TOptions CurrentValue { get; }

Property Value

TOptions

Remarks

See CurrentValue for more information.

IsConfigured

Gets whether the options are configured.

public bool IsConfigured { get; }

Property Value

bool

LoadError

Gets the error if the options could not be loaded, or null if there was no error.

public Exception LoadError { get; }

Property Value

Exception

Methods

Dispose()

Closes and releases all resources used by the object.

public void Dispose()

Dispose(bool)

Closes and releases all resources used by the MonitoredOptions<TOptions>.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

true when this is in response to a call to Dispose().

Remarks

Derived classes should override this when they have any resources that should be disposed.

Events

Reloaded

Occurs when the options are reloaded.

public event EventHandler Reloaded

Event Type

EventHandler