public ManagementOperationContext SetAzureVNetGateway(string option, string vnetName, string localNetwork)
{
SetAzureVNetGatewayCmdletInfo setAzureVNetGatewayCmdletInfo = new SetAzureVNetGatewayCmdletInfo(option, vnetName, localNetwork);
WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(setAzureVNetGatewayCmdletInfo);
Collection<PSObject> result = azurePowershellCmdlet.Run();
if (result.Count == 1)
{
return (ManagementOperationContext)result[0].BaseObject;
}
return null;
}