public ManagementOperationContext SetAzureRole(string serviceName, string slot, string roleName, int count)
{
SetAzureRoleCmdletInfo setAzureRoleCmdletInfo = new SetAzureRoleCmdletInfo(serviceName, slot, roleName, count);
WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(setAzureRoleCmdletInfo);
Collection<PSObject> result = azurePowershellCmdlet.Run();
if (result.Count == 1)
{
return (ManagementOperationContext)result[0].BaseObject;
}
return null;
}