示例#1
0
 public virtual void Visit(ComplexExpressionBase expression)
 {
     foreach (Expression expr in expression.ConstructorArguments)
     {
         expr.Accept(this);
     }
 }
示例#2
0
 public void VisitComplexBase(ComplexExpressionBase expression)
 {
     if (_refID.Top == JsonPath.Root)
     {
         if (expression.Parent != null)
         {
             throw new ArgumentException("Reference for this passed to object that is not at the root", "refID");
         }
     }
     else
     {
         // have to assume that the parent checked that we were the right reference
         // should only get here if we have a parent, if no parent we're not valid
         if (expression.Parent == null)
             throw new ArgumentException("Invalid reference", "refID");
     }
     // it is this object, check if we need to go further
     _refID = _refID.ChildReference();
     if (_refID.IsEmpty) {
         _expr = expression;
     }
 }
示例#3
0
 public void VisitComplex(ComplexExpressionBase ComplexExpression)
 {
     foreach (Expression expr in ComplexExpression.ConstructorArguments)
         Visit(expr);
 }