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