コード例 #1
0
ファイル: ByteBuffer.cs プロジェクト: wangweinjcn/Pelco-Media
        public override int GetHashCode()
        {
            // Auto-generated by Visual Studio

            var hashCode = -871570897;

            hashCode = hashCode * -1521134295 + EqualityComparer <byte[]> .Default.GetHashCode(_buffer);

            hashCode = hashCode * -1521134295 + _isOpen.GetHashCode();
            hashCode = hashCode * -1521134295 + _readOnly.GetHashCode();
            hashCode = hashCode * -1521134295 + _length.GetHashCode();
            hashCode = hashCode * -1521134295 + _capacity.GetHashCode();
            hashCode = hashCode * -1521134295 + _position.GetHashCode();
            hashCode = hashCode * -1521134295 + _startIndex.GetHashCode();
            hashCode = hashCode * -1521134295 + _isExpandable.GetHashCode();
            hashCode = hashCode * -1521134295 + IsReadOnly.GetHashCode();
            hashCode = hashCode * -1521134295 + IsOpen.GetHashCode();
            hashCode = hashCode * -1521134295 + Length.GetHashCode();
            hashCode = hashCode * -1521134295 + Capacity.GetHashCode();
            hashCode = hashCode * -1521134295 + Position.GetHashCode();
            hashCode = hashCode * -1521134295 + RemainingBytes.GetHashCode();
            hashCode = hashCode * -1521134295 + StartIndex.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <byte[]> .Default.GetHashCode(Raw);

            return(hashCode);
        }
コード例 #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = elements?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ IsReadOnly.GetHashCode();
         return(hashCode);
     }
 }
コード例 #3
0
ファイル: StudentsList.cs プロジェクト: Tikhon-ql/Epam_Task5
        public override int GetHashCode()
        {
            int hashCode = -695961709;

            hashCode = hashCode * -1521134295 + EqualityComparer <Version> .Default.GetHashCode(Version);

            hashCode = hashCode * -1521134295 + EqualityComparer <List <Student> > .Default.GetHashCode(students);

            hashCode = hashCode * -1521134295 + Count.GetHashCode();
            hashCode = hashCode * -1521134295 + IsReadOnly.GetHashCode();
            return(hashCode);
        }
コード例 #4
0
ファイル: ColumnInfo.cs プロジェクト: Jaxelr/Insight.Database
        /// <inheritdoc/>
        public override int GetHashCode()
        {
            int hashCode = 17;

            unchecked
            {
                hashCode += Name.GetHashCode();
                hashCode *= 23;
                hashCode += DataType.GetHashCode();
                hashCode *= 23;
                hashCode += IsNullable.GetHashCode();
                hashCode *= 23;
                hashCode += IsIdentity.GetHashCode();
                hashCode *= 23;
                hashCode += IsReadOnly.GetHashCode();
            }

            return(hashCode);
        }
コード例 #5
0
ファイル: Content.cs プロジェクト: QuantumArt/QA.DPC
        /// <summary>
        /// хеш код по всей глубине контена с учетом того что могут быть циклы
        /// </summary>
        /// <param name="visitedContents">родительские контенты</param>
        internal int GetRecurciveHashCode(ReferenceHashSet <Content> visitedContents)
        {
            if (visitedContents.Contains(this))
            {
                return(HashHelper.CombineHashCodes(ContentId.GetHashCode(), visitedContents.Count.GetHashCode()));
            }

            visitedContents.Add(this);

            int hash = PublishingMode.GetHashCode();

            hash = HashHelper.CombineHashCodes(hash, IsReadOnly.GetHashCode());
            hash = HashHelper.CombineHashCodes(hash, LoadAllPlainFields.GetHashCode());
            hash = HashHelper.CombineHashCodes(hash, ContentId.GetHashCode());

            foreach (Field field in Fields.OrderBy(x => x.FieldId))
            {
                int fieldHash = field.GetRecurciveHashCode(visitedContents);
                hash = HashHelper.CombineHashCodes(hash, fieldHash);
            }

            return(hash);
        }
コード例 #6
0
 public int GetHashCode() =>
 ID.GetHashCode() ^ Name.GetHashCode() ^ Category.GetHashCode() ^ IsReadOnly.GetHashCode();