Esempio n. 1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Data1.Length != 0)
            {
                hash ^= Data1.GetHashCode();
            }
            if (Data2.Length != 0)
            {
                hash ^= Data2.GetHashCode();
            }
            if (Data3.Length != 0)
            {
                hash ^= Data3.GetHashCode();
            }
            if (myOneOfCase_ == MyOneOfOneofCase.One)
            {
                hash ^= One.GetHashCode();
            }
            if (myOneOfCase_ == MyOneOfOneofCase.Two)
            {
                hash ^= Two.GetHashCode();
            }
            if (myOneOfCase_ == MyOneOfOneofCase.Three)
            {
                hash ^= Three.GetHashCode();
            }
            hash ^= (int)myOneOfCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Esempio n. 2
0
 /// <summary>
 /// Returns a hash-code based on the current value of this object.
 /// </summary>
 public override int GetHashCode()
 {
     return
         (Data1.GetHashCode() ^
          Data2.GetHashCode() ^
          Data3.GetHashCode());
 }
Esempio n. 3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Line != 0)
            {
                hash ^= Line.GetHashCode();
            }
            if (Pattern != 0)
            {
                hash ^= Pattern.GetHashCode();
            }
            if (Type != 0)
            {
                hash ^= Type.GetHashCode();
            }
            if (Data1 != 0)
            {
                hash ^= Data1.GetHashCode();
            }
            if (Data2 != 0)
            {
                hash ^= Data2.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Esempio n. 4
0
 public override int GetHashCode()
 {
     if (Data1 == null)
     {
         return(NestedComponent.GetHashCode());
     }
     return(Data1.GetHashCode() ^ NestedComponent.GetHashCode());
 }
Esempio n. 5
0
        public override int GetHashCode()
        {
            var hashCode = 1603895772;

            hashCode = hashCode * -1521134295 + base.GetHashCode();
            hashCode = hashCode * -1521134295 + Type.GetHashCode();
            hashCode = hashCode * -1521134295 + Label.GetHashCode();
            hashCode = hashCode * -1521134295 + Offset.GetHashCode();
            hashCode = hashCode * -1521134295 + Data1.GetHashCode();
            hashCode = hashCode * -1521134295 + Data2.GetHashCode();
            return(hashCode);
        }
Esempio n. 6
0
        public override int GetHashCode()
        {
            int hash = 19;

            unchecked
            {
                hash = hash + 31 * Data0.GetHashCode();
                hash = hash * 479 + Data1.GetHashCode();
                hash = hash * 593 + Data2.GetHashCode();
                hash = hash * 347 + Data3.GetHashCode();
            }
            return(hash);
        }
Esempio n. 7
0
        public override int GetHashCode()
        {
            int hash = 19;

            unchecked
            {
                hash = hash * 31 + Data0.GetHashCode();
                hash = hash * 31 + Data1.GetHashCode();
                hash = hash * 31 + Data2.GetHashCode();
                hash = hash * 31 + Data3.GetHashCode();
            }
            return(hash);
        }
Esempio n. 8
0
        public override int GetHashCode()
        {
            int hash = 311;

            unchecked
            {
                hash = hash + 709 * Data0.GetHashCode();
                hash = hash * 443 + Data1.GetHashCode();
                hash = hash * 269 + Data2.GetHashCode();
                hash = hash * 653 + Data3.GetHashCode();
            }
            return(hash);
        }
Esempio n. 9
0
        public override int GetHashCode()
        {
            // .NET Standard does not have this method
#if DEBUG
            return(HashCode.Combine(Data1, Data2, Data3, Data4));
#else
            int hashCode = -0x8CAC62A;
            hashCode = hashCode * -0x5AAAAAD7 + Data1.GetHashCode();
            hashCode = hashCode * -0x5AAAAAD7 + Data2.GetHashCode();
            hashCode = hashCode * -0x5AAAAAD7 + Data3.GetHashCode();
            hashCode = hashCode * -0x5AAAAAD7 + EqualityComparer <byte[]> .Default.GetHashCode(Data4);

            return(hashCode);
#endif
        }
Esempio n. 10
0
        public override int GetHashCode()
        {
            var strHash = Data1 != null?Data1.GetHashCode() : 0;

            return(Id.GetHashCode() ^ strHash.GetHashCode() ^ Data2);
        }