/// <summary> /// Sends create channel operation to the service asynchronously. Use Operations collection to get operation's status. /// </summary> /// <param name="options"> Channel creation options </param> /// <returns>Task to wait on for operation sending completion.</returns> public Task <IOperation> SendCreateOperationAsync(ChannelCreationOptions options) { var response = CreateChannelAsync(options); return(response.ContinueWith(t => { t.ThrowIfFaulted(); string operationId = t.Result.Single().Headers[StreamingConstants.OperationIdHeader]; IOperation result = new OperationData { ErrorCode = null, ErrorMessage = null, Id = operationId, State = OperationState.InProgress.ToString(), }; return result; })); }