Class ApqCfgOptionsSnapshot<TOptions>
- Namespace
- Apq.Cfg.DependencyInjection
- Assembly
- Apq.Cfg.dll
支持每次请求重新绑定的 IOptionsSnapshot 实现
public sealed class ApqCfgOptionsSnapshot<TOptions> : IOptionsSnapshot<TOptions>, IOptions<TOptions> where TOptions : class, new()
Type Parameters
TOptions配置选项类型
- Inheritance
-
ApqCfgOptionsSnapshot<TOptions>
- Implements
-
IOptionsSnapshot<TOptions>IOptions<TOptions>
- Inherited Members
Constructors
ApqCfgOptionsSnapshot(ICfgRoot, string)
创建 ApqCfgOptionsSnapshot 实例
public ApqCfgOptionsSnapshot(ICfgRoot cfgRoot, string sectionKey)
Parameters
Properties
Value
The default configured TOptions instance
public TOptions Value { get; }
Property Value
- TOptions
Methods
Get(string?)
Returns a configured TOptions instance with the given name.
public TOptions Get(string? name)
Parameters
namestringThe name of the
TOptionsinstance, if null DefaultName is used.
Returns
- TOptions
The
TOptionsinstance that matches the givenname.