OptionsMonitor<TOptions> 類別
定義
IOptionsMonitor<TOptions> 的實作。Implementation of IOptionsMonitor<TOptions>.
generic <typename TOptions>
where TOptions : class, gcnew()public ref class OptionsMonitor : IDisposable, Microsoft::Extensions::Options::IOptionsMonitor<TOptions>
public class OptionsMonitor<TOptions> : IDisposable, Microsoft.Extensions.Options.IOptionsMonitor<TOptions> where TOptions : class, new()
type OptionsMonitor<'Options (requires 'Options : null and 'Options : (new : unit -> 'Options))> = class
interface IOptionsMonitor<'Options (requires 'Options : null and 'Options : (new : unit -> 'Options))>
interface IDisposable
Public Class OptionsMonitor(Of TOptions)
Implements IDisposable, IOptionsMonitor(Of TOptions)
類型參數
- TOptions
選項類型。Options type.
- 繼承
-
OptionsMonitor<TOptions>
- 實作
建構函式
屬性
CurrentValue |
選項目前的值。The present value of the options. |
方法
Dispose() |
移除所有變更註冊訂閱。Removes all change registration subscriptions. |
Equals(Object) |
判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object. (繼承來源 Object) |
Get(String) |
傳回設定後的 |
GetHashCode() |
作為預設雜湊函數。Serves as the default hash function. (繼承來源 Object) |
GetType() |
取得目前執行個體的 Type。Gets the Type of the current instance. (繼承來源 Object) |
MemberwiseClone() |
建立目前 Object 的淺層複製。Creates a shallow copy of the current Object. (繼承來源 Object) |
OnChange(Action<TOptions,String>) |
註冊每當 |
OnChange(Action<TOptions>) |
註冊每當 TOptions 變更時要呼叫的接聽程式。Registers a listener to be called whenever TOptions changes. |
ToString() |
傳回代表目前物件的字串。Returns a string that represents the current object. (繼承來源 Object) |
擴充方法
OnChange<TOptions>(IOptionsMonitor<TOptions>, Action<TOptions>) |
註冊每當 |