コード例 #1
0
 public UserRoleDto(AccessControlListDto acl, string name, long id, bool canDelete)
 {
     Acl          = acl;
     Name         = name;
     Id           = id;
     CanBeDeleted = canDelete;
 }
コード例 #2
0
 public UserRoleDto(UserRoleDto role)
 {
     Name         = role.Name;
     CanBeDeleted = role.CanBeDeleted;
     Id           = role.Id;
     Acl          = new AccessControlListDto(role.Acl);
 }
コード例 #3
0
 public AccessControlListDto(AccessControlListDto acl) : this()
 {
     foreach (AccessControlEntryDto item in acl.Entries)
     {
         Entries.Add(new AccessControlEntryDto(item));
     }
 }
コード例 #4
0
 public bool DiffersFrom(AccessControlListDto list)
 {
     if (list.Entries.Count != this.Entries.Count)
     {
         return(true);
     }
     foreach (AccessControlEntryDto thisEntry in Entries)
     {
         AccessControlEntryDto entry = list.Entries.FirstOrDefault(e => e.Id == thisEntry.Id);
         if (entry == null)
         {
             return(true);
         }
         if (thisEntry.DiffersFrom(entry))
         {
             return(true);
         }
     }
     return(false);
 }
コード例 #5
0
 public UserRoleDto()
 {
     Acl = new AccessControlListDto();
 }