Пример #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;
 }
Пример #2
0
 public static Expression Rewrite(QueryMapping mapping, Expression expression)
 {
     return new ComparisonRewriter(mapping).Visit(expression);
 }
Пример #3
0
 protected ComparisonRewriter(QueryMapping mapping)
 {
     this.mapping = mapping;
 }
Пример #4
0
 protected OComparisonRewriter(QueryMapping mapping)
     : base(mapping)
 {
 }
Пример #5
0
 protected RelationshipBinder(QueryMapper mapper)
 {
     this.mapper = mapper;
     this.mapping = mapper.Mapping;
     this.language = mapper.Translator.Linguist.Language;
 }
Пример #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);
 }