public static new Expression Build(QueryLinguist linguist, QueryPolicy policy, Expression expression, Expression provider)
 {
     var executor = Expression.Parameter(typeof(QueryExecutor), "executor");
     var builder = new OExecutionBuilder(linguist, policy, new OTypeBuilder(linguist), executor);
     builder.Variables.Add(executor);
     builder.Initializers.Add(
         Expression.Convert(
             Expression.Call(Expression.Convert(provider, typeof(ICreateExecutor)), "CreateExecutor", null, null),
             typeof(QueryExecutor)));
     var result = builder.Build(expression);
     return result;
 }
 protected OExecutionBuilder(QueryLinguist linguist, QueryPolicy policy, OTypeBuilder typeBuilder, Expression executor)
     : base(linguist, policy, executor)
 {
     this.TypeBuilder = typeBuilder;
     _repoType = linguist.Translator.Mapper.Mapping.RepositoryType;
 }
Exemple #3
0
 public QueryTranslator(QueryLanguage language, QueryMapping mapping, QueryPolicy policy)
 {
     this.linguist = language.CreateLinguist(this);
     this.mapper = mapping.CreateMapper(this);
     this.police = policy.CreatePolice(this);
 }