using Autofac; using HybirdFrameworkCore.Autofac; using HybirdFrameworkCore.Autofac.Attribute; using Service.Fire.Msg; namespace Service.Fire.Client; [Scope] public class FireMgr { public static FireClient? FireClient; public static readonly FaultMsg FaultMsg = new (); public static readonly FireMsg FireMsg = new (); /// /// 数据有效时间。单位秒 /// static int DataTimeSeconds = 20; /// /// 数据刷新时间 /// public static DateTime DataValidityTime = DateTime.Now; public static void UpsInit() { if (FireClient == null) { FireClient = AppInfo.Container.Resolve(); } Task.Run(() => FireClient.Connect()); } }