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

            checked_objects.Add(this);

            HelpInformation casted_other = other as HelpInformation;

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

            if (!Typing.IsEquals(this.HelpInfoPK, casted_other.HelpInfoPK))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.FormName, casted_other.FormName))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.FieldName, casted_other.FieldName))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.Text, casted_other.Text))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.RoleName, casted_other.RoleName))
            {
                checked_objects.Remove(this);
                return(false);
            }
            checked_objects.Remove(this);

            return(true);
        }
コード例 #2
0
        public virtual object Clone(Dictionary <object, object> clonedObjects, bool includePrimaryKey)
        {
            HelpInformation cloned = new HelpInformation();

            clonedObjects.Add(this, cloned);
            if (includePrimaryKey)
            {
                cloned._helpInfoPK = this._helpInfoPK;
            }
            cloned._formName  = this._formName;
            cloned._fieldName = this._fieldName;
            cloned._text      = this._text;
            cloned._roleName  = this._roleName;


            return(cloned);
        }