示例#1
0
        public object Clone()
        {
            var newWhere    = WHERE.Clone() as StrSepararorPatt;
            var clone       = new SqlSELECT(SELECT.ToArray(), FROM, newWhere.ToArray());
            var newWhereLst = new SortedList <string, object>();

            foreach (var pair in WhereLst)
            {
                var val = StrPatt.GetClone(pair.Value);
                newWhereLst.Add(pair.Key, val);
            }
            clone.WhereLst = newWhereLst;
            if (PriorWhere != null)
            {
                clone.PriorWhere = String.Copy(PriorWhere);
            }
            if (ORDER_BY != null)
            {
                clone.ORDER_BY = String.Copy(ORDER_BY);
            }
            if (GROUP_BY != null)
            {
                clone.GROUP_BY = String.Copy(GROUP_BY);
            }
            clone.EnablePartition = EnablePartition;
            clone.distinct        = distinct;
            return(clone);
        }
示例#2
0
        public object Clone()
        {
            var clone = new StrPatt(source);

            foreach (object o in this)
            {
                clone.Add(GetClone(o));
            }
            return(clone);
        }
示例#3
0
 public void SaveState() // запоминает свой текущий клон
 {
     thisClone = Clone() as StrPatt;
 }