private void Cleanup()
 {
     UndoContext.Current.UndoAll();
     computeMgmtClient.Dispose();
     storageMgmtClient.Dispose();
     managementClient.Dispose();
 }
Пример #2
0
 protected virtual void Dispose(bool disposing)
 {
     if (!_disposed)
     {
         _client.Dispose();
         _disposed = true;
     }
 }
 public void Dispose()
 {
     if (!(_computeManagementClient is null))
     {
         _computeManagementClient.Dispose();
     }
     ;
 }
Пример #4
0
 public void Dispose()
 {
     if (_storageManagementClient != null)
     {
         _storageManagementClient.Dispose();
     }
     if (_computeManagementClient != null)
     {
         _computeManagementClient.Dispose();
     }
 }
Пример #5
0
 public void Dispose()
 {
     if (storageClient != null)
     {
         storageClient.Dispose();
     }
     if (computeClient != null)
     {
         computeClient.Dispose();
     }
 }
        private void Cleanup()
        {
            foreach (string profile in _profilesToCleanup)
            {
                try
                {
                    TrafficManagerClient.Profiles.Delete(profile);
                }
                catch { }
            }

            foreach (string service in _servicesToCleanup)
            {
                try
                {
                    ComputeManagementClient.HostedServices.Delete(service);
                }
                catch { }
            }

            foreach (string website in _websitesToCleanup)
            {
                try
                {
                    WebSiteDeleteParameters deleteParams = new WebSiteDeleteParameters();
                    deleteParams.DeleteEmptyServerFarm = true;
                    deleteParams.DeleteMetrics         = true;
                    deleteParams.DeleteAllSlots        = true;
                    WebsiteManagementClient.WebSites.Delete(WebSpaceName, website, deleteParams);
                }
                catch { }
            }

            TrafficManagerClient.Dispose();
            ComputeManagementClient.Dispose();
            ManagementClient.Dispose();
        }
Пример #7
0
 public void Dispose()
 {
     _computeManagementClient.Dispose();
 }