Exago .NET API Documentation
Activate Method
Example 
WebReports.Api.Roles Namespace > Role Class : Activate Method

Make this Role the active one. If applicable (see overload list below) the General Settings in the role will be applied.

Once a role is activated, the changes made by activating it cannot be undone with the API, even if calling the Deactivate Method. The only way to completely undo the role's changes is to discard the API object and create a new one.

Overload List
OverloadDescription
Make this Role the active one, and apply the Role's General Settings to the environment. This is the same as calling Activate(true).  
Make this Role the active one. If the loadRoleData argument is True, the General Settings in the Role will be applied to the environment. If False, they will not.  
Remarks

The same as selecting a Role in Admin Console > General > Main Settings > Active Role.

 

Example
These two lines perform the same function — activating the Role named "ReportUser" and applying all settings, including the General Settings to the environment.
api.Roles.GetRole("ReportUser").Activate();
api.Roles.GetRole("ReportUser").Activate(true);
See Also

Reference

Role Class
Role Members