public Collection<GatewayConnectionContext> GetAzureVNetConnection(string vnetName)
{
GetAzureVNetConnectionCmdletInfo getAzureVNetConnectionCmdletInfo = new GetAzureVNetConnectionCmdletInfo(vnetName);
WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(getAzureVNetConnectionCmdletInfo);
Collection<PSObject> result = azurePowershellCmdlet.Run();
Collection<GatewayConnectionContext> connections = new Collection<GatewayConnectionContext>();
foreach (PSObject re in result)
{
connections.Add((GatewayConnectionContext)re.BaseObject);
}
return connections;
}