Пример #1
0
        public static IDictionary <string, object> Eval(Expression expression, SessionContext sessionContext)
        {
            var visitor = new MongoQueryTransformVisitor();
            var context = new VisitorContext(visitor, sessionContext);

            visitor.Context = context;

            visitor.Visit(expression);

            return(context.GetResult());
        }
Пример #2
0
 public VisitorContext(MongoQueryTransformVisitor visitor, SessionContext sessionContext)
 {
     _visitor       = visitor;
     SessionContext = sessionContext;
 }