Пример #1
0
 public WrappedQueryableProvider(System.Linq.IQueryProvider queryProvider)
 {
     if (queryProvider == null)
     {
         throw new ArgumentNullException(nameof(queryProvider));
     }
     InnerQueryProvider = queryProvider;
 }
Пример #2
0
 public QueryProvider(System.Linq.IQueryProvider sourceprovider)
 {
     SourceProvider = sourceprovider;
     Factory        = (provider, type, expr) =>
                      (IQueryable)Activator.CreateInstance(
         typeof(Queryable <>).MakeGenericType(type),
         this, expr);
 }
Пример #3
0
 private static ProviderType GetProviderType(this System.Linq.IQueryProvider provider)
 {
     if (Providers.TryGetValue(provider.GetType().Namespace, out var providerType))
     {
         return(providerType);
     }
     else
     {
         return(ProviderType.Unsupported);
     }
 }
Пример #4
0
 private static IQueryableAsyncExecutor GetProviderExecutor(System.Linq.IQueryProvider provider)
 {
     if (Providers.TryGetValue(provider.GetType().Namespace, out var providerType))
     {
         if (providerType == ProviderType.LinqToDB)
         {
             return(new LinqToDBQueryableAsyncExecutor());
         }
         else
         {
             return(null);
         }
     }
     else
     {
         return(null);
     }
 }
Пример #5
0
 public QueryProvider(System.Linq.IQueryProvider sourceprovider, Func <IQueryProvider, Type, Expression, IQueryable> factory)
 {
     SourceProvider = sourceprovider;
     Factory        = factory;
 }