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