Exago .NET API Documentation
ActiveRole Property
Example 
WebReports.Api.Roles Namespace > RoleCollection Class : ActiveRole Property
Returns a Role object that represents the currently active role. Do not call this property without first checking to see if a role is currently active with IsActiveRole. Do not call this method if there is no currently active role.
Syntax
public Role ActiveRole {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