Пример #1
0
        /// <summary>
        /// Creates an instance of <see cref="IQueryable{T}"/> that utilizes the data provider specified.
        /// </summary>
        /// <typeparam name="T">Element type of the <see cref="IQueryable{T}"/>.</typeparam>
        public static IQueryable <T> CreateAsyncQueryable <T>(this RemoteQueryableFactory factory, Func <Expressions.Expression, Task <object> > dataProvider, ITypeInfoProvider typeInfoProvider = null, IAsyncQueryResultMapper <object> resultMapper = null, Func <System.Linq.Expressions.Expression, bool> canBeEvaluatedLocally = null)
        {
            if (resultMapper is null)
            {
                resultMapper = new AsyncObjectResultCaster();
            }

            return(factory.CreateAsyncQueryable <T, object>(dataProvider, resultMapper, typeInfoProvider, canBeEvaluatedLocally));
        }
Пример #2
0
        /// <summary>
        /// Creates an instance of <see cref="IQueryable" /> that utilizes the data provider specified
        /// </summary>
        public static IQueryable CreateAsyncQueryable(this RemoteQueryableFactory factory, Type elementType, Func <Expressions.Expression, Task <object> > dataProvider, ITypeResolver typeResolver = null, IAsyncQueryResultMapper <object> resultMapper = null, Func <System.Linq.Expressions.Expression, bool> canBeEvaluatedLocally = null)
        {
            if (ReferenceEquals(null, resultMapper))
            {
                resultMapper = new AsyncObjectResultCaster();
            }

            return(factory.CreateAsyncQueryable <object>(elementType, dataProvider, resultMapper, typeResolver, canBeEvaluatedLocally));
        }
Пример #3
0
        /// <summary>
        /// Creates an instance of <see cref="IQueryable" /> that utilizes the data provider specified.
        /// </summary>
        public static IQueryable CreateAsyncQueryable(this RemoteQueryableFactory factory, Type elementType, Func <Expressions.Expression, Task <IEnumerable <DynamicObject> > > dataProvider, ITypeInfoProvider typeInfoProvider = null, IDynamicObjectMapper mapper = null, Func <System.Linq.Expressions.Expression, bool> canBeEvaluatedLocally = null)
        {
            var resultMapper = new AsyncDynamicResultMapper(mapper);

            return(factory.CreateAsyncQueryable <IEnumerable <DynamicObject> >(elementType, dataProvider, resultMapper, typeInfoProvider, canBeEvaluatedLocally));
        }
Пример #4
0
 public static IQueryable <T> CreateAsyncQueryable <T, TSource>(this RemoteQueryableFactory factory, Func <Expressions.Expression, CancellationToken, Task <TSource> > dataProvider, IAsyncQueryResultMapper <TSource> resultMapper, ITypeInfoProvider typeInfoProvider = null, Func <System.Linq.Expressions.Expression, bool> canBeEvaluatedLocally = null)
 => factory.CreateAsyncQueryable <T, TSource>(dataProvider, resultMapper, typeInfoProvider, canBeEvaluatedLocally);
Пример #5
0
 public static IQueryable CreateAsyncQueryable(this RemoteQueryableFactory factory, Type elementType, Func <Expressions.Expression, Task <object> > dataProvider, ITypeInfoProvider typeInfoProvider = null, IAsyncQueryResultMapper <object> resultMapper = null, Func <System.Linq.Expressions.Expression, bool> canBeEvaluatedLocally = null)
 => factory.CreateAsyncQueryable(elementType, dataProvider, typeInfoProvider, resultMapper, canBeEvaluatedLocally);
Пример #6
0
 public static IQueryable <T> CreateAsyncQueryable <T>(this RemoteQueryableFactory factory, Func <Expressions.Expression, Task <IEnumerable <DynamicObject> > > dataProvider, ITypeInfoProvider typeInfoProvider = null, IDynamicObjectMapper mapper = null, Func <System.Linq.Expressions.Expression, bool> canBeEvaluatedLocally = null)
 => factory.CreateAsyncQueryable <T>(dataProvider, typeInfoProvider, mapper, canBeEvaluatedLocally);