Example #1
0
        public string SaveAzureVhdStop(Uri source, FileInfo localFilePath, int?numThreads, string storageKey, bool overwrite, int ms)
        {
            SaveAzureVhdCmdletInfo       saveAzureVhdCmdletInfo = new SaveAzureVhdCmdletInfo(source, localFilePath, numThreads, storageKey, overwrite);
            WindowsAzurePowershellCmdlet azurePowershellCmdlet  = new WindowsAzurePowershellCmdlet(saveAzureVhdCmdletInfo);

            return(azurePowershellCmdlet.RunAndStop(ms).ToString());
        }
 public string SaveAzureVhdStop(Uri source, FileInfo localFilePath, int? numThreads, string storageKey, bool overwrite, int ms)
 {
     SaveAzureVhdCmdletInfo saveAzureVhdCmdletInfo = new SaveAzureVhdCmdletInfo(source, localFilePath, numThreads, storageKey, overwrite);
     WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(saveAzureVhdCmdletInfo);
     return azurePowershellCmdlet.RunAndStop(ms).ToString();
 }
 public VhdDownloadContext SaveAzureVhd(Uri source, FileInfo localFilePath, int? numThreads, string storageKey, bool overwrite)
 {
     SaveAzureVhdCmdletInfo saveAzureVhdCmdletInfo = new SaveAzureVhdCmdletInfo(source, localFilePath, numThreads, storageKey, overwrite);
     return runSaveAzureVhd(saveAzureVhdCmdletInfo);
 }
 private VhdDownloadContext runSaveAzureVhd(SaveAzureVhdCmdletInfo saveAzureVhdCmdletInfo)
 {
     WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(saveAzureVhdCmdletInfo);
     Collection<PSObject> result = azurePowershellCmdlet.Run();
     if (result.Count == 1)
     {
         return (VhdDownloadContext)result[0].BaseObject;
     }
     return null;
 }