云库增加 AI识图,缓存,我的云库收藏增加安全标志
调用外部API 扣费
This commit is contained in:
1 parent
7c29e57623
commit
150e8644b7
49 files changed
+1069
-28
No files matched your search
@@ -37,3 +37,20 @@ public sealed class PluginContext : IDisposable
|
||||
(Configuration as IDisposable)?.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>按插件类型注入的上下文视图,配置及其生命周期由宿主的 PluginContext 统一管理。</summary>
|
||||
public sealed class PluginContext<TPlugin>(PluginContext context) where TPlugin : IPlugin
|
||||
{
|
||||
/// <summary>插件唯一标识。</summary>
|
||||
public string Id => context.Id;
|
||||
/// <summary>插件程序集和配置所在目录。</summary>
|
||||
public string DirectoryPath => context.DirectoryPath;
|
||||
/// <summary>当前宿主环境。</summary>
|
||||
public IHostEnvironment Environment => context.Environment;
|
||||
/// <summary>与插件入口共享的独立配置实例。</summary>
|
||||
public IConfigurationRoot Configuration => context.Configuration;
|
||||
|
||||
/// <summary>读取必填配置,缺失时沿用插件上下文的错误说明。</summary>
|
||||
public string RequireConfiguration(string key) => context.RequireConfiguration(key);
|
||||
}
|
||||
Reference in new issue
Block a user