Exemplo n.º 1
0
        public ICloneableElement Clone(Dictionary <ICloneableElement, ICloneableElement> objectTree, Predicate <ICloneableElement> doClone)
        {
            if (!doClone(this))
            {
                return(this);
            }

            ICloneableElement clone;

            if (!objectTree.TryGetValue(this, out clone))
            {
                objectTree.Add(this, clone = new SqlBinaryExpression(
                                   _systemType,
                                   (ISqlExpression)_expr1.Clone(objectTree, doClone),
                                   _operation,
                                   (ISqlExpression)_expr2.Clone(objectTree, doClone),
                                   _precedence));
            }

            return(clone);
        }
Exemplo n.º 2
0
            public override ICloneableElement Clone(Dictionary <ICloneableElement, ICloneableElement> objectTree, Predicate <ICloneableElement> doClone)
            {
                if (!doClone(this))
                {
                    return(this);
                }

                ICloneableElement clone;

                if (!objectTree.TryGetValue(this, out clone))
                {
                    var col = new ExprColumn((QuerySource)QuerySource.Clone(objectTree, doClone), Expr, _alias);

                    if (_sqlExpression != null)
                    {
                        col._sqlExpression = (ISqlExpression)_sqlExpression.Clone(objectTree, doClone);
                    }

                    objectTree.Add(this, clone = col);
                }

                return(clone);
            }