static void Main(string[] args) { ConnectMqtt connect = new ConnectMqtt(); PublishInfo pubInfo = new PublishInfo(); ConfigXMLReader runXml = new ConfigXMLReader(); signalHandler += HandleConsoleSignal; ConsoleHelper.SetSignalHandler(signalHandler, true); connect.MqttConnect(runXml.XMLReader()); //pubInfo.PublishMessage(); class for sending message on Mqtt broker server for choosen topic Console.ReadKey(); }
private static void HandleConsoleSignal(ConsoleSignal consoleSignal) { ConnectMqtt connect = new ConnectMqtt(); connect.DisconnectMqtt(); }