Exemplo n.º 1
0
        /// <summary>
        ///     Returns true if OrderSubscriptionMessage instances are equal
        /// </summary>
        /// <param name="other">Instance of OrderSubscriptionMessage to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(OrderSubscriptionMessage other)
        {
            // credit: http://stackoverflow.com/a/10454552/677735
            if (other == null)
            {
                return(false);
            }

            return((Op == other.Op || Op != null && Op.Equals(other.Op)) &&
                   (Id == other.Id || Id != null && Id.Equals(other.Id)) &&
                   (SegmentationEnabled == other.SegmentationEnabled || SegmentationEnabled != null && SegmentationEnabled.Equals(other.SegmentationEnabled)) &&
                   (OrderFilter == other.OrderFilter || OrderFilter != null && OrderFilter.Equals(other.OrderFilter)) &&
                   (Clk == other.Clk || Clk != null && Clk.Equals(other.Clk)) &&
                   (HeartbeatMs == other.HeartbeatMs || HeartbeatMs != null && HeartbeatMs.Equals(other.HeartbeatMs)) &&
                   (InitialClk == other.InitialClk || InitialClk != null && InitialClk.Equals(other.InitialClk)) &&
                   (ConflateMs == other.ConflateMs || ConflateMs != null && ConflateMs.Equals(other.ConflateMs)));
        }
        /// <summary>
        ///     Returns true if OrderChangeMessage instances are equal
        /// </summary>
        /// <param name="other">Instance of OrderChangeMessage to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(OrderChangeMessage other)
        {
            // credit: http://stackoverflow.com/a/10454552/677735
            if (other == null)
            {
                return(false);
            }

            return((Op == other.Op || Op != null && Op.Equals(other.Op)) &&
                   (Id == other.Id || Id != null && Id.Equals(other.Id)) &&
                   (Ct == other.Ct || Ct != null && Ct.Equals(other.Ct)) &&
                   (Clk == other.Clk || Clk != null && Clk.Equals(other.Clk)) &&
                   (HeartbeatMs == other.HeartbeatMs || HeartbeatMs != null && HeartbeatMs.Equals(other.HeartbeatMs)) &&
                   (Pt == other.Pt || Pt != null && Pt.Equals(other.Pt)) &&
                   (Oc == other.Oc || Oc != null && Oc.SequenceEqual(other.Oc)) &&
                   (InitialClk == other.InitialClk || InitialClk != null && InitialClk.Equals(other.InitialClk)) &&
                   (ConflateMs == other.ConflateMs || ConflateMs != null && ConflateMs.Equals(other.ConflateMs)) &&
                   (SegmentType == other.SegmentType || SegmentType != null && SegmentType.Equals(other.SegmentType)));
        }