public Collection<RoleContext> GetAzureRole(string serviceName, string slot, string roleName, bool details)
{
GetAzureRoleCmdletInfo getAzureRoleCmdletInfo = new GetAzureRoleCmdletInfo(serviceName, slot, roleName, details);
WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(getAzureRoleCmdletInfo);
Collection<PSObject> result = azurePowershellCmdlet.Run();
Collection<RoleContext> roles = new Collection<RoleContext>();
foreach (PSObject re in result)
{
roles.Add((RoleContext)re.BaseObject);
}
return roles;
}