コード例 #1
0
 public override int GetHashCode()
 {
     return(Name.GetHashCode() ^
            (Type ?? "").GetHashCode() ^
            IsOptional.GetHashCode() ^
            (DefaultValue ?? "").GetHashCode());
 }
コード例 #2
0
 /// <summary>
 /// Serves as a hash function for a particular type.
 /// </summary>
 /// <returns>
 /// A hash code for the current <see cref="T:System.Object"/>.
 /// </returns>
 /// <filterpriority>2</filterpriority>
 public override Int32 GetHashCode()
 {
     unchecked
     {
         var hashCode = IsOptional.GetHashCode();
         hashCode = (hashCode * 397) ^ (DefaultValue != null ? DefaultValue.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ArgumentType != null ? ArgumentType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ArgumentName != null ? ArgumentName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Position.GetHashCode();
         return(hashCode);
     }
 }
コード例 #3
0
 /// <summary>
 /// Returns the hash code for this instance.
 /// </summary>
 /// <returns>
 /// A 32-bit signed integer that is the hash code for this instance.
 /// </returns>
 public override Int32 GetHashCode()
 {
     unchecked
     {
         var hashCode = Name?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ (DefaultValue?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (ArgumentType?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ IsOptional.GetHashCode();
         hashCode = (hashCode * 397) ^ Position.GetHashCode();
         return(hashCode);
     }
 }
コード例 #4
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Marks != null ? Marks.GetItemHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Groups != null ? Groups.GetItemHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ViewModelId != null ? ViewModelId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IsList.GetHashCode();
         hashCode = (hashCode * 397) ^ IsOptional.GetHashCode();
         hashCode = (hashCode * 397) ^ (DefaultValue != null ? DefaultValue.GetHashCode() : 0);
         return(hashCode);
     }
 }
コード例 #5
0
 public override int GetHashCode()
 {
     unchecked
     {
         int result = base.GetHashCode();
         result = (result * 397) ^ (Fragment != null ? Fragment.GetHashCode() : 0);
         result = (result * 397) ^ (Restrict != null ? Restrict.GetHashCode() : 0);
         result = (result * 397) ^ (Terminus.HasValue ? Terminus.Value.GetHashCode() : 0);
         result = (result * 397) ^ (MinFragmentLength.HasValue ? MinFragmentLength.Value : 0);
         result = (result * 397) ^ (SettingsCustomIon != null ? SettingsCustomIon.GetHashCode() : 0);
         result = (result * 397) ^ Charge;
         result = (result * 397) ^ IsOptional.GetHashCode();
         return(result);
     }
 }
コード例 #6
0
        public override int GetHashCode()
        {
            unchecked
            {
                int hashCode = Name != null?Name.GetHashCode() : 0;

                hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (DataType != null ? DataType.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ ValueRank;
                hashCode = (hashCode * 397) ^ IsOptional.GetHashCode();
                hashCode = (hashCode * 397) ^ (ArrayDimension != null ? ArrayDimension.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (int)MaxStringLength;
                return(hashCode);
            }
        }
コード例 #7
0
 public override int GetHashCode() => RefKind.GetHashCode() ^ Name.GetHashCode() ^ TypeName.GetHashCode() ^ IsOptional.GetHashCode();