コード例 #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Host.Length != 0)
            {
                hash ^= Host.GetHashCode();
            }
            if (FilePath.Length != 0)
            {
                hash ^= FilePath.GetHashCode();
            }
            if (LastModified != 0L)
            {
                hash ^= LastModified.GetHashCode();
            }
            if (Bytes != 0L)
            {
                hash ^= Bytes.GetHashCode();
            }
            hash ^= lines_.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
コード例 #2
0
        public override int GetHashCode()
        {
            int result = 1;

            result = (result * 397) ^ (AltEmailAddress != null ? AltEmailAddress.GetHashCode() : 0);
            result = (result * 397) ^ (AltTelephoneContact != null ? AltTelephoneContact.GetHashCode() : 0);
            result = (result * 397) ^ (CreatedOn != null ? CreatedOn.GetHashCode() : 0);
            result = (result * 397) ^ (DateOfBirth != null ? DateOfBirth.GetHashCode() : 0);
            result = (result * 397) ^ (EmailAddress != null ? EmailAddress.GetHashCode() : 0);
            result = (result * 397) ^ (Gender != null ? Gender.GetHashCode() : 0);
            result = (result * 397) ^ (GivenName != null ? GivenName.GetHashCode() : 0);
            result = (result * 397) ^ (HomeLanguage != null ? HomeLanguage.GetHashCode() : 0);
            result = (result * 397) ^ Id.GetHashCode();
            result = (result * 397) ^ (LastModified != null ? LastModified.GetHashCode() : 0);
            result = (result * 397) ^ (MaritalStatus != null ? MaritalStatus.GetHashCode() : 0);
            result = (result * 397) ^ (NextOfKinAddress != null ? NextOfKinAddress.GetHashCode() : 0);
            result = (result * 397) ^ (NextOfKinContact != null ? NextOfKinContact.GetHashCode() : 0);
            result = (result * 397) ^ (NextOfKinName != null ? NextOfKinName.GetHashCode() : 0);
            result = (result * 397) ^ (NextOfKinRelationship != null ? NextOfKinRelationship.GetHashCode() : 0);
            result = (result * 397) ^ (Occupation != null ? Occupation.GetHashCode() : 0);
            result = (result * 397) ^ (Organisation != null ? Organisation.GetHashCode() : 0);
            result = (result * 397) ^ (OtherName != null ? OtherName.GetHashCode() : 0);
            result = (result * 397) ^ (PermentAddress != null ? PermentAddress.GetHashCode() : 0);
            result = (result * 397) ^ (PersonOwnerType != null ? PersonOwnerType.GetHashCode() : 0);
            result = (result * 397) ^ (PlaceOfBirth != null ? PlaceOfBirth.GetHashCode() : 0);
            result = (result * 397) ^ (PostalAddress != null ? PostalAddress.GetHashCode() : 0);
            result = (result * 397) ^ (PreferredLanguage != null ? PreferredLanguage.GetHashCode() : 0);
            result = (result * 397) ^ (ProfilePhotoName != null ? ProfilePhotoName.GetHashCode() : 0);
            result = (result * 397) ^ (Religion != null ? Religion.GetHashCode() : 0);
            result = (result * 397) ^ (Surname != null ? Surname.GetHashCode() : 0);
            result = (result * 397) ^ (TelephoneContact != null ? TelephoneContact.GetHashCode() : 0);
            result = (result * 397) ^ (Title != null ? Title.GetHashCode() : 0);
            result = (result * 397) ^ (WebsiteUrl != null ? WebsiteUrl.GetHashCode() : 0);
            return(result);
        }
コード例 #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         int result = (m_ObjPropertyCollection != null ? m_ObjPropertyCollection.GetHashCode() : 0);
         result = (result * 397) ^ (CharacterSet != null ? CharacterSet.GetHashCode() : 0);
         result = (result * 397) ^ (ContentEncoding != null ? ContentEncoding.GetHashCode() : 0);
         result = (result * 397) ^ (ContentType != null ? ContentType.GetHashCode() : 0);
         result = (result * 397) ^ (Headers != null ? Headers.GetHashCode() : 0);
         result = (result * 397) ^ IsFromCache.GetHashCode();
         result = (result * 397) ^ IsMutuallyAuthenticated.GetHashCode();
         result = (result * 397) ^ LastModified.GetHashCode();
         result = (result * 397) ^ (Method != null ? Method.GetHashCode() : 0);
         result = (result * 397) ^ (OriginalReferrerUrl != null ? OriginalReferrerUrl.GetHashCode() : 0);
         result = (result * 397) ^ (OriginalUrl != null ? OriginalUrl.GetHashCode() : 0);
         result = (result * 397) ^ (ProtocolVersion != null ? ProtocolVersion.GetHashCode() : 0);
         result = (result * 397) ^ (Referrer != null ? Referrer.GetHashCode() : 0);
         result = (result * 397) ^ (ResponseUri != null ? ResponseUri.GetHashCode() : 0);
         result = (result * 397) ^ (Server != null ? Server.GetHashCode() : 0);
         result = (result * 397) ^ StatusCode.GetHashCode();
         result = (result * 397) ^ (StatusDescription != null ? StatusDescription.GetHashCode() : 0);
         result = (result * 397) ^ (Step != null ? Step.GetHashCode() : 0);
         result = (result * 397) ^ (Text != null ? Text.GetHashCode() : 0);
         result = (result * 397) ^ (Title != null ? Title.GetHashCode() : 0);
         result = (result * 397) ^ DownloadTime.GetHashCode();
         return(result);
     }
 }
コード例 #4
0
        public override int GetHashCode()
        {
            var hashCode = 1636230790;

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

            return(hashCode);
        }
コード例 #5
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ LastModified.GetHashCode();
         hashCode = (hashCode * 397) ^ Length.GetHashCode();
         return(hashCode);
     }
 }
コード例 #6
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (FullPath != null ? FullPath.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ LastModified.GetHashCode();
         return(hashCode);
     }
 }
コード例 #7
0
        public override int GetHashCode()
        {
            int result = 1;

            result = (result * 397) ^ (Code != null ? Code.GetHashCode() : 0);
            result = (result * 397) ^ (CreatedOn != null ? CreatedOn.GetHashCode() : 0);
            result = (result * 397) ^ Id.GetHashCode();
            result = (result * 397) ^ (LastModified != null ? LastModified.GetHashCode() : 0);
            result = (result * 397) ^ (Name != null ? Name.GetHashCode() : 0);
            return(result);
        }
コード例 #8
0
        public override int GetHashCode()
        {
            const int prime    = 31;
            int       hashcode = 1;

            hashcode = hashcode * prime + Url?.GetHashCode() ?? 0;
            hashcode = hashcode * prime + MD5Hash?.GetHashCode() ?? 0;
            hashcode = hashcode * prime + Length?.GetHashCode() ?? 0;
            hashcode = hashcode * prime + LastModified?.GetHashCode() ?? 0;
            return(hashcode);
        }
コード例 #9
0
 public override int GetHashCode()
 {
     return
         (FileID?.GetHashCode() ?? 0 ^
          FileLength.GetHashCode() ^
          FileName?.GetHashCode() ?? 0 ^
          FileShardIDs?.GetHashCodeEnumerable() ?? 0 ^
          FileShardHashes?.GetHashCodeEnumerable() ?? 0 ^
          LastModified.GetHashCode() ^
          SHA1?.GetHashCode() ?? 0);
 }
コード例 #10
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (ETag != null ? ETag.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ MaxAge.GetHashCode();
         hashCode = (hashCode * 397) ^ Expires.GetHashCode();
         hashCode = (hashCode * 397) ^ LastModified.GetHashCode();
         hashCode = (hashCode * 397) ^ CacheControl.GetHashCode();
         return(hashCode);
     }
 }
コード例 #11
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Id.GetHashCode();
         hashCode = (hashCode * 397) ^ (ExternalId != null ? ExternalId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ LastModified.GetHashCode();
         hashCode = (hashCode * 397) ^ LastSynced.GetHashCode();
         return(hashCode);
     }
 }
コード例 #12
0
 public int GetHashCode(IEqualityComparer comparer)
 {
     unchecked
     {
         var hashCode = ChangeFrequency.GetHashCode();
         hashCode = (hashCode * 397) ^ LastModified.GetHashCode();
         hashCode = (hashCode * 397) ^ Priority.GetHashCode();
         hashCode = (hashCode * 397) ^ (Url?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Metadata?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }
コード例 #13
0
 public override int GetHashCode()
 {
     unchecked
     {
         // ReSharper disable NonReadonlyMemberInGetHashCode
         var hashCode = ChangeFrequency.GetHashCode();
         hashCode = (hashCode * 397) ^ LastModified.GetHashCode();
         hashCode = (hashCode * 397) ^ Priority.GetHashCode();
         hashCode = (hashCode * 397) ^ (Url?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Metadata?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }
コード例 #14
0
ファイル: Credential.cs プロジェクト: lifeismeme/passmanager
        public override int GetHashCode()
        {
            var hashCode = 165930658;

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

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

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

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

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

            hashCode *= -1521134295 + Creation.GetHashCode();
            hashCode *= -1521134295 + LastModified.GetHashCode();
            return(hashCode);
        }
コード例 #15
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = KBID;
         hashCode = (hashCode * 397) ^ Timestamp.GetHashCode();
         hashCode = (hashCode * 397) ^ (Context != null ? Context.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Product != null ? Product.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Rating_Yes;
         hashCode = (hashCode * 397) ^ Rating_No;
         hashCode = (hashCode * 397) ^ Rating_Views;
         hashCode = (hashCode * 397) ^ LastModified.GetHashCode();
         hashCode = (hashCode * 397) ^ IsPrivate.GetHashCode();
         hashCode = (hashCode * 397) ^ Status;
         hashCode = (hashCode * 397) ^ Priority;
         hashCode = (hashCode * 397) ^ (Keywords != null ? Keywords.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Address != null ? Address.GetHashCode() : 0);
         return(hashCode);
     }
 }
コード例 #16
0
 /// <summary>
 /// This was moved into its own function that isn't virtual so that it could
 /// be called inside the object's constructor.
 /// </summary>
 /// <returns>The Object's hash code.</returns>
 private int CalculateHashCode()
 {
     unchecked
     {
         var result = (Bucket != null ? Bucket.GetHashCode() : 0);
         result = (result * 397) ^ (Key != null ? Key.GetHashCode() : 0);
         result = (result * 397) ^ (Value != null ? Value.GetHashCode() : 0);
         result = (result * 397) ^ (ContentType != null ? ContentType.GetHashCode() : 0);
         result = (result * 397) ^ (ContentEncoding != null ? ContentEncoding.GetHashCode() : 0);
         result = (result * 397) ^ (CharSet != null ? CharSet.GetHashCode() : 0);
         result = (result * 397) ^ (VectorClock != null ? VectorClock.GetHashCode() : 0);
         result = (result * 397) ^ (UserMetaData != null ? UserMetaData.GetHashCode() : 0);
         result = (result * 397) ^ (BinIndexes != null ? BinIndexes.GetHashCode() : 0);
         result = (result * 397) ^ (IntIndexes != null ? IntIndexes.GetHashCode() : 0);
         result = (result * 397) ^ LastModified.GetHashCode();
         result = (result * 397) ^ LastModifiedUsec.GetHashCode();
         result = (result * 397) ^ (Links != null ? Links.GetHashCode() : 0);
         result = (result * 397) ^ (_vtags != null ? _vtags.GetHashCode() : 0);
         return(result);
     }
 }
コード例 #17
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (SearchString != null)
         {
             hashCode = hashCode * 59 + SearchString.GetHashCode();
         }
         if (SortingColumn != null)
         {
             hashCode = hashCode * 59 + SortingColumn.GetHashCode();
         }
         if (TagId != null)
         {
             hashCode = hashCode * 59 + TagId.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (AssetNumber != null)
         {
             hashCode = hashCode * 59 + AssetNumber.GetHashCode();
         }
         if (Latitude != null)
         {
             hashCode = hashCode * 59 + Latitude.GetHashCode();
         }
         if (Longitude != null)
         {
             hashCode = hashCode * 59 + Longitude.GetHashCode();
         }
         if (AssetClass != null)
         {
             hashCode = hashCode * 59 + AssetClass.GetHashCode();
         }
         if (LastModified != null)
         {
             hashCode = hashCode * 59 + LastModified.GetHashCode();
         }
         if (Created != null)
         {
             hashCode = hashCode * 59 + Created.GetHashCode();
         }
         if (Creator != null)
         {
             hashCode = hashCode * 59 + Creator.GetHashCode();
         }
         if (SubNumber != null)
         {
             hashCode = hashCode * 59 + SubNumber.GetHashCode();
         }
         if (CompanyCode != null)
         {
             hashCode = hashCode * 59 + CompanyCode.GetHashCode();
         }
         if (InventoryNumber != null)
         {
             hashCode = hashCode * 59 + InventoryNumber.GetHashCode();
         }
         if (SerialNumber != null)
         {
             hashCode = hashCode * 59 + SerialNumber.GetHashCode();
         }
         if (Location != null)
         {
             hashCode = hashCode * 59 + Location.GetHashCode();
         }
         if (Room != null)
         {
             hashCode = hashCode * 59 + Room.GetHashCode();
         }
         if (CostCenter != null)
         {
             hashCode = hashCode * 59 + CostCenter.GetHashCode();
         }
         if (CapitalisationDate != null)
         {
             hashCode = hashCode * 59 + CapitalisationDate.GetHashCode();
         }
         if (LastInventoryDate != null)
         {
             hashCode = hashCode * 59 + LastInventoryDate.GetHashCode();
         }
         if (AcquisitionValue != null)
         {
             hashCode = hashCode * 59 + AcquisitionValue.GetHashCode();
         }
         if (AssetSuperNumber != null)
         {
             hashCode = hashCode * 59 + AssetSuperNumber.GetHashCode();
         }
         if (Vendor != null)
         {
             hashCode = hashCode * 59 + Vendor.GetHashCode();
         }
         if (TypeName != null)
         {
             hashCode = hashCode * 59 + TypeName.GetHashCode();
         }
         if (Plant != null)
         {
             hashCode = hashCode * 59 + Plant.GetHashCode();
         }
         if (Quantity != null)
         {
             hashCode = hashCode * 59 + Quantity.GetHashCode();
         }
         if (Unit != null)
         {
             hashCode = hashCode * 59 + Unit.GetHashCode();
         }
         if (Untaggable != null)
         {
             hashCode = hashCode * 59 + Untaggable.GetHashCode();
         }
         if (Untagged != null)
         {
             hashCode = hashCode * 59 + Untagged.GetHashCode();
         }
         if (Page != null)
         {
             hashCode = hashCode * 59 + Page.GetHashCode();
         }
         if (PageSize != null)
         {
             hashCode = hashCode * 59 + PageSize.GetHashCode();
         }
         return(hashCode);
     }
 }
コード例 #18
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (InventoryOrderId != null)
         {
             hashCode = hashCode * 59 + InventoryOrderId.GetHashCode();
         }
         if (Checked != null)
         {
             hashCode = hashCode * 59 + Checked.GetHashCode();
         }
         if (LastModified != null)
         {
             hashCode = hashCode * 59 + LastModified.GetHashCode();
         }
         if (Created != null)
         {
             hashCode = hashCode * 59 + Created.GetHashCode();
         }
         if (ChangedBy != null)
         {
             hashCode = hashCode * 59 + ChangedBy.GetHashCode();
         }
         if (CommentOther != null)
         {
             hashCode = hashCode * 59 + CommentOther.GetHashCode();
         }
         if (CommentCostCenter != null)
         {
             hashCode = hashCode * 59 + CommentCostCenter.GetHashCode();
         }
         if (CommentPlant != null)
         {
             hashCode = hashCode * 59 + CommentPlant.GetHashCode();
         }
         if (CommentLocation != null)
         {
             hashCode = hashCode * 59 + CommentLocation.GetHashCode();
         }
         if (Status != null)
         {
             hashCode = hashCode * 59 + Status.GetHashCode();
         }
         if (Asset != null)
         {
             hashCode = hashCode * 59 + Asset.GetHashCode();
         }
         if (AssetNumber != null)
         {
             hashCode = hashCode * 59 + AssetNumber.GetHashCode();
         }
         if (SubNumber != null)
         {
             hashCode = hashCode * 59 + SubNumber.GetHashCode();
         }
         if (CompanyCode != null)
         {
             hashCode = hashCode * 59 + CompanyCode.GetHashCode();
         }
         return(hashCode);
     }
 }
コード例 #19
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (AssetNumber != null)
         {
             hashCode = hashCode * 59 + AssetNumber.GetHashCode();
         }
         if (SubNumber != null)
         {
             hashCode = hashCode * 59 + SubNumber.GetHashCode();
         }
         if (CompanyCode != null)
         {
             hashCode = hashCode * 59 + CompanyCode.GetHashCode();
         }
         if (TagId != null)
         {
             hashCode = hashCode * 59 + TagId.GetHashCode();
         }
         if (SecondTagId != null)
         {
             hashCode = hashCode * 59 + SecondTagId.GetHashCode();
         }
         if (IsUntaggable != null)
         {
             hashCode = hashCode * 59 + IsUntaggable.GetHashCode();
         }
         if (LastModified != null)
         {
             hashCode = hashCode * 59 + LastModified.GetHashCode();
         }
         if (Created != null)
         {
             hashCode = hashCode * 59 + Created.GetHashCode();
         }
         if (Creator != null)
         {
             hashCode = hashCode * 59 + Creator.GetHashCode();
         }
         if (InventoryNumber != null)
         {
             hashCode = hashCode * 59 + InventoryNumber.GetHashCode();
         }
         if (SerialNumber != null)
         {
             hashCode = hashCode * 59 + SerialNumber.GetHashCode();
         }
         if (Location != null)
         {
             hashCode = hashCode * 59 + Location.GetHashCode();
         }
         if (Room != null)
         {
             hashCode = hashCode * 59 + Room.GetHashCode();
         }
         if (Description != null)
         {
             hashCode = hashCode * 59 + Description.GetHashCode();
         }
         if (CostCenter != null)
         {
             hashCode = hashCode * 59 + CostCenter.GetHashCode();
         }
         if (CapitalisationDate != null)
         {
             hashCode = hashCode * 59 + CapitalisationDate.GetHashCode();
         }
         if (LastInventoryDate != null)
         {
             hashCode = hashCode * 59 + LastInventoryDate.GetHashCode();
         }
         if (AcquisitionValue != null)
         {
             hashCode = hashCode * 59 + AcquisitionValue.GetHashCode();
         }
         if (AssetSuperNumber != null)
         {
             hashCode = hashCode * 59 + AssetSuperNumber.GetHashCode();
         }
         if (Vendor != null)
         {
             hashCode = hashCode * 59 + Vendor.GetHashCode();
         }
         if (TypeName != null)
         {
             hashCode = hashCode * 59 + TypeName.GetHashCode();
         }
         if (Plant != null)
         {
             hashCode = hashCode * 59 + Plant.GetHashCode();
         }
         if (AssetClass != null)
         {
             hashCode = hashCode * 59 + AssetClass.GetHashCode();
         }
         if (Quantity != null)
         {
             hashCode = hashCode * 59 + Quantity.GetHashCode();
         }
         if (Unit != null)
         {
             hashCode = hashCode * 59 + Unit.GetHashCode();
         }
         if (DeactivatedOn != null)
         {
             hashCode = hashCode * 59 + DeactivatedOn.GetHashCode();
         }
         if (IsDeactivated != null)
         {
             hashCode = hashCode * 59 + IsDeactivated.GetHashCode();
         }
         if (CompanyCodeCurrency != null)
         {
             hashCode = hashCode * 59 + CompanyCodeCurrency.GetHashCode();
         }
         if (Comment != null)
         {
             hashCode = hashCode * 59 + Comment.GetHashCode();
         }
         if (ShareTags != null)
         {
             hashCode = hashCode * 59 + ShareTags.GetHashCode();
         }
         return(hashCode);
     }
 }
コード例 #20
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (TagId != null)
         {
             hashCode = hashCode * 59 + TagId.GetHashCode();
         }
         if (SecondTagId != null)
         {
             hashCode = hashCode * 59 + SecondTagId.GetHashCode();
         }
         if (IsUntaggable != null)
         {
             hashCode = hashCode * 59 + IsUntaggable.GetHashCode();
         }
         if (Latitude != null)
         {
             hashCode = hashCode * 59 + Latitude.GetHashCode();
         }
         if (Longitude != null)
         {
             hashCode = hashCode * 59 + Longitude.GetHashCode();
         }
         if (LastModified != null)
         {
             hashCode = hashCode * 59 + LastModified.GetHashCode();
         }
         if (Created != null)
         {
             hashCode = hashCode * 59 + Created.GetHashCode();
         }
         if (Creator != null)
         {
             hashCode = hashCode * 59 + Creator.GetHashCode();
         }
         if (Comment != null)
         {
             hashCode = hashCode * 59 + Comment.GetHashCode();
         }
         if (ShareTags != null)
         {
             hashCode = hashCode * 59 + ShareTags.GetHashCode();
         }
         if (SapAsset != null)
         {
             hashCode = hashCode * 59 + SapAsset.GetHashCode();
         }
         if (AssetNumber != null)
         {
             hashCode = hashCode * 59 + AssetNumber.GetHashCode();
         }
         if (SubNumber != null)
         {
             hashCode = hashCode * 59 + SubNumber.GetHashCode();
         }
         if (CompanyCode != null)
         {
             hashCode = hashCode * 59 + CompanyCode.GetHashCode();
         }
         return(hashCode);
     }
 }
コード例 #21
0
        public override int GetHashCode()
        {
            var hashCode =
                Created.GetHashCode() ^
                LastModified.GetHashCode() ^
                Size.GetHashCode() ^
                IsFavorite.GetHashCode() ^
                CommentsCount.GetHashCode() ^
                CommentsUnread.GetHashCode() ^
                ShareTypes.GetHashCode() ^
                HasPreview.GetHashCode();

            if (ContentType != null)
            {
                hashCode ^= ContentType.GetHashCode();
            }

            if (Name != null)
            {
                hashCode ^= Name.GetHashCode();
            }

            if (Path != null)
            {
                hashCode ^= Path.GetHashCode();
            }

            if (CommentsHref != null)
            {
                hashCode ^= CommentsHref.GetHashCode();
            }

            // Is null on directories
            if (ETag != null)
            {
                hashCode ^= ETag.GetHashCode();
            }

            if (!string.IsNullOrEmpty(Id))
            {
                hashCode ^= Id.GetHashCode();
            }

            if (!string.IsNullOrEmpty(FileId))
            {
                hashCode ^= FileId.GetHashCode();
            }

            if (!string.IsNullOrEmpty(OwnderId))
            {
                hashCode ^= OwnderId.GetHashCode();
            }

            if (!string.IsNullOrEmpty(OwnerDisplayName))
            {
                hashCode ^= OwnerDisplayName.GetHashCode();
            }

            if (!string.IsNullOrEmpty(Checksums))
            {
                hashCode ^= Checksums.GetHashCode();
            }

            return(hashCode);
        }