private void SendMessageToMote(Object msg) { try { mote.Send((byte[])msg); } catch (Exception e) { RaiseEventMoteDC(e.Message); } }
public static bool StringBuilder(MessageSource src, object?result) { if (result is not StringBuilder res || res.Length <= 0) { return(false); } src.Send(res.ToString()); return(true); }
public static bool String(MessageSource src, object?result) { string?res = result as string; if (string.IsNullOrEmpty(res)) { return(false); } src.Send(res); return(true); }