Exemple #1
0
 /// <summary>
 ///     Visit Case node in BFS manner.
 /// </summary>
 /// <param name="node">Case node that will be visited.</param>
 public void Visit(CaseNode node)
 {
     node.Accept(_visitor);
     foreach (var item in node.Descendants)
     {
         item.Accept(this);
     }
 }
        public void Visit(CaseNode node)
        {
            node.Else.Accept(this);

            for (int i = node.WhenThenPairs.Length - 1; i >= 0; --i)
            {
                node.WhenThenPairs[i].When.Accept(this);
                node.WhenThenPairs[i].Then.Accept(this);
            }

            node.Accept(_visitor);
        }
        public void Visit(CaseNode node)
        {
            var oldMethodAccessType = _visitor.SetMethodAccessType(MethodAccessType.ResultQuery);

            node.Else.Accept(this);

            for (int i = node.WhenThenPairs.Length - 1; i >= 0; --i)
            {
                node.WhenThenPairs[i].When.Accept(this);
                node.WhenThenPairs[i].Then.Accept(this);
            }

            node.Accept(_visitor);

            _visitor.SetMethodAccessType(oldMethodAccessType);
        }