แชร์ผ่าน


OptionsMonitor<TOptions> Class

Definition

Implementation of IOptionsMonitor<TOptions>.

generic <typename TOptions>
 where TOptions : classpublic ref class OptionsMonitor : IDisposable, Microsoft::Extensions::Options::IOptionsMonitor<TOptions>
public class OptionsMonitor<TOptions> : IDisposable, Microsoft.Extensions.Options.IOptionsMonitor<TOptions> where TOptions : class
type OptionsMonitor<'Options (requires 'Options : null)> = class
    interface IOptionsMonitor<'Options (requires 'Options : null)>
    interface IDisposable
Public Class OptionsMonitor(Of TOptions)
Implements IDisposable, IOptionsMonitor(Of TOptions)

Type Parameters

TOptions

Options type.

Inheritance
OptionsMonitor<TOptions>
Implements

Constructors

OptionsMonitor<TOptions>(IOptionsFactory<TOptions>, IEnumerable<IOptionsChangeTokenSource<TOptions>>, IOptionsMonitorCache<TOptions>)

Constructor.

Properties

CurrentValue

The present value of the options, equivalent to Get(Options.DefaultName).

Methods

Dispose()

Removes all change registration subscriptions.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
Get(String)

Returns a configured TOptions instance with the given name.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
OnChange(Action<TOptions,String>)

Registers a listener to be called whenever TOptions changes.

ToString()

Returns a string that represents the current object.

(Inherited from Object)

Extension Methods

OnChange<TOptions>(IOptionsMonitor<TOptions>, Action<TOptions>)

Registers a listener to be called whenever TOptions changes.

Applies to