Example #1
0
        public object Clone()
        {
            SHOr clone = new SHOr();

            if (this.and != null)
            {
                clone.and = (SHAnd)this.and.Clone();
            }
            else
            {
                clone.and = null;
            }

            if (this.or != null)
            {
                clone.or = (SHOr)this.or.Clone();
            }
            else
            {
                clone.or = null;
            }

            foreach (SHCondition obj in dataList)
            {
                clone.dataList.Add((SHCondition)obj.Clone());
            }

            return(clone);
        }
Example #2
0
        public void Assign(SHConditions srcConds)
        {
            _comment = srcConds._comment;

            if (srcConds.and != null)
            {
                this.and = (SHAnd)srcConds.and.Clone();
            }
            else
            {
                this.and = null;
            }

            if (srcConds.or != null)
            {
                this.or = (SHOr)srcConds.or.Clone();
            }
            else
            {
                this.or = null;
            }


            dataList.Clear();

            foreach (SHCondition obj in srcConds.dataList)
            {
                dataList.Add((SHCondition)obj.Clone());
            }
        }