コード例 #1
0
        public virtual object Clone(Dictionary <object, object> clonedObjects, bool includePrimaryKey)
        {
            InstrumentCategory cloned = new InstrumentCategory();

            clonedObjects.Add(this, cloned);
            if (includePrimaryKey)
            {
                cloned._instrumentCategoryPK = this._instrumentCategoryPK;
            }
            cloned._name    = this._name;
            cloned._cSecVal = this._cSecVal;


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

            checked_objects.Add(this);

            InstrumentCategory casted_other = other as InstrumentCategory;

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

            if (!Typing.IsEquals(this.InstrumentCategoryPK, casted_other.InstrumentCategoryPK))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.Name, casted_other.Name))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.CSecVal, casted_other.CSecVal))
            {
                checked_objects.Remove(this);
                return(false);
            }
            checked_objects.Remove(this);

            return(true);
        }