Exemple #1
0
 public virtual Response <Provider> Register(ProviderRegistrationOptions properties = null, CancellationToken cancellationToken = default)
 {
     using var scope = _providerClientDiagnostics.CreateScope("Provider.Register");
     scope.Start();
     try
     {
         var response = _providerRestClient.Register(Id.SubscriptionId, Id.Provider, properties, cancellationToken);
         return(Response.FromValue(new Provider(Client, response.Value), response.GetRawResponse()));
     }
     catch (Exception e)
     {
         scope.Failed(e);
         throw;
     }
 }
 public virtual Response <ResourceProviderResource> Register(ProviderRegistrationContent content = null, CancellationToken cancellationToken = default)
 {
     using var scope = _resourceProviderProvidersClientDiagnostics.CreateScope("ResourceProviderResource.Register");
     scope.Start();
     try
     {
         var response = _resourceProviderProvidersRestClient.Register(Id.SubscriptionId, Id.Provider, content, cancellationToken);
         return(Response.FromValue(new ResourceProviderResource(Client, response.Value), response.GetRawResponse()));
     }
     catch (Exception e)
     {
         scope.Failed(e);
         throw;
     }
 }