Example #1
0
 public DataProvider(IRepository repository, QueryLanguage language, QueryMapping mapping, QueryPolicy policy)
 {
     if (language == null)
         throw new InvalidOperationException("Language not specified");
     if (mapping == null)
         throw new InvalidOperationException("Mapping not specified");
     if (policy == null)
         throw new InvalidOperationException("Policy not specified");
     this._language = language;
     this._mapping = mapping;
     this._policy = policy;
     this.Repository = repository;
 }
Example #2
0
 public static Expression Rewrite(QueryMapping mapping, Expression expression)
 {
     return new ComparisonRewriter(mapping).Visit(expression);
 }
Example #3
0
 protected ComparisonRewriter(QueryMapping mapping)
 {
     this.mapping = mapping;
 }
Example #4
0
 protected OComparisonRewriter(QueryMapping mapping)
     : base(mapping)
 {
 }
Example #5
0
 protected RelationshipBinder(QueryMapper mapper)
 {
     this.mapper = mapper;
     this.mapping = mapper.Mapping;
     this.language = mapper.Translator.Linguist.Language;
 }
Example #6
0
 public QueryTranslator(QueryLanguage language, QueryMapping mapping, QueryPolicy policy)
 {
     this.linguist = language.CreateLinguist(this);
     this.mapper = mapping.CreateMapper(this);
     this.police = policy.CreatePolice(this);
 }