예제 #1
0
 public virtual void Visit(SqlUserFunctionCall node)
 {
     foreach (SqlExpression argument in node.Arguments)
     {
         VisitInternal(argument);
     }
 }
예제 #2
0
        public void SqlUserFunctionCallReplacingTest()
        {
            SqlUserFunctionCall ufc          = SqlDml.FunctionCall("Func1", 1, 2, 3);
            SqlUserFunctionCall ufcReplacing = SqlDml.FunctionCall("Func2", "string");

            ufc.ReplaceWith(ufcReplacing);

            bool passed = false;

            try {
                ufc.ReplaceWith(1);
            }
            catch {
                passed = true;
            }

            Assert.IsTrue(passed);
            Assert.AreNotEqual(ufc, ufcReplacing);
            Assert.AreEqual(ufc.NodeType, ufcReplacing.NodeType);
            Assert.AreEqual(ufc.Name, ufcReplacing.Name);
            Assert.AreEqual(ufc.FunctionType, ufcReplacing.FunctionType);
            Assert.AreEqual(ufc.Arguments.Count, ufcReplacing.Arguments.Count);
            for (int i = 0, l = ufc.Arguments.Count; i < l; i++)
            {
                Assert.AreEqual(ufc.Arguments[i], ufcReplacing.Arguments[i]);
            }
        }
예제 #3
0
 public void Visit(SqlUserFunctionCall node)
 {
     foreach (var argument in node.Arguments)
     {
         Visit(argument);
     }
 }