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) |
尝试向缓存添加新选项,如果该名称已存在,则将返回 false。 |
| TryRemove(String) |
尝试删除选项实例。 |