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

GetAzureVNetGatewayKey() public method

public GetAzureVNetGatewayKey ( string vnetName, string localnet ) : Microsoft.WindowsAzure.Management.ServiceManagement.Model.SharedKeyContext
vnetName string
localnet string
return Microsoft.WindowsAzure.Management.ServiceManagement.Model.SharedKeyContext
        public SharedKeyContext GetAzureVNetGatewayKey(string vnetName, string localnet)
        {
            GetAzureVNetGatewayKeyCmdletInfo getAzureVNetGatewayKeyCmdletInfo = new GetAzureVNetGatewayKeyCmdletInfo(vnetName, localnet);
            WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(getAzureVNetGatewayKeyCmdletInfo);
            Collection<PSObject> result = azurePowershellCmdlet.Run();

            if (result.Count == 1)
            {
                return (SharedKeyContext) result[0].BaseObject;
            }
            return null;
        }
ServiceManagementCmdletTestHelper