using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; using SlnMesnac.Rfid.Factory; namespace SlnMesnac.Rfid { public static class RfidSetup { public static void AddRfidSetup(this IServiceCollection services) { services.AddSingleton(); services.AddSingleton(); } public static IApplicationBuilder UseRfidExtensions(this IApplicationBuilder app) { var pool = app.ApplicationServices.GetService(); pool.Init(); return app; } } }