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

            checked_objects.Add(this);

            ShortLink casted_other = other as ShortLink;

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

            if (!Typing.IsEquals(this.ShortLinkPK, casted_other.ShortLinkPK))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.OrginalLink, casted_other.OrginalLink))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.Title, casted_other.Title))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.Code, casted_other.Code))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.ReferCount, casted_other.ReferCount))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.CreateDate, casted_other.CreateDate))
            {
                checked_objects.Remove(this);
                return(false);
            }
            checked_objects.Remove(this);

            return(true);
        }
Example #2
0
        public virtual object Clone(Dictionary <object, object> clonedObjects, bool includePrimaryKey)
        {
            ShortLink cloned = new ShortLink();

            clonedObjects.Add(this, cloned);
            if (includePrimaryKey)
            {
                cloned._shortLinkPK = this._shortLinkPK;
            }
            cloned._orginalLink = this._orginalLink;
            cloned._title       = this._title;
            cloned._code        = this._code;
            cloned._referCount  = this._referCount;
            cloned._createDate  = this._createDate;


            return(cloned);
        }