public virtual Response <TableService> Get(string tableServiceName, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("TableServiceContainer.Get"); scope.Start(); try { if (tableServiceName == null) { throw new ArgumentNullException(nameof(tableServiceName)); } var response = _restClient.GetServiceProperties(Id.ResourceGroupName, Id.Name, tableServiceName, cancellationToken: cancellationToken); if (response.Value == null) { throw _clientDiagnostics.CreateRequestFailedException(response.GetRawResponse()); } return(Response.FromValue(new TableService(Parent, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual Response <TableService> Get(CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("TableService.Get"); scope.Start(); try { var response = _tableServicesRestClient.GetServiceProperties(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); if (response.Value == null) { throw _clientDiagnostics.CreateRequestFailedException(response.GetRawResponse()); } return(Response.FromValue(new TableService(this, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }