Esempio n. 1
0
        public SubnetNamesCollection GetAzureSubnet(PersistentVM vm)
        {
            GetAzureSubnetCmdletInfo     getAzureSubnetCmdlet  = new GetAzureSubnetCmdletInfo(vm);
            WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(getAzureSubnetCmdlet);
            Collection <PSObject>        result = azurePowershellCmdlet.Run();

            SubnetNamesCollection subnets = new SubnetNamesCollection();

            foreach (PSObject re in result)
            {
                subnets.Add((string)re.BaseObject);
            }
            return(subnets);
        }
        public SubnetNamesCollection GetAzureSubnet(PersistentVM vm)
        {
            GetAzureSubnetCmdletInfo getAzureSubnetCmdlet = new GetAzureSubnetCmdletInfo(vm);
            WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(getAzureSubnetCmdlet);
            Collection <PSObject> result = azurePowershellCmdlet.Run();

            SubnetNamesCollection subnets = new SubnetNamesCollection();
            foreach (PSObject re in result)
            {
                subnets.Add((string)re.BaseObject);
            }
            return subnets;
        }