IOptionsMonitorCache<TOptions> 介面

定義

IOptionsMonitor<TOptions> 用來快取 TOptions 執行個體。Used by IOptionsMonitor<TOptions> to cache TOptions instances.

generic <typename TOptions>
 where TOptions : classpublic interface class IOptionsMonitorCache
public interface IOptionsMonitorCache<TOptions> where TOptions : class
type IOptionsMonitorCache<'Options (requires 'Options : null)> = interface
Public Interface IOptionsMonitorCache(Of TOptions)

類型參數

TOptions

要求的選項類型。The type of options being requested.

衍生

方法

Clear()

從快取清除所有選項執行個體。Clears all options instances from the cache.

GetOrAdd(String, Func<TOptions>)

取得具名選項執行個體,或使用 createOptions 新增所建立的新執行個體。Gets a named options instance, or adds a new instance created with createOptions.

TryAdd(String, TOptions)

嘗試將新選項新增至快取;若名稱已存在,將會傳回 false。Tries to adds a new option to the cache, will return false if the name already exists.

TryRemove(String)

嘗試移除選項執行個體。Try to remove an options instance.

適用於