コード例 #1
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 (Label != null)
         {
             hashCode = hashCode * 59 + Label.GetHashCode();
         }
         if (LanguageCode != null)
         {
             hashCode = hashCode * 59 + LanguageCode.GetHashCode();
         }
         if (IsManaged != null)
         {
             hashCode = hashCode * 59 + IsManaged.GetHashCode();
         }
         if (MetadataId != null)
         {
             hashCode = hashCode * 59 + MetadataId.GetHashCode();
         }
         if (HasChanged != null)
         {
             hashCode = hashCode * 59 + HasChanged.GetHashCode();
         }
         return(hashCode);
     }
 }
コード例 #2
0
 public override int GetHashCode()
 {
     return
         (Hash.Combine(StringComparer.OrdinalIgnoreCase.GetHashCode(_filePath ?? string.Empty),
                       Hash.Combine(_assemblyIdentity?.GetHashCode() ?? 0,
                                    Hash.Combine(_metadataId?.GetHashCode() ?? 0,
                                                 Hash.Combine(_language.GetHashCode(),
                                                              Hash.Combine(s_symbolIdComparer.GetHashCode(_symbolId),
                                                                           _allowDecompilation.GetHashCode()))))));
 }
コード例 #3
0
ファイル: MetadataContext.cs プロジェクト: chris-tomich/Glyma
        public override int GetHashCode()
        {
            unchecked
            {
                int hash = 17;

                hash = (hash * 3) + MetadataId.GetHashCode();
                hash = (hash * 5) + NodeUid.GetHashCode();
                hash = (hash * 7) + RelationshipUid.GetHashCode();
                hash = (hash * 13) + DescriptorTypeUid.GetHashCode();

                return(hash);
            }
        }
コード例 #4
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 (Value != null)
         {
             hashCode = hashCode * 59 + Value.GetHashCode();
         }
         if (Color != null)
         {
             hashCode = hashCode * 59 + Color.GetHashCode();
         }
         if (IsManaged != null)
         {
             hashCode = hashCode * 59 + IsManaged.GetHashCode();
         }
         if (ExternalValue != null)
         {
             hashCode = hashCode * 59 + ExternalValue.GetHashCode();
         }
         if (ParentValues != null)
         {
             hashCode = hashCode * 59 + ParentValues.GetHashCode();
         }
         if (MetadataId != null)
         {
             hashCode = hashCode * 59 + MetadataId.GetHashCode();
         }
         if (HasChanged != null)
         {
             hashCode = hashCode * 59 + HasChanged.GetHashCode();
         }
         if (Label != null)
         {
             hashCode = hashCode * 59 + Label.GetHashCode();
         }
         if (Description != null)
         {
             hashCode = hashCode * 59 + Description.GetHashCode();
         }
         return(hashCode);
     }
 }
コード例 #5
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 (LogicalName != null)
         {
             hashCode = hashCode * 59 + LogicalName.GetHashCode();
         }
         if (MetadataId != null)
         {
             hashCode = hashCode * 59 + MetadataId.GetHashCode();
         }
         if (OptionSet != null)
         {
             hashCode = hashCode * 59 + OptionSet.GetHashCode();
         }
         return(hashCode);
     }
 }
コード例 #6
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 (OdataContext != null)
         {
             hashCode = hashCode * 59 + OdataContext.GetHashCode();
         }
         if (OdataType != null)
         {
             hashCode = hashCode * 59 + OdataType.GetHashCode();
         }
         if (ParentOptionSetName != null)
         {
             hashCode = hashCode * 59 + ParentOptionSetName.GetHashCode();
         }
         if (IsCustomOptionSet != null)
         {
             hashCode = hashCode * 59 + IsCustomOptionSet.GetHashCode();
         }
         if (IsGlobal != null)
         {
             hashCode = hashCode * 59 + IsGlobal.GetHashCode();
         }
         if (IsManaged != null)
         {
             hashCode = hashCode * 59 + IsManaged.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (ExternalTypeName != null)
         {
             hashCode = hashCode * 59 + ExternalTypeName.GetHashCode();
         }
         if (OptionSetType != null)
         {
             hashCode = hashCode * 59 + OptionSetType.GetHashCode();
         }
         if (IntroducedVersion != null)
         {
             hashCode = hashCode * 59 + IntroducedVersion.GetHashCode();
         }
         if (MetadataId != null)
         {
             hashCode = hashCode * 59 + MetadataId.GetHashCode();
         }
         if (HasChanged != null)
         {
             hashCode = hashCode * 59 + HasChanged.GetHashCode();
         }
         if (Options != null)
         {
             hashCode = hashCode * 59 + Options.GetHashCode();
         }
         if (Description != null)
         {
             hashCode = hashCode * 59 + Description.GetHashCode();
         }
         if (DisplayName != null)
         {
             hashCode = hashCode * 59 + DisplayName.GetHashCode();
         }
         if (IsCustomizable != null)
         {
             hashCode = hashCode * 59 + IsCustomizable.GetHashCode();
         }
         return(hashCode);
     }
 }