初步完成变更新

This commit is contained in:
2025-09-05 07:03:47 +08:00
parent d23c8bbd90
commit 831f342b2c
6 changed files with 141 additions and 6 deletions

View File

@@ -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;
}
}