using Microsoft.Extensions.DependencyInjection;
using Seyounth.Auto.Hs.Runtime.Balances;
using Seyounth.Auto.Hs.Runtime.Handlers;
using Seyounth.Auto.Hs.Runtime.Plc;
using Seyounth.Auto.Hs.Runtime.Printer;
using Seyounth.Auto.Hs.Runtime.Scanner;
namespace Seyounth.Auto.Hs.Runtime;
public static class HsExtensions
{
///
/// 添加HS手动包装服务
///
///
/// 报警信息处理器
/// 纸箱称重处理器
/// 丝锭称重处理器
///
public static IServiceCollection AddHs(
this IServiceCollection services)
where TOnWarningHandler : OnWarningHandler
where TWeighBoxRequestHandler : WeighSpindleRequestHandler
where TWeighSpindleRequestHandler : WeighSpindleRequestHandler
{
services.AddSingleton();
services.AddSingleton();
services.AddSingleton();
services.AddSingleton();
services.AddSingleton();
services.AddHostedService();
services.AddHostedService();
return services;
}
}