コード例 #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((CreationDate.GetHashCode() * 397) ^ Id);
     }
 }
コード例 #2
0
    public override int GetHashCode()
    {
        int hashcode = 157;

        unchecked {
            hashcode = (hashcode * 397) + IdPlaylist.GetHashCode();
            if (__isset.name)
            {
                hashcode = (hashcode * 397) + Name.GetHashCode();
            }
            if (__isset.description)
            {
                hashcode = (hashcode * 397) + Description.GetHashCode();
            }
            if (__isset.creationDate)
            {
                hashcode = (hashcode * 397) + CreationDate.GetHashCode();
            }
            if (__isset.coverPath)
            {
                hashcode = (hashcode * 397) + CoverPath.GetHashCode();
            }
        }
        return(hashcode);
    }
コード例 #3
0
        /// <summary>
        /// Object Hash code
        /// </summary>
        /// <returns></returns>
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = CVList != null?CVList.GetHashCode() : 0;

                hashCode = (hashCode * 397) ^ (AnalysisSoftwareList != null ? AnalysisSoftwareList.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Provider != null ? Provider.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (AuditCollection != null ? AuditCollection.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^
                           (AnalysisSampleCollection != null ? AnalysisSampleCollection.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (SequenceCollection != null ? SequenceCollection.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (AnalysisCollection != null ? AnalysisCollection.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^
                           (AnalysisProtocolCollection != null ? AnalysisProtocolCollection.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (DataCollection != null ? DataCollection.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^
                           (BibliographicReferences != null ? BibliographicReferences.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ CreationDate.GetHashCode();
                hashCode = (hashCode * 397) ^ (Version != null ? Version.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Id != null ? Id.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
                return(hashCode);
            }
        }
コード例 #4
0
ファイル: Sessions.cs プロジェクト: TomasGC/Cocotte-BE
        /// <summary>
        /// Override of the get hash code method.
        /// </summary>
        /// <returns></returns>
        public override int GetHashCode()
        {
            //Get hash code for the nullable fields.
            int hashKey = Key == null ? 0 : Key.GetHashCode();

            //Calculate the hash code for the GPOPolicy.
            return(_id.GetHashCode() ^ CreationDate.GetHashCode() ^ UserId.GetHashCode() ^ hashKey);
        }
コード例 #5
0
        public virtual int _GetUniqueIdentifier()
        {
            var hashCode = 399326290;

            hashCode = hashCode * -1521134295 + (Id?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (CreationDate?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (LastUpdate?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Status?.GetHashCode() ?? 0);
            return(hashCode);
        }
コード例 #6
0
 public override int GetHashCode()
 {
     unchecked
     {
         var result = FilePath.GetHashCode();
         result = (result * 397) ^ (Length != 0 ? Length.GetHashCode() : 0);
         result = (result * 397) ^ (CreationDate.GetHashCode());
         return(result);
     }
 }
コード例 #7
0
ファイル: Test.cs プロジェクト: michele1977/Unikey
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Id;
         hashCode = (hashCode * 397) ^ (Title != null ? Title.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ CreationDate.GetHashCode();
         hashCode = (hashCode * 397) ^ State.GetHashCode();
         return(hashCode);
     }
 }
コード例 #8
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>
 /// A hash code for this instance, suitable for use in hashing
 /// algorithms and data structures like a hash table.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int result = Id;
         result = (result * 397) ^ (FirstName != null ? FirstName.GetHashCode() : 0);
         result = (result * 397) ^ (LastName != null ? LastName.GetHashCode() : 0);
         result = (result * 397) ^ CreationDate.GetHashCode();
         result = (result * 397) ^ (Email != null ? Email.GetHashCode() : 0);
         result = (result * 397) ^ Role;
         return(result);
     }
 }
コード例 #9
0
 // and cause we override Equals, also override GetHashCode!
 public override int GetHashCode()
 {
     //found online. it gets the values and calculates a Hash that is semi unique thanks to the properties given.
     unchecked // Overflow is fine, just wrap
     {
         var hash = 17;
         // Suitable nullity checks etc, of course :)
         hash = (hash * 23) ^ ID.GetHashCode();
         hash = (hash * 23) ^ TypeID.GetHashCode();
         hash = (hash * 23) ^ CreationDate.GetHashCode();
         //hash = (hash * 23) ^ this.Notes.GetHashCode();
         return(hash);
     }
 }
コード例 #10
0
        /// <summary>Serves as the default hash function.</summary>
        /// <returns>A hash code for the current object.</returns>
        public override int GetHashCode()
        {
            var hash = 1;

            hash ^= Id.GetHashCode();
            hash ^= ParentProcessId.GetHashCode();
            hash ^= Image.GetHashCode();
            hash ^= Name.GetHashCode();
            hash ^= CommandLine.GetHashCode();
            hash ^= WorkingDirectory.GetHashCode();
            hash ^= CreationDate.GetHashCode();
            hash ^= SessionId.GetHashCode();
            return(hash);
        }
コード例 #11
0
        public override int GetHashCode()
        {
            int result = 0;

            try
            {
                result = ID.GetHashCode() + Creator.GetHashCode() + CreationDate.GetHashCode() + Content.GetHashCode() + Extra.GetHashCode();
            }
            catch (StackOverflowException ex)
            {
                Console.WriteLine(ex.Message);
            }
            return(result);
        }
コード例 #12
0
        public override int GetHashCode()
        {
            var hashCode = -781278249;

            hashCode = hashCode * -1521134295 + base.GetHashCode();
            hashCode = hashCode * -1521134295 + CreationDate.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(CreatedBy);

            hashCode = hashCode * -1521134295 + ModificationDate.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ModifiedBy);

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

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

            return(hashCode);
        }
コード例 #13
0
ファイル: ProductDto.cs プロジェクト: FredericVets2/LinkIT
        public override int GetHashCode()
        {
            var hashCode = -307904605;

            hashCode = hashCode * -1521134295 + base.GetHashCode();
            hashCode = hashCode * -1521134295 + CreationDate.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(CreatedBy);

            hashCode = hashCode * -1521134295 + ModificationDate.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ModifiedBy);

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

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

            return(hashCode);
        }
コード例 #14
0
 public override int GetHashCode()
 {
     unchecked {
         int result = (comments != null ? comments.GetHashCode() : 0);
         result = (result * 397) ^ (versions != null ? versions.GetHashCode() : 0);
         result = (result * 397) ^ (fixVersions != null ? fixVersions.GetHashCode() : 0);
         result = (result * 397) ^ (SubtaskKeys.GetHashCode());
         result = (result * 397) ^ (IssueLinks.GetHashCode());
         result = (result * 397) ^ (components != null ? components.GetHashCode() : 0);
         result = (result * 397) ^ (attachments != null ? attachments.GetHashCode() : 0);
         result = (result * 397) ^ (Server != null ? Server.GUID.GetHashCode() : 0);
         result = (result * 397) ^ (IssueType != null ? IssueType.GetHashCode() : 0);
         result = (result * 397) ^ IssueTypeId;
         result = (result * 397) ^ (IssueTypeIconUrl != null ? IssueTypeIconUrl.GetHashCode() : 0);
         result = (result * 397) ^ (Description != null ? Description.GetHashCode() : 0);
         result = (result * 397) ^ Id;
         result = (result * 397) ^ (Key != null ? Key.GetHashCode() : 0);
         result = (result * 397) ^ (Summary != null ? Summary.GetHashCode() : 0);
         result = (result * 397) ^ (Status != null ? Status.GetHashCode() : 0);
         result = (result * 397) ^ (StatusIconUrl != null ? StatusIconUrl.GetHashCode() : 0);
         result = (result * 397) ^ (Priority != null ? Priority.GetHashCode() : 0);
         result = (result * 397) ^ (Resolution != null ? Resolution.GetHashCode() : 0);
         result = (result * 397) ^ (Reporter != null ? Reporter.GetHashCode() : 0);
         result = (result * 397) ^ (Assignee != null ? Assignee.GetHashCode() : 0);
         result = (result * 397) ^ CreationDate.GetHashCode();
         result = (result * 397) ^ UpdateDate.GetHashCode();
         result = (result * 397) ^ (ProjectKey != null ? ProjectKey.GetHashCode() : 0);
         result = (result * 397) ^ (Environment != null ? Environment.GetHashCode() : 0);
         result = (result * 397) ^ (OriginalEstimate != null ? OriginalEstimate.GetHashCode() : 0);
         result = (result * 397) ^ (RemainingEstimate != null ? RemainingEstimate.GetHashCode() : 0);
         result = (result * 397) ^ (TimeSpent != null ? TimeSpent.GetHashCode() : 0);
         result = (result * 397) ^ (ParentKey != null ? ParentKey.GetHashCode() : 0);
         result = (result * 397) ^ (PriorityIconUrl != null ? PriorityIconUrl.GetHashCode() : 0);
         result = (result * 397) ^ StatusId;
         result = (result * 397) ^ PriorityId;
         return(result);
     }
 }
コード例 #15
0
ファイル: AssetDto.cs プロジェクト: FredericVets/LinkIT
        public override int GetHashCode()
        {
            var hashCode = -133760364;

            hashCode = hashCode * -1521134295 + base.GetHashCode();
            hashCode = hashCode * -1521134295 + CreationDate.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(CreatedBy);

            hashCode = hashCode * -1521134295 + ModificationDate.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ModifiedBy);

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

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

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

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

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

            hashCode = hashCode * -1521134295 + InvoiceDate.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(InvoiceNumber);

            hashCode = hashCode * -1521134295 + Price.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(PaidBy);

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

            hashCode = hashCode * -1521134295 + InstallDate.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(InstalledBy);

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

            hashCode = hashCode * -1521134295 + TeamAsset.GetHashCode();

            return(hashCode);
        }
コード例 #16
0
 public override int GetHashCode() => HashCode.Combine(Name.GetHashCode(StringComparison.Ordinal), Size.GetHashCode(), CreationDate.GetHashCode());