| | |
| | | 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); |
| | | |
| | |
| | | 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(); |