Beispiel #1
0
 public override int GetHashCode()
 {
     return(IdentityReference.GetHashCode() ^
            AccessMask.GetHashCode() ^
            AccessControlType.GetHashCode() ^
            InheritanceFlags.GetHashCode() ^
            PropagationFlags.GetHashCode());
 }
Beispiel #2
0
 public override int GetHashCode()
 {
     // http://stackoverflow.com/questions/263400/what-is-the-best-algorithm-for-an-overridden-system-object-gethashcode
     unchecked // Overflow is fine, just wrap
     {
         var hash = 17;
         // Suitable nullity checks etc, of course :)
         hash = hash * 23 + ComAccessRights.GetHashCode();
         hash = hash * 23 + IdentityReference.GetHashCode();
         hash = hash * 23 + AccessControlType.GetHashCode();
         return(hash);
     }
 }