public T SendMessage <T>(IYateMessageResponse <T> message) { var result = SendMessage(message.Name, message.Result, message.Parameters.ToArray()); return(message.ParseResponse(result, _serializer)); }
public async Task <T> SendMessageAsync <T>(IYateMessageResponse <T> message, CancellationToken cancellationToken) { var result = await SendMessageAsync(message.Name, message.Result, cancellationToken, message.Parameters.ToArray()).ConfigureAwait(false); return(message.ParseResponse(result, _serializer)); }