using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; using SlnMesnac.Common; using SlnMesnac.Plc.Impl; using System; using System.Collections.Generic; using System.Text; namespace SlnMesnac.Plc { public static class PlcSetup { public static void AddPlcSetup(this IServiceCollection services) { services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); } public static IApplicationBuilder UsePlcExtensions(this IApplicationBuilder app) { var plcPool = app.ApplicationServices.GetService(); plcPool.Init(); return app; } } }