From 880766ff5ccc98f1def11cd3c6e15e860f143ada Mon Sep 17 00:00:00 2001 From: yanjinhui <3306209981@qq.com> Date: 星期五, 28 二月 2025 14:51:41 +0800 Subject: [PATCH] 扭矩 --- 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/Program.cs | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/Program.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/Program.cs" index 694b64e..92ffe97 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/Program.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/Program.cs" @@ -23,7 +23,6 @@ using Microsoft.AspNetCore.Builder; using WIDESEA_SerialPortService; using WIDESEA_ISerialPortService; -using WIDESEA_SerialPortTestService; var builder = WebApplication.CreateBuilder(args); @@ -86,11 +85,11 @@ builder.Services.AddSingleton<ISerialPortService, SerialPortService>(); // 注册 SerialPortTestService,并注入 ISerialPortService -builder.Services.AddSingleton<SerialPortTestService>(sp => -{ - var serialPortService = sp.GetRequiredService<ISerialPortService>(); - return new SerialPortTestService("COM3", serialPortService); -}); +//builder.Services.AddSingleton<SerialPortTestJob>(sp => +//{ +// var serialPortService = sp.GetRequiredService<ISerialPortService>(); +// return new SerialPortTestJob("COM3", serialPortService); +//}); //// 注入 SerialPortService //builder.Services.AddScoped<ISerialPortService, SerialPortService>(); -- Gitblit v1.9.3