1
- using Hyperbee . Pipeline . Binders . Abstractions ;
2
- using System . Collections . Generic ;
1
+ using System . Collections . Generic ;
3
2
using System . Threading . Tasks ;
3
+ using Hyperbee . Pipeline . Binders . Abstractions ;
4
4
5
5
namespace Hyperbee . Pipeline . Binders ;
6
6
@@ -24,35 +24,35 @@ public FunctionAsync<TStart, TNext> Bind( FunctionAsync<TElement, TNext> next )
24
24
return default ;
25
25
26
26
TNext accumulator = default ;
27
- if ( nextArgument is IList < TElement > list )
27
+ if ( nextArgument is IList < TElement > list )
28
28
{
29
- for ( int i = 0 ; i < list . Count ; i ++ )
29
+ for ( int i = 0 ; i < list . Count ; i ++ )
30
30
{
31
- if ( context . CancellationToken . IsCancellationRequested )
31
+ if ( context . CancellationToken . IsCancellationRequested )
32
32
break ;
33
- var result = await ProcessBlockAsync ( next , context , list [ i ] ) . ConfigureAwait ( false ) ;
34
- accumulator = Reducer ( accumulator , result ) ;
33
+ var result = await ProcessBlockAsync ( next , context , list [ i ] ) . ConfigureAwait ( false ) ;
34
+ accumulator = Reducer ( accumulator , result ) ;
35
35
}
36
36
}
37
- else if ( nextArgument is TElement [ ] array )
37
+ else if ( nextArgument is TElement [ ] array )
38
38
{
39
- for ( int i = 0 ; i < array . Length ; i ++ )
39
+ for ( int i = 0 ; i < array . Length ; i ++ )
40
40
{
41
- if ( context . CancellationToken . IsCancellationRequested )
41
+ if ( context . CancellationToken . IsCancellationRequested )
42
42
break ;
43
- var result = await ProcessBlockAsync ( next , context , array [ i ] ) . ConfigureAwait ( false ) ;
44
- accumulator = Reducer ( accumulator , result ) ;
43
+ var result = await ProcessBlockAsync ( next , context , array [ i ] ) . ConfigureAwait ( false ) ;
44
+ accumulator = Reducer ( accumulator , result ) ;
45
45
}
46
46
}
47
- else if ( nextArgument is IEnumerable < TElement > enumerable )
47
+ else if ( nextArgument is IEnumerable < TElement > enumerable )
48
48
{
49
- foreach ( var elementArgument in enumerable )
49
+ foreach ( var elementArgument in enumerable )
50
50
{
51
- if ( context . CancellationToken . IsCancellationRequested )
51
+ if ( context . CancellationToken . IsCancellationRequested )
52
52
break ;
53
53
54
- var result = await ProcessBlockAsync ( next , context , elementArgument ) . ConfigureAwait ( false ) ;
55
- accumulator = Reducer ( accumulator , result ) ;
54
+ var result = await ProcessBlockAsync ( next , context , elementArgument ) . ConfigureAwait ( false ) ;
55
+ accumulator = Reducer ( accumulator , result ) ;
56
56
}
57
57
}
58
58
0 commit comments