Example #1
0
        public virtual object Clone(Dictionary <object, object> clonedObjects, bool includePrimaryKey)
        {
            BestLimit cloned = new BestLimit();

            clonedObjects.Add(this, cloned);
            if (includePrimaryKey)
            {
                cloned._bestLimitPK = this._bestLimitPK;
            }
            cloned._insCode     = this._insCode;
            cloned._dateTime    = this._dateTime;
            cloned._row         = this._row;
            cloned._buy_Count   = this._buy_Count;
            cloned._buy_Volume  = this._buy_Volume;
            cloned._buy_Price   = this._buy_Price;
            cloned._sell_Price  = this._sell_Price;
            cloned._sell_Volume = this._sell_Volume;
            cloned._sell_Count  = this._sell_Count;


            return(cloned);
        }
Example #2
0
        public virtual bool Equals(object other, List <object> checked_objects)
        {
            if (checked_objects.Contains(this))
            {
                return(true);
            }

            checked_objects.Add(this);

            BestLimit casted_other = other as BestLimit;

            if (casted_other == null)
            {
                checked_objects.Remove(this);
                return(false);
            }

            if (!Typing.IsEquals(this.BestLimitPK, casted_other.BestLimitPK))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.InsCode, casted_other.InsCode))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.DateTime, casted_other.DateTime))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.Row, casted_other.Row))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.Buy_Count, casted_other.Buy_Count))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.Buy_Volume, casted_other.Buy_Volume))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.Buy_Price, casted_other.Buy_Price))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.Sell_Price, casted_other.Sell_Price))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.Sell_Volume, casted_other.Sell_Volume))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.Sell_Count, casted_other.Sell_Count))
            {
                checked_objects.Remove(this);
                return(false);
            }
            checked_objects.Remove(this);

            return(true);
        }