public PersistentVM SetAzureEndPoint(AzureEndPointConfigInfo endPointConfig)
{
if (null != endPointConfig)
{
SetAzureEndpointCmdletInfo setAzureEndpointCmdletInfo = SetAzureEndpointCmdletInfo.BuildNoLoadBalancedCmdletInfo(endPointConfig);
WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(setAzureEndpointCmdletInfo);
Collection<PSObject> result = azurePowershellCmdlet.Run();
if (result.Count == 1)
{
return (PersistentVM)result[0].BaseObject;
}
}
return null;
}