public AasxPluginResultBase ActivateAction(string action, params object[] args) { if (action == "server-stop") { AASMqttServer.MqttSeverStopAsync().Wait(); } if (action == "MQTTServer-start") { Log.Info("Starting Mqtt Server..."); // ReSharper disable EmptyGeneralCatchClause try { AASMqttServer.MqttSeverStartAsync().Wait(); } catch { } // ReSharper enable EmptyGeneralCatchClause // return as plain object var res = new AasxPluginResultBaseObject(); res.strType = "MqttServer"; res.obj = AASMqttServer; return(res); } return(null); }
public AasxPluginResultBase ActivateAction(string action, params object[] args) { if (action == "server-stop") { AASMqttServer.MqttSeverStopAsync().Wait(); } if (action == "MQTTServer-start") { Log.Info("Starting Mqtt Server..."); try { AASMqttServer.MqttSeverStartAsync().Wait(); } catch (Exception ex) { AdminShellNS.LogInternally.That.SilentlyIgnoredError(ex); } // return as plain object var res = new AasxPluginResultBaseObject(); res.strType = "MqttServer"; res.obj = AASMqttServer; return(res); } return(null); }