public ResponseWithHeaders <QueueGetPropertiesHeaders> GetProperties(int?timeout = null, CancellationToken cancellationToken = default) { using var message = CreateGetPropertiesRequest(timeout); _pipeline.Send(message, cancellationToken); var headers = new QueueGetPropertiesHeaders(message.Response); switch (message.Response.Status) { case 200: return(ResponseWithHeaders.FromValue(headers, message.Response)); default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } }
public async Task <ResponseWithHeaders <QueueGetPropertiesHeaders> > GetPropertiesAsync(int?timeout = null, CancellationToken cancellationToken = default) { using var message = CreateGetPropertiesRequest(timeout); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new QueueGetPropertiesHeaders(message.Response); switch (message.Response.Status) { case 200: return(ResponseWithHeaders.FromValue(headers, message.Response)); default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } }