IOptionsMonitorCache<TOptions> 接口
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
用于 IOptionsMonitor<TOptions> 缓存 TOptions 实例。
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
要请求的选项的类型。
- 派生
方法
| 名称 | 说明 |
|---|---|
| Clear() |
清除缓存中的所有选项实例。 |
| GetOrAdd(String, Func<TOptions>) |
获取命名选项实例,或添加使用 |
| TryAdd(String, TOptions) |
尝试向缓存添加新选项。 |
| TryRemove(String) |
尝试删除选项实例。 |