Exemple #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;
 }
 public static Expression Rewrite(QueryMapping mapping, Expression expression)
 {
     return new ComparisonRewriter(mapping).Visit(expression);
 }
 protected ComparisonRewriter(QueryMapping mapping)
 {
     this.mapping = mapping;
 }
 protected OComparisonRewriter(QueryMapping mapping)
     : base(mapping)
 {
 }
 protected RelationshipBinder(QueryMapper mapper)
 {
     this.mapper = mapper;
     this.mapping = mapper.Mapping;
     this.language = mapper.Translator.Linguist.Language;
 }
Exemple #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);
 }