/// <summary>
 /// 初始化一个<see cref="BingTemplateRenderer"/>类型的实例
 /// </summary>
 /// <param name="serviceScopeFactory">服务作用域工厂</param>
 /// <param name="templateDefinitionManager">模板定义管理器</param>
 /// <param name="options">文本模板选项配置</param>
 public BingTemplateRenderer(
     IServiceScopeFactory serviceScopeFactory,
     ITemplateDefinitionManager templateDefinitionManager,
     IOptions <BingTextTemplatingOptions> options)
 {
     ServiceScopeFactory       = serviceScopeFactory;
     TemplateDefinitionManager = templateDefinitionManager;
     Options = options.Value;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 初始化一个<see cref="TemplateContentProvider"/>类型的实例
 /// </summary>
 /// <param name="templateDefinitionManager">模板定义管理器</param>
 /// <param name="serviceScopeFactory">服务作用域工厂</param>
 /// <param name="options">文本模板选项配置</param>
 public TemplateContentProvider(
     ITemplateDefinitionManager templateDefinitionManager,
     IServiceScopeFactory serviceScopeFactory,
     IOptions <BingTextTemplatingOptions> options)
 {
     _templateDefinitionManager = templateDefinitionManager;
     ServiceScopeFactory        = serviceScopeFactory;
     Options = options.Value;
 }