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 SetConfigurationParametersHandler : IBaseHandler { public bool CanHandle(string cmd) { return CloudConst.setStBaseInfo == cmd; } public void Handle(string t) { SetConfig? setConfigurationParameters = JsonConvert.DeserializeObject(t); if (setConfigurationParameters != null) { char chsoc = setConfigurationParameters.chsoc; StaticStationInfo.SwapSoc = chsoc.ToInt(); StaticStationInfo.Eid = setConfigurationParameters.eid; StaticStationInfo.Oid = setConfigurationParameters.oid; StaticStationInfo.Ceid = setConfigurationParameters.ceid; SetConfigRes resp = new SetConfigRes(); CloudClientMgr.CloudClient?.Publish(resp); } } }