IOptionsMonitor<TOptions> 介面

定義

TOptions 執行個體變更時用於通知。Used for notifications when TOptions instances change.

generic <typename TOptions>
public interface class IOptionsMonitor
public interface IOptionsMonitor<out TOptions>
type IOptionsMonitor<'Options> = interface
Public Interface IOptionsMonitor(Of Out TOptions)

類型參數

TOptions

選項類型。The options type.

衍生

屬性

CurrentValue

傳回目前的 TOptions 執行個體,其具備 DefaultNameReturns the current TOptions instance with the DefaultName.

方法

Get(String)

傳回具備指定名稱的已設定 TOptions 執行個體。Returns a configured TOptions instance with the given name.

OnChange(Action<TOptions,String>)

註冊每當具名 TOptions 變更時,要呼叫的接聽程式。Registers a listener to be called whenever a named TOptions changes.

OnChange(Action<TOptions>)

註冊每當 TOptions 變更時要呼叫的接聽程式。Registers a listener to be called whenever TOptions changes.

擴充方法

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

註冊每當 TOptions 變更時要呼叫的接聽程式。Registers a listener to be called whenever TOptions changes.

適用於