コード例 #1
0
        /**
         * Return Hash
         */
        public override int GetHashCode()
        {
            int result = 0;

            result = GenerateHash(result) ^ base.GetHashCode();

            result = GenerateHash(result) ^ _objectID.GetHashCode();
            result = GenerateHash(result) ^ _referencedObjectID.GetHashCode();
            result = GenerateHash(result) ^ _updateNumber.GetHashCode();
            result = GenerateHash(result) ^ _forceID.GetHashCode();
            result = GenerateHash(result) ^ _modifications.GetHashCode();
            result = GenerateHash(result) ^ _objectType.GetHashCode();
            result = GenerateHash(result) ^ _objectAppearance.GetHashCode();
            result = GenerateHash(result) ^ _numberOfPoints.GetHashCode();
            result = GenerateHash(result) ^ _requesterID.GetHashCode();
            result = GenerateHash(result) ^ _receivingID.GetHashCode();

            if (_objectLocation.Count > 0)
            {
                for (int idx = 0; idx < _objectLocation.Count; idx++)
                {
                    result = GenerateHash(result) ^ _objectLocation[idx].GetHashCode();
                }
            }


            return(result);
        }
コード例 #2
0
        /**
         * Return Hash
         */
        public override int GetHashCode()
        {
            int result = 0;

            result = GenerateHash(result) ^ _segmentNumber.GetHashCode();
            result = GenerateHash(result) ^ _segmentAppearance.GetHashCode();
            result = GenerateHash(result) ^ _location.GetHashCode();
            result = GenerateHash(result) ^ _orientation.GetHashCode();
            result = GenerateHash(result) ^ _segmentLength.GetHashCode();
            result = GenerateHash(result) ^ _segmentWidth.GetHashCode();
            result = GenerateHash(result) ^ _segmentHeight.GetHashCode();
            result = GenerateHash(result) ^ _segmentDepth.GetHashCode();
            result = GenerateHash(result) ^ _pad1.GetHashCode();

            return(result);
        }