Beispiel #1
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 (Op != null)
                {
                    hash = hash * 59 + Op.GetHashCode();
                }

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

                if (SegmentationEnabled != null)
                {
                    hash = hash * 59 + SegmentationEnabled.GetHashCode();
                }

                if (Clk != null)
                {
                    hash = hash * 59 + Clk.GetHashCode();
                }

                if (HeartbeatMs != null)
                {
                    hash = hash * 59 + HeartbeatMs.GetHashCode();
                }

                if (InitialClk != null)
                {
                    hash = hash * 59 + InitialClk.GetHashCode();
                }

                if (MarketFilter != null)
                {
                    hash = hash * 59 + MarketFilter.GetHashCode();
                }

                if (ConflateMs != null)
                {
                    hash = hash * 59 + ConflateMs.GetHashCode();
                }

                if (MarketDataFilter != null)
                {
                    hash = hash * 59 + MarketDataFilter.GetHashCode();
                }

                return(hash);
            }
        }