protected void SendMessage(object message, string stateKey = null) { if (Executor.Current.IsOffline) return; this.sendAction?.Invoke(message); if (!string.IsNullOrEmpty(stateKey)) { lock (this.lastState) this.lastState[stateKey] = message; } }