public TReturn Compose(JObject response) { var visitor = new ResponseComposerVisitor(response, this.context); var substituted = visitor.Visit(selector) as Expression <Func <TQueryType, TReturn> >; return(substituted.Compile()(default));
private Expression CreateInitializer( Type elementType, object element, Expression childExpression) { var childVisitor = new ResponseComposerVisitor(element as JToken, this.context); var visited = childVisitor.Visit(childExpression); return(((LambdaExpression)visited).Body); }