private static void ResolveReference(ReferenceExpression reference, Expression root)
 {
     ReferenceVisitor visitor = new ReferenceVisitor(reference.Path);
     visitor.Visit(root);
     if (visitor.ReferencedExpression == null)
         throw new ParseException("Unable to resolve reference to " + reference.Path);
     reference.ReferencedExpression = visitor.ReferencedExpression;
 }
Ejemplo n.º 2
0
 public void ReferenceTypeReferenceTest()
 {
     ReferenceExpression refExp = new ReferenceExpression(new JsonPath(""));
     Expression actual = ResolveReference(refExp, JsonPath.Root);
 }
Ejemplo n.º 3
0
 public virtual void Visit(ReferenceExpression expression) { }
 public void Visit(ReferenceExpression reference) {
     References.Add(reference);
 }