@@ -172,7 +172,8 @@ public IAsyncEnumerable<TItem> GetAllAsync(Expression<Func<TItem, object>> order
172
172
return GetAllAsyncInternal ( orderBy , Order . By , take , skip , token ) ;
173
173
}
174
174
175
- public IAsyncEnumerable < TItem > GetAllAsync ( Expression < Func < TItem , object > > orderBy , Order orderType ,
175
+ public IAsyncEnumerable < TItem > GetAllAsync ( Expression < Func < TItem , object > > orderBy ,
176
+ Order orderType ,
176
177
int ? take = null ,
177
178
int skip = 0 ,
178
179
CancellationToken token = default )
@@ -184,7 +185,7 @@ public IAsyncEnumerable<TItem> GetAllAsync(Expression<Func<TItem, object>> order
184
185
protected abstract Task < TItem > GetAsyncInternal ( Expression < Func < TItem , bool > > predicate , CancellationToken token = default ) ;
185
186
186
187
protected abstract IAsyncEnumerable < TItem > GetAllAsyncInternal ( int ? take = null , int skip = 0 , CancellationToken token = default ) ;
187
-
188
+
188
189
protected abstract IAsyncEnumerable < TItem > GetAllAsyncInternal ( Expression < Func < TItem , object > > orderBy ,
189
190
Order orderType ,
190
191
int ? take = null ,
@@ -199,7 +200,7 @@ public IAsyncEnumerable<TItem> FindAsync(Expression<Func<TItem, bool>> predicate
199
200
{
200
201
Contract . Requires ( IsInitialized ) ;
201
202
Contract . Requires ( predicate != null ) ;
202
- return FindAsyncInternal ( predicate , take , skip , token ) ;
203
+ return FindAsyncInternal ( new [ ] { predicate } , take , skip , token ) ;
203
204
}
204
205
205
206
public IAsyncEnumerable < TItem > FindAsync ( Expression < Func < TItem , bool > > predicate ,
@@ -211,7 +212,7 @@ public IAsyncEnumerable<TItem> FindAsync(Expression<Func<TItem, bool>> predicate
211
212
Contract . Requires ( IsInitialized ) ;
212
213
Contract . Requires ( predicate != null ) ;
213
214
Contract . Requires ( orderBy != null ) ;
214
- return FindAsyncInternal ( predicate , orderBy , Order . By , take , skip , token ) ;
215
+ return FindAsyncInternal ( new [ ] { predicate } , orderBy , Order . By , take , skip , token ) ;
215
216
}
216
217
217
218
public IAsyncEnumerable < TItem > FindAsync ( Expression < Func < TItem , bool > > predicate ,
@@ -224,7 +225,7 @@ public IAsyncEnumerable<TItem> FindAsync(Expression<Func<TItem, bool>> predicate
224
225
Contract . Requires ( IsInitialized ) ;
225
226
Contract . Requires ( predicate != null ) ;
226
227
Contract . Requires ( orderBy != null ) ;
227
- return FindAsyncInternal ( predicate , orderBy , orderType , take , skip , token ) ;
228
+ return FindAsyncInternal ( new [ ] { predicate } , orderBy , orderType , take , skip , token ) ;
228
229
}
229
230
230
231
public IAsyncEnumerable < TItem > FindAsync ( Expression < Func < TItem , bool > > predicate ,
@@ -238,7 +239,7 @@ public IAsyncEnumerable<TItem> FindAsync(Expression<Func<TItem, bool>> predicate
238
239
Contract . Requires ( predicate != null ) ;
239
240
Contract . Requires ( orderBy != null ) ;
240
241
Contract . Requires ( thenBy != null ) ;
241
- return FindAsyncInternal ( predicate , orderBy , Order . By , thenBy , Order . By , take , skip , token ) ;
242
+ return FindAsyncInternal ( new [ ] { predicate } , orderBy , Order . By , thenBy , Order . By , take , skip , token ) ;
242
243
}
243
244
244
245
public IAsyncEnumerable < TItem > FindAsync ( Expression < Func < TItem , bool > > predicate ,
@@ -253,7 +254,7 @@ public IAsyncEnumerable<TItem> FindAsync(Expression<Func<TItem, bool>> predicate
253
254
Contract . Requires ( predicate != null ) ;
254
255
Contract . Requires ( orderBy != null ) ;
255
256
Contract . Requires ( thenBy != null ) ;
256
- return FindAsyncInternal ( predicate , orderBy , orderType , thenBy , Order . By , take , skip , token ) ;
257
+ return FindAsyncInternal ( new [ ] { predicate } , orderBy , orderType , thenBy , Order . By , take , skip , token ) ;
257
258
}
258
259
259
260
public IAsyncEnumerable < TItem > FindAsync ( Expression < Func < TItem , bool > > predicate ,
@@ -269,22 +270,99 @@ public IAsyncEnumerable<TItem> FindAsync(Expression<Func<TItem, bool>> predicate
269
270
Contract . Requires ( predicate != null ) ;
270
271
Contract . Requires ( orderBy != null ) ;
271
272
Contract . Requires ( thenBy != null ) ;
272
- return FindAsyncInternal ( predicate , orderBy , orderType , thenBy , thenType , take , skip , token ) ;
273
+ return FindAsyncInternal ( new [ ] { predicate } , orderBy , orderType , thenBy , thenType , take , skip , token ) ;
274
+ }
275
+
276
+ public IAsyncEnumerable < TItem > FindAsync ( Expression < Func < TItem , bool > > [ ] predicates , int ? take = null , int skip = 0 , CancellationToken token = default )
277
+ {
278
+ Contract . Requires ( IsInitialized ) ;
279
+ Contract . Requires ( predicates != null ) ;
280
+ return FindAsyncInternal ( predicates , take , skip , token ) ;
281
+ }
282
+
283
+ public IAsyncEnumerable < TItem > FindAsync ( Expression < Func < TItem , bool > > [ ] predicates ,
284
+ Expression < Func < TItem , object > > orderBy ,
285
+ int ? take = null ,
286
+ int skip = 0 ,
287
+ CancellationToken token = default )
288
+ {
289
+ Contract . Requires ( IsInitialized ) ;
290
+ Contract . Requires ( predicates != null ) ;
291
+ Contract . Requires ( orderBy != null ) ;
292
+ return FindAsyncInternal ( predicates , orderBy , Order . By , take , skip , token ) ;
293
+ }
294
+
295
+ public IAsyncEnumerable < TItem > FindAsync ( Expression < Func < TItem , bool > > [ ] predicates ,
296
+ Expression < Func < TItem , object > > orderBy ,
297
+ Order orderType ,
298
+ int ? take = null ,
299
+ int skip = 0 ,
300
+ CancellationToken token = default )
301
+ {
302
+ Contract . Requires ( IsInitialized ) ;
303
+ Contract . Requires ( predicates != null ) ;
304
+ Contract . Requires ( orderBy != null ) ;
305
+ return FindAsyncInternal ( predicates , orderBy , orderType , take , skip , token ) ;
306
+ }
307
+
308
+ public IAsyncEnumerable < TItem > FindAsync ( Expression < Func < TItem , bool > > [ ] predicates ,
309
+ Expression < Func < TItem , object > > orderBy ,
310
+ Expression < Func < TItem , object > > thenBy ,
311
+ int ? take = null ,
312
+ int skip = 0 ,
313
+ CancellationToken token = default )
314
+ {
315
+ Contract . Requires ( IsInitialized ) ;
316
+ Contract . Requires ( predicates != null ) ;
317
+ Contract . Requires ( orderBy != null ) ;
318
+ Contract . Requires ( thenBy != null ) ;
319
+ return FindAsyncInternal ( predicates , orderBy , Order . By , thenBy , Order . By , take , skip , token ) ;
320
+ }
321
+
322
+ public IAsyncEnumerable < TItem > FindAsync ( Expression < Func < TItem , bool > > [ ] predicates ,
323
+ Expression < Func < TItem , object > > orderBy ,
324
+ Order orderType ,
325
+ Expression < Func < TItem , object > > thenBy ,
326
+ int ? take = null ,
327
+ int skip = 0 ,
328
+ CancellationToken token = default )
329
+ {
330
+ Contract . Requires ( IsInitialized ) ;
331
+ Contract . Requires ( predicates != null ) ;
332
+ Contract . Requires ( orderBy != null ) ;
333
+ Contract . Requires ( thenBy != null ) ;
334
+ return FindAsyncInternal ( predicates , orderBy , orderType , thenBy , Order . By , take , skip , token ) ;
335
+ }
336
+
337
+ public IAsyncEnumerable < TItem > FindAsync ( Expression < Func < TItem , bool > > [ ] predicates ,
338
+ Expression < Func < TItem , object > > orderBy ,
339
+ Order orderType ,
340
+ Expression < Func < TItem , object > > thenBy ,
341
+ Order thenType ,
342
+ int ? take = null ,
343
+ int skip = 0 ,
344
+ CancellationToken token = default )
345
+ {
346
+ Contract . Requires ( IsInitialized ) ;
347
+ Contract . Requires ( predicates != null ) ;
348
+ Contract . Requires ( orderBy != null ) ;
349
+ Contract . Requires ( thenBy != null ) ;
350
+ return FindAsyncInternal ( predicates , orderBy , orderType , thenBy , thenType , take , skip , token ) ;
273
351
}
274
352
275
- protected abstract IAsyncEnumerable < TItem > FindAsyncInternal ( Expression < Func < TItem , bool > > predicate ,
353
+ protected abstract IAsyncEnumerable < TItem > FindAsyncInternal ( Expression < Func < TItem , bool > > [ ] predicates ,
276
354
int ? take = null ,
277
355
int skip = 0 ,
278
356
CancellationToken token = default ) ;
279
357
280
- protected abstract IAsyncEnumerable < TItem > FindAsyncInternal ( Expression < Func < TItem , bool > > predicate ,
358
+ protected abstract IAsyncEnumerable < TItem > FindAsyncInternal ( Expression < Func < TItem , bool > > [ ] predicates ,
281
359
Expression < Func < TItem , object > > orderBy ,
282
360
Order orderType ,
283
361
int ? take = null ,
284
362
int skip = 0 ,
285
363
CancellationToken token = default ) ;
286
364
287
- protected abstract IAsyncEnumerable < TItem > FindAsyncInternal ( Expression < Func < TItem , bool > > predicate ,
365
+ protected abstract IAsyncEnumerable < TItem > FindAsyncInternal ( Expression < Func < TItem , bool > > [ ] predicates ,
288
366
Expression < Func < TItem , object > > orderBy ,
289
367
Order orderType ,
290
368
Expression < Func < TItem , object > > thenBy ,
0 commit comments