SingletonOptionsMonitor<TOptions> Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides a singleton implementation of IOptionsMonitor<TOptions> that always returns the same options instance.
public class SingletonOptionsMonitor<TOptions> : Microsoft.Extensions.Options.IOptions<TOptions>, Microsoft.Extensions.Options.IOptionsMonitor<TOptions>, Microsoft.Extensions.Options.IOptionsSnapshot<TOptions> where TOptions : class
type SingletonOptionsMonitor<'Options (requires 'Options : null)> = class
interface IOptionsMonitor<'Options (requires 'Options : null)>
interface IOptionsSnapshot<'Options (requires 'Options : null)>
interface IOptions<'Options (requires 'Options : null)>
Public Class SingletonOptionsMonitor(Of TOptions)
Implements IOptions(Of TOptions), IOptionsMonitor(Of TOptions), IOptionsSnapshot(Of TOptions)
Type Parameters
- TOptions
The type of options being monitored.
- Inheritance
-
SingletonOptionsMonitor<TOptions>
- Implements
Constructors
| Name | Description |
|---|---|
| SingletonOptionsMonitor<TOptions>(TOptions) |
Provides a singleton implementation of IOptionsMonitor<TOptions> that always returns the same options instance. |
Properties
| Name | Description |
|---|---|
| CurrentValue |
Gets the current options value. |
| Value |
Gets the options value. |
Methods
| Name | Description |
|---|---|
| Get(String) |
Gets the options instance with the specified name. |
| OnChange(Action<TOptions,String>) |
Registers a change listener (no-op in this implementation). |