예제 #1
0
 /// <summary>
 /// Equality check
 /// </summary>
 /// <param name="other">Object for comparison</param>
 /// <returns>Equality check result</returns>
 public bool Equals(TickVolumeData other)
 {
     return(Time == other.Time &&
            Ask.Equals(other.Ask) &&
            Bid.Equals(other.Bid) &&
            Volume.Equals(other.Volume));
 }
예제 #2
0
 protected bool Equals(OptionViewModel other)
 {
     return(string.Equals(OptionNumber, other.OptionNumber) &&
            Bid.Equals(other.Bid) &&
            BidVolume == other.BidVolume &&
            Ask.Equals(other.Ask) &&
            AskVolume == other.AskVolume &&
            Volume == other.Volume &&
            Bid2.Equals(other.Bid2) &&
            BidVolume2 == other.BidVolume2 &&
            Ask2.Equals(other.Ask2) &&
            AskVolume2 == other.AskVolume2 &&
            Bid3.Equals(other.Bid3) &&
            BidVolume3 == other.BidVolume3 &&
            Ask3.Equals(other.Ask3) &&
            AskVolume3 == other.AskVolume3 &&
            Bid4.Equals(other.Bid4) &&
            BidVolume4 == other.BidVolume4 &&
            Ask4.Equals(other.Ask4) &&
            AskVolume4 == other.AskVolume4 &&
            Bid5.Equals(other.Bid5) &&
            BidVolume5 == other.BidVolume5 &&
            Ask5.Equals(other.Ask5) &&
            AskVolume5 == other.AskVolume5 &&
            Equals(Greeks, other.Greeks) &&
            OpenInterest == other.OpenInterest &&
            Turnover.Equals(other.Turnover) &&
            UncoveredPositionQuantity == other.UncoveredPositionQuantity &&
            PreviousSettlementPrice.Equals(other.PreviousSettlementPrice) &&
            OpeningPrice.Equals(other.OpeningPrice) &&
            AuctionReferencePrice.Equals(other.AuctionReferencePrice) &&
            AuctionReferenceQuantity == other.AuctionReferenceQuantity &&
            HighestPrice.Equals(other.HighestPrice) &&
            LowestPrice.Equals(other.LowestPrice) &&
            LatestTradedPrice.Equals(other.LatestTradedPrice) &&
            Change.Equals(other.Change) &&
            ChangePercentage.Equals(other.ChangePercentage) &&
            PreviousClose.Equals(other.PreviousClose) &&
            string.Equals(Name, other.Name));
 }
예제 #3
0
 /// <summary>
 /// Equality check
 /// </summary>
 /// <param name="other">Object for comparison</param>
 /// <returns>Equality check result</returns>
 public bool Equals(TickData other)
 {
     return(Time == other.Time &&
            Ask.Equals(other.Ask) &&
            Bid.Equals(other.Bid));
 }
예제 #4
0
        /// <summary>
        /// Returns true if SingleQuote instances are equal
        /// </summary>
        /// <param name="other">Instance of SingleQuote to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(SingleQuote other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Ch == other.Ch ||
                     Ch != null &&
                     Ch.Equals(other.Ch)
                     ) &&
                 (
                     Chp == other.Chp ||
                     Chp != null &&
                     Chp.Equals(other.Chp)
                 ) &&
                 (
                     Lp == other.Lp ||
                     Lp != null &&
                     Lp.Equals(other.Lp)
                 ) &&
                 (
                     Ask == other.Ask ||
                     Ask != null &&
                     Ask.Equals(other.Ask)
                 ) &&
                 (
                     Bid == other.Bid ||
                     Bid != null &&
                     Bid.Equals(other.Bid)
                 ) &&
                 (
                     OpenPrice == other.OpenPrice ||
                     OpenPrice != null &&
                     OpenPrice.Equals(other.OpenPrice)
                 ) &&
                 (
                     HighPrice == other.HighPrice ||
                     HighPrice != null &&
                     HighPrice.Equals(other.HighPrice)
                 ) &&
                 (
                     LowPrice == other.LowPrice ||
                     LowPrice != null &&
                     LowPrice.Equals(other.LowPrice)
                 ) &&
                 (
                     PrevClosePrice == other.PrevClosePrice ||
                     PrevClosePrice != null &&
                     PrevClosePrice.Equals(other.PrevClosePrice)
                 ) &&
                 (
                     Volume == other.Volume ||
                     Volume != null &&
                     Volume.Equals(other.Volume)
                 ));
        }