/// <summary> /// Posts the specified request. /// </summary> /// <param name="request">The request.</param> public Task Post(SendMessageCommand request) { var command = new MessageCommand { Header = string.IsNullOrEmpty(request.Header) ? "Message from Server" : request.Header, TimeoutMs = request.TimeoutMs, Text = request.Text }; return(_sessionManager.SendMessageCommand(GetSession(_sessionContext).Id, request.Id, command, CancellationToken.None)); }
/// <summary> /// Posts the specified request. /// </summary> /// <param name="request">The request.</param> public void Post(SendMessageCommand request) { var command = new MessageCommand { Header = string.IsNullOrEmpty(request.Header) ? "Message from Server" : request.Header, TimeoutMs = request.TimeoutMs, Text = request.Text }; var task = _sessionManager.SendMessageCommand(GetSession(_sessionContext).Result.Id, request.Id, command, CancellationToken.None); Task.WaitAll(task); }