IOptionsMonitor<TOptions> Interface¶
Used for notifications when TOptions instances change.
- Namespace
Microsoft.Extensions.Options
- Assemblies
- Microsoft.Extensions.Options
Syntax¶
public interface IOptionsMonitor<out TOptions>
-
interface
Microsoft.Extensions.Options.
IOptionsMonitor<TOptions>
¶
Properties¶
-
Microsoft.Extensions.Options.IOptionsMonitor<TOptions>.
CurrentValue
¶ Returns the current TOptions instance.
Return type: TOptions TOptions CurrentValue { get; }
-
Methods¶
-
OnChange
(System.Action<TOptions>)¶ Registers the listener to be called whenever TOptions changes.
Arguments: listener (System.Action<TOptions>) – The action to be invoked when TOptions has changed. Return type: System.IDisposable Returns: An IDisposable which should be disposed to stop listening for changes. IDisposable OnChange(Action<TOptions> listener)
-