using Blue; public class MQTTCommand : ICommand { private IMQTTService mQTTService; private string topic; private string message; public MQTTCommand(string topic,string message) { this.topic = topic; this.message = message; } public void OnExcute() { if(mQTTService==null) { mQTTService = this.GetService(); } mQTTService.Publish(topic,message); } }