初步完成变更新
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using DMS.Application.Interfaces;
|
||||
using DMS.Infrastructure.Configuration;
|
||||
using DMS.Infrastructure.Interfaces.Services;
|
||||
using DMS.Infrastructure.Services;
|
||||
@@ -15,7 +16,18 @@ namespace DMS.Infrastructure.Extensions
|
||||
/// </summary>
|
||||
public static IServiceCollection AddOpcUaServices(this IServiceCollection services)
|
||||
{
|
||||
|
||||
// 注册配置选项
|
||||
services.Configure<OpcUaServiceOptions>(
|
||||
options => {
|
||||
// 可以从配置文件或其他来源加载配置
|
||||
});
|
||||
|
||||
// 注册服务
|
||||
services.AddSingleton<IOpcUaServiceManager, OpcUaServiceManager>();
|
||||
|
||||
// 注册后台服务
|
||||
services.AddHostedService<OptimizedOpcUaBackgroundService>();
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user