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.CreateQueryable <T>(dataProvider, typeInfoProvider, mapper, canBeEvaluatedLocally);
/// <summary> /// Creates an instance of <see cref="IQueryable{T}" /> that utilizes the async stream provider specified. /// </summary> /// <typeparam name="T">Element type of the <see cref="IQueryable{T}"/>.</typeparam> /// <typeparam name="TSource">Data type served by the data provider.</typeparam> public static IQueryable <T> CreateQueryable <T, TSource>(this RemoteQueryableFactory factory, Func <Expressions.Expression, IAsyncEnumerable <TSource> > dataProvider, IQueryResultMapper <TSource> resultMapper, ITypeInfoProvider?typeInfoProvider = null, Func <System.Linq.Expressions.Expression, bool>?canBeEvaluatedLocally = null) => CreateQueryable <T, TSource>(factory, (Expressions.Expression exp, CancellationToken _) => dataProvider(exp), resultMapper, typeInfoProvider, canBeEvaluatedLocally);
/// <summary> /// Creates an instance of <see cref="IQueryable" /> that utilizes the data provider specified. /// </summary> /// <typeparam name="TSource">Data type served by the data provider.</typeparam> public static IQueryable CreateQueryable <TSource>(this RemoteQueryableFactory factory, Type elementType, Func <Expressions.Expression, CancellationToken, Task <TSource> > dataProvider, IAsyncQueryResultMapper <TSource> resultMapper, ITypeInfoProvider typeInfoProvider = null, Func <System.Linq.Expressions.Expression, bool> canBeEvaluatedLocally = null) { var queryProvider = new AsyncRemoteQueryProvider <TSource>(dataProvider, typeInfoProvider, resultMapper, canBeEvaluatedLocally); return(new Remote.Linq.DynamicQuery.RemoteQueryable(elementType, queryProvider)); }
public static IAsyncRemoteQueryable <T> CreateQueryable <T>(this RemoteQueryableFactory factory, Func <RemoteLinq.Expression, Task <IEnumerable <DynamicObject> > > dataProvider, ITypeInfoProvider?typeInfoProvider = null, IDynamicObjectMapper?mapper = null, Func <SystemLinq.Expression, bool>?canBeEvaluatedLocally = null) => throw new NotSupportedException(TaskBasedMethodObsolete);
public static IAsyncRemoteQueryable CreateQueryable(this RemoteQueryableFactory factory, Type elementType, Func <RemoteLinq.Expression, CancellationToken, ValueTask <DynamicObject> > dataProvider, ITypeInfoProvider?typeInfoProvider = null, IDynamicObjectMapper?mapper = null, Func <SystemLinq.Expression, bool>?canBeEvaluatedLocally = null) => throw new NotSupportedException(TaskBasedMethodObsolete);
/// <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> CreateQueryable <T>(this RemoteQueryableFactory factory, Func <Expressions.Expression, object> dataProvider, ITypeInfoProvider typeInfoProvider = null, IQueryResultMapper <object> resultMapper = null, Func <System.Linq.Expressions.Expression, bool> canBeEvaluatedLocally = null) => factory.CreateQueryable <T, object>(dataProvider, resultMapper ?? new ObjectResultCaster(), typeInfoProvider, canBeEvaluatedLocally);
/// <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> CreateQueryable <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) { var resultMapper = new AsyncDynamicResultMapper(mapper); return(factory.CreateQueryable <T, IEnumerable <DynamicObject> >(dataProvider, resultMapper, typeInfoProvider, canBeEvaluatedLocally)); }
/// <summary> /// Creates an instance of <see cref="IRemoteQueryable{T}" /> that utilizes the data provider specified. /// </summary> /// <typeparam name="T">Element type of the <see cref="IRemoteQueryable{T}"/>.</typeparam> public static IRemoteQueryable <T> CreateQueryable <T>( this RemoteQueryableFactory factory, Func <RemoteLinq.Expression, DynamicObject> dataProvider, IExpressionToRemoteLinqContext?context = null) => CreateQueryable <T, DynamicObject>(factory, dataProvider, new DynamicResultMapper(context?.ValueMapper), context);
/// <summary> /// Creates an instance of <see cref="IRemoteQueryable{T}" /> that utilizes the data provider specified. /// </summary> /// <typeparam name="T">Element type of the <see cref="IRemoteQueryable{T}"/>.</typeparam> public static IRemoteQueryable <T> CreateQueryable <T>( this RemoteQueryableFactory factory, Func <RemoteLinq.Expression, DynamicObject> dataProvider, ITypeInfoProvider?typeInfoProvider, Func <SystemLinq.Expression, bool>?canBeEvaluatedLocally = null) => CreateQueryable <T>(factory, dataProvider, RemoteQueryable.GetExpressionTranslatorContextOrNull(typeInfoProvider, canBeEvaluatedLocally));
/// <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> CreateQueryable <T>(this RemoteQueryableFactory factory, Func <Expressions.Expression, IEnumerable <DynamicObject> > dataProvider, ITypeInfoProvider?typeInfoProvider = null, IDynamicObjectMapper?mapper = null, Func <System.Linq.Expressions.Expression, bool>?canBeEvaluatedLocally = null) => factory.CreateQueryable <T, IEnumerable <DynamicObject> >(dataProvider, new DynamicResultMapper(mapper), typeInfoProvider, canBeEvaluatedLocally);
/// <summary> /// Creates an instance of <see cref="IRemoteQueryable{T}" /> that utilizes the data provider specified. /// </summary> /// <typeparam name="T">Element type of the <see cref="IRemoteQueryable{T}"/>.</typeparam> public static IRemoteQueryable <T> CreateQueryable <T>( this RemoteQueryableFactory factory, Func <RemoteLinq.Expression, object?> dataProvider, IQueryResultMapper <object>?resultMapper = null, IExpressionToRemoteLinqContext?context = null) => CreateQueryable <T, object>(factory, dataProvider, resultMapper ?? new ObjectResultCaster(), context);
/// <summary> /// Creates an instance of <see cref="IQueryable{T}" /> that utilizes the async stream provider specified. /// </summary> /// <typeparam name="T">Element type of the <see cref="IQueryable{T}"/>.</typeparam> /// <typeparam name="TSource">Data type served by the data provider.</typeparam> public static IQueryable <T> CreateQueryable <T, TSource>(this RemoteQueryableFactory factory, Func <Expressions.Expression, CancellationToken, IAsyncEnumerable <TSource> > dataProvider, IQueryResultMapper <TSource> resultMapper, ITypeInfoProvider?typeInfoProvider = null, Func <System.Linq.Expressions.Expression, bool>?canBeEvaluatedLocally = null) { var queryProvider = new AsyncRemoteStreamProvider <TSource>(dataProvider, typeInfoProvider, canBeEvaluatedLocally, resultMapper); return(new Remote.Linq.DynamicQuery.AsyncRemoteStreamQueryable <T>(queryProvider)); }
/// <summary> /// Creates an instance of <see cref="IQueryable{T}" /> that utilizes the async stream provider specified. /// </summary> /// <typeparam name="T">Element type of the <see cref="IQueryable{T}"/>.</typeparam> public static IQueryable <T> CreateQueryable <T>(this RemoteQueryableFactory factory, Func <Expressions.Expression, CancellationToken, IAsyncEnumerable <object?> > dataProvider, IQueryResultMapper <object?>?resultMapper = null, ITypeInfoProvider?typeInfoProvider = null, Func <System.Linq.Expressions.Expression, bool>?canBeEvaluatedLocally = null) => CreateQueryable <T, object?>(factory, dataProvider, resultMapper ?? new ObjectResultCaster(), typeInfoProvider, canBeEvaluatedLocally);
/// <summary> /// Creates an instance of <see cref="IQueryable{T}" /> that utilizes the async stream provider specified. /// </summary> /// <typeparam name="T">Element type of the <see cref="IQueryable{T}"/>.</typeparam> public static IQueryable <T> CreateQueryable <T>(this RemoteQueryableFactory factory, Func <Expressions.Expression, CancellationToken, IAsyncEnumerable <DynamicObject?> > dataProvider, IDynamicObjectMapper?mapper = null, ITypeInfoProvider?typeInfoProvider = null, Func <System.Linq.Expressions.Expression, bool>?canBeEvaluatedLocally = null) => CreateQueryable <T, DynamicObject?>(factory, dataProvider, new DynamicItemMapper(mapper), typeInfoProvider, canBeEvaluatedLocally);
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.CreateQueryable(elementType, dataProvider, typeInfoProvider, resultMapper, canBeEvaluatedLocally);
/// <summary> /// Creates an instance of <see cref="IAsyncRemoteStreamQueryable{T}" /> that utilizes the async stream provider specified. /// </summary> /// <typeparam name="T">Element type of the <see cref="IAsyncRemoteStreamQueryable{T}"/>.</typeparam> /// <typeparam name="TSource">Data type served by the data provider.</typeparam> public static IAsyncRemoteStreamQueryable <T> CreateAsyncStreamQueryable <T, TSource>( this RemoteQueryableFactory factory, Func <RemoteLinq.Expression, IAsyncEnumerable <TSource?> > dataProvider, IAsyncQueryResultMapper <TSource> resultMapper, IExpressionToRemoteLinqContext?context = null) => CreateAsyncStreamQueryable <T, TSource>(factory, (RemoteLinq.Expression exp, CancellationToken _) => dataProvider(exp), resultMapper, context);
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.CreateQueryable <T, TSource>(dataProvider, resultMapper, typeInfoProvider, canBeEvaluatedLocally);
/// <summary> /// Creates an instance of <see cref="IAsyncRemoteStreamQueryable{T}" /> that utilizes the async stream provider specified. /// </summary> /// <typeparam name="T">Element type of the <see cref="IAsyncRemoteStreamQueryable{T}"/>.</typeparam> public static IAsyncRemoteStreamQueryable <T> CreateAsyncStreamQueryable <T>( this RemoteQueryableFactory factory, Func <RemoteLinq.Expression, CancellationToken, IAsyncEnumerable <DynamicObject> > dataProvider, IExpressionToRemoteLinqContext?context = null) => CreateAsyncStreamQueryable <T, DynamicObject>(factory, dataProvider, new AsyncDynamicStreamResultMapper(context?.ValueMapper), context);
/// <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> /// <typeparam name="TSource">Data type served by the data provider.</typeparam> public static IQueryable <T> CreateQueryable <T, TSource>(this RemoteQueryableFactory factory, Func <Expressions.Expression, TSource> dataProvider, IQueryResultMapper <TSource> resultMapper, ITypeInfoProvider typeInfoProvider = null, Func <System.Linq.Expressions.Expression, bool> canBeEvaluatedLocally = null) { var queryProvider = new RemoteQueryProvider <TSource>(dataProvider, typeInfoProvider, resultMapper, canBeEvaluatedLocally); return(new Remote.Linq.DynamicQuery.RemoteQueryable <T>(queryProvider)); }
/// <summary> /// Creates an instance of <see cref="IAsyncRemoteStreamQueryable{T}" /> that utilizes the async stream provider specified. /// </summary> /// <typeparam name="T">Element type of the <see cref="IAsyncRemoteStreamQueryable{T}"/>.</typeparam> public static IAsyncRemoteStreamQueryable <T> CreateAsyncStreamQueryable <T>( this RemoteQueryableFactory factory, Func <RemoteLinq.Expression, CancellationToken, IAsyncEnumerable <DynamicObject> > dataProvider, ITypeInfoProvider?typeInfoProvider, Func <SystemLinq.Expression, bool>?canBeEvaluatedLocally = null) => CreateAsyncStreamQueryable <T>(factory, dataProvider, RemoteQueryable.GetExpressionTranslatorContextOrNull(typeInfoProvider, canBeEvaluatedLocally));
/// <summary> /// Creates an instance of <see cref="IRemoteQueryable" /> that utilizes the data provider specified. /// </summary> public static IAsyncRemoteQueryable CreateAsyncQueryable( this RemoteQueryableFactory factory, Type elementType, Func <RemoteLinq.Expression, ValueTask <DynamicObject> > dataProvider, IExpressionToRemoteLinqContext?context = null) => CreateAsyncQueryable <DynamicObject>(factory, elementType, dataProvider !, new AsyncDynamicResultMapper(context?.ValueMapper), context);
/// <summary> /// Creates an instance of <see cref="IAsyncRemoteStreamQueryable{T}" /> that utilizes the async stream provider specified. /// </summary> /// <typeparam name="T">Element type of the <see cref="IAsyncRemoteStreamQueryable{T}"/>.</typeparam> public static IAsyncRemoteStreamQueryable <T> CreateAsyncStreamQueryable <T>( this RemoteQueryableFactory factory, Func <RemoteLinq.Expression, CancellationToken, IAsyncEnumerable <object?> > dataProvider, IAsyncQueryResultMapper <object>?resultMapper = null, IExpressionToRemoteLinqContext?context = null) => CreateAsyncStreamQueryable <T, object>(factory, dataProvider, resultMapper ?? new AsyncObjectResultCaster(), context);
public static IRemoteQueryable CreateQueryable <TSource>(this RemoteQueryableFactory factory, Type elementType, Func <RemoteLinq.Expression, CancellationToken, Task <TSource> > dataProvider, IAsyncQueryResultMapper <TSource> resultMapper, ITypeInfoProvider?typeInfoProvider = null, Func <SystemLinq.Expression, bool>?canBeEvaluatedLocally = null) => throw new NotSupportedException(TaskBasedMethodObsolete);
/// <summary> /// Creates an instance of <see cref="IQueryable" /> that utilizes the data provider specified /// </summary> public static IQueryable CreateQueryable(this RemoteQueryableFactory factory, Type elementType, Func <Expressions.Expression, IEnumerable <DynamicObject> > dataProvider, ITypeResolver typeResolver = null, IDynamicObjectMapper mapper = null, Func <System.Linq.Expressions.Expression, bool> canBeEvaluatedLocally = null) { var resultMapper = new DynamicResultMapper(mapper); return(factory.CreateQueryable <IEnumerable <DynamicObject> >(elementType, dataProvider, resultMapper, typeResolver, canBeEvaluatedLocally)); }
public static IAsyncRemoteQueryable <T> CreateQueryable <T>(this RemoteQueryableFactory factory, Func <RemoteLinq.Expression, CancellationToken, ValueTask <object> > dataProvider, ITypeInfoProvider?typeInfoProvider = null, IAsyncQueryResultMapper <object>?resultMapper = null, Func <SystemLinq.Expression, bool>?canBeEvaluatedLocally = null) => throw new NotSupportedException(TaskBasedMethodObsolete);
/// <summary> /// Creates an instance of <see cref="IQueryable" /> that utilizes the data provider specified. /// </summary> /// <typeparam name="TSource">Data type served by the data provider.</typeparam> public static IQueryable CreateQueryable <TSource>(this RemoteQueryableFactory factory, Type elementType, Func <Expressions.Expression, Task <TSource> > dataProvider, IAsyncQueryResultMapper <TSource> resultMapper, ITypeInfoProvider?typeInfoProvider = null, Func <System.Linq.Expressions.Expression, bool>?canBeEvaluatedLocally = null) => factory.CreateQueryable <TSource>(elementType, (expression, cancellation) => dataProvider(expression), resultMapper, typeInfoProvider, canBeEvaluatedLocally);