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
-
IMonitoredOptions<TOptions>
- Inherited Members
Constructors
MonitoredOptions(IConfiguration)
Initializes a new instance of the MonitoredOptions<TOptions> class.
public MonitoredOptions(IConfiguration configuration)
Parameters
configuration
IConfigurationThe 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
LoadError
Gets the error if the options could not be loaded, or null if there was no error.
public Exception LoadError { get; }
Property Value
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
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