Microsoft.WindowsAzure.Management.ServiceManagement.Test.FunctionalTests.ServiceManagementCmdletTestHelper.GetAzureVNetGateway C# (CSharp) Method

GetAzureVNetGateway() public method

public GetAzureVNetGateway ( string vnetName ) : Collection
vnetName string
return Collection
        public Collection<VirtualNetworkGatewayContext> GetAzureVNetGateway(string vnetName)
        {
            GetAzureVNetGatewayCmdletInfo getAzureVNetGatewayCmdletInfo = new GetAzureVNetGatewayCmdletInfo(vnetName);
            WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(getAzureVNetGatewayCmdletInfo);
            Collection<PSObject> result = azurePowershellCmdlet.Run();

            Collection<VirtualNetworkGatewayContext> vnetGateways = new Collection<VirtualNetworkGatewayContext>();
            foreach (PSObject re in result)
            {
                vnetGateways.Add ((VirtualNetworkGatewayContext) re.BaseObject);
            }
            return vnetGateways;
        }
ServiceManagementCmdletTestHelper