using HybirdFrameworkCore.Autofac.Attribute; using Newtonsoft.Json; using Service.Cloud.Client; using Service.Cloud.Common; using Service.Cloud.Msg.Cloud.Req; using Service.Cloud.Msg.Host.Resp; using Service.Init; namespace Service.Cloud.Handler; [Scope("InstancePerDependency")] public class ServiceableStateHandler:IBaseHandler { public bool CanHandle(string cmd) { return CloudConst.setServiceRes == cmd; } public void Handle(string t) { ServiceableState? req = JsonConvert.DeserializeObject(t); if (req != null) { StaticStationInfo.StationStatus = req.st; ServiceableStateResp resp = new ServiceableStateResp(); CloudClientMgr.CloudClient?.Publish(resp); } } }