private Task SendMessage(string key, object value) { TraceSend(key, value); var wrappedValue = new WrappedValue(value, _serializer); return(_messageBus.Send(_connectionId, key, wrappedValue).Catch()); }
private List <object> ProcessResults(IList <Message> source) { var messageValues = new List <object>(); foreach (var message in source) { if (SignalCommand.IsCommand(message)) { var command = WrappedValue.Unwrap <SignalCommand>(message.Value, _serializer); ProcessCommand(command); } else { messageValues.Add(WrappedValue.Unwrap(message.Value, _serializer)); } } return(messageValues); }