Beispiel #1
0
        // ignores EventTime intentionally
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = FunctionName != null?FunctionName.GetHashCode() : 0;

                hashCode = (hashCode * 397) ^ (int)ExecutionStage;
                hashCode = (hashCode * 397) ^ (TriggerType != null ? TriggerType.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ Success.GetHashCode();
                return(hashCode);
            }
        }
Beispiel #2
0
        /// <summary>
        ///     Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                var hash = 41;
                // Suitable nullity checks etc, of course :)

                if (Id != null)
                {
                    hash = hash * 57 + Id.GetHashCode();
                }

                if (Body != null)
                {
                    hash = hash * 57 + Body.GetHashCode();
                }

                if (TriggerOperation != null)
                {
                    hash = hash * 57 + TriggerOperation.GetHashCode();
                }

                if (TriggerType != null)
                {
                    hash = hash * 57 + TriggerType.GetHashCode();
                }

                if (Rid != null)
                {
                    hash = hash * 57 + Rid.GetHashCode();
                }

                if (Ts != null)
                {
                    hash = hash * 57 + Ts.GetHashCode();
                }

                if (Self != null)
                {
                    hash = hash * 57 + Self.GetHashCode();
                }

                if (Etag != null)
                {
                    hash = hash * 57 + Etag.GetHashCode();
                }

                return(hash);
            }
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (PositionX != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(PositionX);
            }
            if (PositionY != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(PositionY);
            }
            if (Direction != 0)
            {
                hash ^= Direction.GetHashCode();
            }
            if (ObjType != 0)
            {
                hash ^= ObjType.GetHashCode();
            }
            if (BlockType != 0)
            {
                hash ^= BlockType.GetHashCode();
            }
            if (DishType != 0)
            {
                hash ^= DishType.GetHashCode();
            }
            if (ToolType != 0)
            {
                hash ^= ToolType.GetHashCode();
            }
            if (TriggerType != 0)
            {
                hash ^= TriggerType.GetHashCode();
            }
            if (IsMoving != false)
            {
                hash ^= IsMoving.GetHashCode();
            }
            if (RecieveText.Length != 0)
            {
                hash ^= RecieveText.GetHashCode();
            }
            if (Team != 0)
            {
                hash ^= Team.GetHashCode();
            }
            if (SightRange != 0)
            {
                hash ^= SightRange.GetHashCode();
            }
            if (MoveSpeed != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(MoveSpeed);
            }
            if (MaxThrowDistance != 0)
            {
                hash ^= MaxThrowDistance.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
 public override int GetHashCode()
 {
     return(31 * trigger.GetHashCode() + 11 * type.GetHashCode() + 41 * targetTrack.GetHashCode());
 }
Beispiel #5
0
 public override int GetHashCode()
 {
     return(code.GetHashCode() ^ trigger.GetHashCode());
 }
Beispiel #6
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (PositionX != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(PositionX);
            }
            if (PositionY != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(PositionY);
            }
            if (Width != 0)
            {
                hash ^= Width.GetHashCode();
            }
            if (Height != 0)
            {
                hash ^= Height.GetHashCode();
            }
            if (Direction != 0)
            {
                hash ^= Direction.GetHashCode();
            }
            if (ObjType != 0)
            {
                hash ^= ObjType.GetHashCode();
            }
            if (BlockType != 0)
            {
                hash ^= BlockType.GetHashCode();
            }
            if (DishType != 0)
            {
                hash ^= DishType.GetHashCode();
            }
            if (ToolType != 0)
            {
                hash ^= ToolType.GetHashCode();
            }
            if (TriggerType != 0)
            {
                hash ^= TriggerType.GetHashCode();
            }
            if (IsMoving != false)
            {
                hash ^= IsMoving.GetHashCode();
            }
            hash ^= buff_.GetHashCode();
            if (SpeakText.Length != 0)
            {
                hash ^= SpeakText.GetHashCode();
            }
            if (Team != 0)
            {
                hash ^= Team.GetHashCode();
            }
            if (SightRange != 0)
            {
                hash ^= SightRange.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }