public void UnregisterRole(URole role) { for (int i = 0, l = Roles.Count; i < l; i++) { var r = Roles[i]; if (string.Equals(role.Name, r.Name, StringComparison.OrdinalIgnoreCase)) { Roles.Remove(r); l--; } } }
public void RegisterRole(URole role) { UnregisterRole(role); Roles.Add(role); }
public void Authorize(URole[] roles) { uroles.AddRoles(roles); }