GetHashCode() public static method

public static GetHashCode ( ) : int
return int
        public void GetHashCode_4Arguments_ReverseOrderDiffers(object arg1, object arg2, object arg3, object arg4)
        {
            var hash1 = HashHelper.GetHashCode(arg1, arg2, arg3, arg4);
            var hash2 = HashHelper.GetHashCode(arg4, arg3, arg2, arg1);

            Assert.NotEqual(hash1, hash2);
        }
        public void GetHashCode_5Arguments_Persists(object arg1, object arg2, object arg3, object arg4, object arg5)
        {
            var hash1 = HashHelper.GetHashCode(arg1, arg2, arg3, arg4, arg5);
            var hash2 = HashHelper.GetHashCode(arg1, arg2, arg3, arg4, arg5);

            Assert.Equal(hash1, hash2);
        }
        public void GetHashCode_AllNullArguments_Persists(object arg1, object arg2)
        {
            var hash1 = HashHelper.GetHashCode(arg1, arg2);
            var hash2 = HashHelper.GetHashCode(arg1, arg2);

            Assert.Equal(hash1, hash2);
        }
Example #4
0
 public override int GetHashCode()
 {
     return(HashHelper.GetHashCode(
                this.MessageID,
                this.Version)
            .CombineHashCode(this.ProtocolKey));
 }
        public void GetHashCode_10Arguments_ReverseOrderDiffers(object arg1, object arg2, object arg3, object arg4, object arg5,
                                                                object arg6, object arg7, object arg8, object arg9, object arg10)
        {
            var hash1 = HashHelper.GetHashCode(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
            var hash2 = HashHelper.GetHashCode(arg10, arg9, arg8, arg7, arg6, arg5, arg4, arg3, arg2, arg1);

            Assert.NotEqual(hash1, hash2);
        }
        public void GetHashCode_10Arguments_Persists(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6,
                                                     object arg7, object arg8, object arg9, object arg10)
        {
            var hash1 = HashHelper.GetHashCode(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
            var hash2 = HashHelper.GetHashCode(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);

            Assert.Equal(hash1, hash2);
        }
Example #7
0
 public override int GetHashCode()
 {
     if (this.IsNull)
     {
         return(schema.GetHashCode());
     }
     else
     {
         return(HashHelper.GetHashCode(this.Schema.Fields.Select(f => this.GetField(f.Index))));
     }
 }
Example #8
0
        public override int GetHashCode()
        {
            int hash = schema.GetHashCode();

            if (list != null)
            {
                hash ^= HashHelper.GetHashCode(list.Take(8));
                hash ^= list.Count + 1;
            }
            return(hash);
        }
Example #9
0
        public override int GetHashCode()
        {
            if (_hashCode != 0)
            {
                return(_hashCode);
            }

            _hashCode = HashHelper.GetHashCode(string.IsNullOrEmpty(Id) ? Name : Id);

            return(_hashCode);
        }
Example #10
0
        public override int GetHashCode()
        {
            if (_hashCode != 0)
            {
                return(_hashCode);
            }

            _hashCode = HashHelper.GetHashCode(IsTransient ? Text : Id);

            return(_hashCode);
        }
Example #11
0
 /// <summary>
 /// Constructs a hash code used in the collections.
 /// </summary>
 /// <returns>Hash code of the object.</returns>
 public override int GetHashCode()
 {
     return(HashHelper.GetHashCode("equals", LeftArgument, RightArgument));
 }
 public override int GetHashCode()
 {
     return(HashHelper.GetHashCode(this.FolderKey, this.NumberOfItemsWithTheTimestampRead, this.Time, this.VerificationLastReadItemHash));
 }
Example #13
0
 public override int GetHashCode()
 {
     return(HashHelper.GetHashCode(this.Amount, this.Currency ?? string.Empty));
 }
Example #14
0
 /// <summary>
 /// Constructs a hash code used in the collections.
 /// </summary>
 /// <returns>Hash code of the object.</returns>
 public override int GetHashCode()
 {
     return HashHelper.GetHashCode(Children).CombineHashCode("*");
 }
Example #15
0
 public override int GetHashCode() => HashHelper.GetHashCode(Type, Dialect, _tableHash);
Example #16
0
 /// <summary>
 ///     Computes the Hashcode for the <see cref="FftSeries" />.
 /// </summary>
 /// <returns>The Hashcode.</returns>
 public override int GetHashCode()
 {
     return(HashHelper.GetHashCode(this.N, this.SampleRate));
 }
Example #17
0
 public override int GetHashCode()
 {
     return(HashHelper.GetHashCode(this.Name, this.Value));
 }
Example #18
0
 /// <summary>
 /// Constructs a hash code used in the collections.
 /// </summary>
 /// <returns>Hash code of the object.</returns>
 public override int GetHashCode()
 {
     return(HashHelper.GetHashCode(State, Labels));
 }
Example #19
0
 /// <summary>
 /// Constructs a hash code used in the collections.
 /// </summary>
 /// <returns>Hash code of the object.</returns>
 public override int GetHashCode()
 {
     return(HashHelper.GetHashCode("forall", Parameters, Child));
 }
Example #20
0
 /// <summary>
 /// Constructs a hash code used in the collections.
 /// </summary>
 /// <returns>Hash code of the object.</returns>
 public override int GetHashCode()
 {
     return(HashHelper.GetHashCode(this));
 }
Example #21
0
 /// <summary>
 /// Constructs a hash code used in the collections.
 /// </summary>
 /// <returns>Hash code of the object.</returns>
 public override int GetHashCode()
 {
     return(HashHelper.GetHashCode(LeftArgument, RightArgument, IsNegated, "EqualsLiteralCNF"));
 }
Example #22
0
 /// <summary>
 /// Constructs a hash code used in the collections.
 /// </summary>
 /// <returns>Hash code of the object.</returns>
 public override int GetHashCode()
 {
     return(HashHelper.GetHashCode("var", NameId));
 }
Example #23
0
 /// <summary>
 /// Creates a hash code over Frame, Translation and Rotation.
 /// </summary>
 public override int GetHashCode() =>
 HashHelper.GetHashCode(this.Frame, this.Translation, this.Rotation);
Example #24
0
 public override int GetHashCode()
 {
     return(base.GetHashCode() + HashHelper.GetHashCode(Source, Destination));
 }
Example #25
0
 public override int GetHashCode()
 => HashHelper.GetHashCode(Type, Inherit, IncludePrivate);
Example #26
0
 /// <summary>
 /// Constructs a hash code used in the collections.
 /// </summary>
 /// <returns>Hash code of the object.</returns>
 public override int GetHashCode()
 {
     return(HashHelper.GetHashCode(Terms).CombineHashCode(NameId));
 }
Example #27
0
 /// <summary>
 /// Constructs a hash code used in the collections.
 /// </summary>
 /// <returns>Hash code of the object.</returns>
 public override int GetHashCode()
 {
     return(HashHelper.GetHashCode(NameId, "const"));
 }
Example #28
0
 public override int GetHashCode()
 {
     return(HashHelper.GetHashCode(this.Longitude, this.Latitude));
 }
Example #29
0
 /// <summary>
 /// Constructs a hash code used in the collections.
 /// </summary>
 /// <returns>Hash code of the object.</returns>
 public override int GetHashCode()
 {
     return(HashHelper.GetHashCode("scale-up", FunctionAtom, Value));
 }
Example #30
0
 /// <summary>
 /// Constructs a hash code used in the collections.
 /// </summary>
 /// <returns>Hash code of the object.</returns>
 public override int GetHashCode()
 {
     return(HashHelper.GetHashCode(this).CombineHashCode("Conditions"));
 }