public override void ReplaceWith(SqlExpression expression)
        {
            ArgumentValidator.EnsureArgumentNotNull(expression, "expression");
            ArgumentValidator.EnsureArgumentIs <SqlUserFunctionCall>(expression, "expression");
            SqlUserFunctionCall replacingExpression = expression as SqlUserFunctionCall;

            name = replacingExpression.Name;
            Arguments.Clear();
            foreach (SqlExpression argument in replacingExpression.Arguments)
            {
                Arguments.Add(argument);
            }
        }
        internal override object Clone(SqlNodeCloneContext context)
        {
            if (context.NodeMapping.ContainsKey(this))
            {
                return(context.NodeMapping[this]);
            }

            SqlUserFunctionCall clone = new SqlUserFunctionCall(name);

            for (int i = 0, l = Arguments.Count; i < l; i++)
            {
                clone.Arguments.Add((SqlExpression)Arguments[i].Clone(context));
            }
            context.NodeMapping[this] = clone;
            return(clone);
        }