Пример #1
0
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = PrincipalName != null?PrincipalName.GetHashCode() : 0;

                hashCode = (hashCode * 397) ^ (PrincipalType != null ? PrincipalType.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (RightName != null ? RightName.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (AceType != null ? AceType.GetHashCode() : 0);
                return(hashCode);
            }
        }
Пример #2
0
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = PrincipalSID != null?PrincipalSID.GetHashCode() : 0;

                hashCode = (hashCode * 397) ^ (int)PrincipalType;
                hashCode = (hashCode * 397) ^ (RightName != null ? RightName.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ IsInherited.GetHashCode();
                return(hashCode);
            }
        }