From 737dec3c384f394fd6f9849b4480b697d1ba35d5 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期二, 17 三月 2026 09:16:44 +0800
Subject: [PATCH] chore: 提交所有当前改动

---
 Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Program.cs |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Program.cs b/Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Program.cs
index 696008f..7ca0d53 100644
--- a/Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Program.cs
+++ b/Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Program.cs
@@ -4,6 +4,8 @@
 using WIDESEAWCS_S7Simulator.Core.Memory;
 using WIDESEAWCS_S7Simulator.Core.Entities;
 using System.Text.Json.Serialization;
+using WIDESEAWCS_S7Simulator.Application.Protocol;
+using WIDESEAWCS_S7Simulator.Server.Services;
 
 var builder = WebApplication.CreateBuilder(args);
 
@@ -43,6 +45,13 @@
 var dataPath = Path.Combine(contentRoot, "Data");
 
 builder.Services.AddSingleton<IPersistenceService>(sp => new FilePersistenceService(dataPath));
+builder.Services.AddSingleton<IProtocolTemplateService>(sp => new FileProtocolTemplateService(dataPath));
+builder.Services.Configure<ProtocolMonitoringOptions>(builder.Configuration.GetSection("ProtocolMonitoring"));
+builder.Services.AddSingleton<MirrorAckProtocolHandler>();
+builder.Services.AddSingleton<IDeviceProtocolHandler, WcsLineProtocolHandler>();
+builder.Services.AddSingleton<IDeviceProtocolHandler, PlcLinkStackerProtocolHandler>();
+builder.Services.AddSingleton<IDeviceProtocolHandler, StackerInteractionProtocolHandler>();
+builder.Services.AddHostedService<ProtocolMonitoringHostedService>();
 builder.Services.AddSingleton<IMemoryStore>(sp =>
 {
     var config = new MemoryRegionConfig();

--
Gitblit v1.9.3