using Autofac; using HybirdFrameworkCore.Autofac; using Service.Ups.UpsMsg; //using HslCommunication; namespace Service.Ups.Client; public class UpsMgr { public static UpsClient UpsClient; public static UpsInfoMsg UpsInfoMsg=new (); public static UpsAlarm UpsAlarm=new (); public static void Init() { if (UpsClient == null) { UpsClient = AppInfo.Container.Resolve(); } global::System.Threading.Tasks.Task.Run(() => UpsClient.Connect()); } }