Esempio n. 1
0
 public virtual Response <MsixPackage> Update(MsixPackageUpdateOptions options = null, CancellationToken cancellationToken = default)
 {
     using var scope = _msixPackageMSIXPackagesClientDiagnostics.CreateScope("MsixPackage.Update");
     scope.Start();
     try
     {
         var response = _msixPackageMSIXPackagesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options, cancellationToken);
         return(Response.FromValue(new MsixPackage(Client, response.Value), response.GetRawResponse()));
     }
     catch (Exception e)
     {
         scope.Failed(e);
         throw;
     }
 }
        public virtual Response <MsixPackageResource> Update(MsixPackagePatch patch, CancellationToken cancellationToken = default)
        {
            Argument.AssertNotNull(patch, nameof(patch));

            using var scope = _msixPackageMSIXPackagesClientDiagnostics.CreateScope("MsixPackageResource.Update");
            scope.Start();
            try
            {
                var response = _msixPackageMSIXPackagesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken);
                return(Response.FromValue(new MsixPackageResource(Client, response.Value), response.GetRawResponse()));
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }