Exago .NET API Documentation
IsActiveRole Property
Example 
WebReports.Api.Roles Namespace > RoleCollection Class : IsActiveRole Property

Returns true if a role is currently active or false if not.

IsActiveRole should always be called first before calling ActiveRole.

Syntax
public System.bool IsActiveRole {get;}
Example
Determine if a role is currently active, if not, create a new role. Otherwise, retrieve the Role object representing the currently active role.
if (api.Roles.IsActiveRole)
{
	Role currentRole = api.Roles.ActiveRole;
} 
	else
{
	Role newRole = new Role("ReportUser");
	newRole.Activate();
}
See Also

Reference

RoleCollection Class
RoleCollection Members