public IQueryDataSourceInjection <TSource> UsingInspector(SourceInjectedQueryInspector inspector)
        {
            _inspector = inspector;

            if (_sourceExpressionTracer != null)
            {
                _beforeMappingVisitors.Insert(0, _sourceExpressionTracer);
            }
            if (_destinationExpressionTracer != null)
            {
                _afterMappingVisitors.Add(_destinationExpressionTracer);
            }

            return(this);
        }
 public SourceSourceInjectedQuery(IQueryable <TSource> dataSource,
                                  IQueryable <TDestination> destQuery,
                                  IMapper mapper,
                                  IEnumerable <ExpressionVisitor> beforeVisitors,
                                  IEnumerable <ExpressionVisitor> afterVisitors,
                                  Action <Exception> exceptionHandler,
                                  IObjectDictionary parameters,
                                  MemberPaths membersToExpand,
                                  SourceInjectedQueryInspector inspector)
 {
     Parameters         = parameters;
     EnumerationHandler = (x => { });
     Expression         = destQuery.Expression;
     ElementType        = typeof(TDestination);
     Provider           = new SourceInjectedQueryProvider <TSource, TDestination>(mapper, dataSource, destQuery, beforeVisitors, afterVisitors, exceptionHandler, parameters, membersToExpand)
     {
         Inspector = inspector ?? new SourceInjectedQueryInspector()
     };
     _exceptionHandler = exceptionHandler ?? (x => { });
 }