You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
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 ();
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 数据有效时间。单位秒
|
|
|
|
|
/// </summary>
|
|
|
|
|
static int DataTimeSeconds = 20;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 数据刷新时间
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static DateTime DataValidityTime = DateTime.Now;
|
|
|
|
|
|
|
|
|
|
public static void UpsInit()
|
|
|
|
|
{
|
|
|
|
|
if (FireClient == null)
|
|
|
|
|
{
|
|
|
|
|
FireClient = AppInfo.Container.Resolve<FireClient>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Task.Run(() => FireClient.Connect());
|
|
|
|
|
}
|
|
|
|
|
}
|