Skip to content

Commit a01791d

Browse files
author
github-actions
committed
Updated code formatting to match rules in .editorconfig
1 parent a29adc9 commit a01791d

File tree

3 files changed

+37
-37
lines changed

3 files changed

+37
-37
lines changed

src/Hyperbee.Pipeline/Binders/Abstractions/BlockBinder.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using Hyperbee.Pipeline.Context;
2-
using System.Threading.Tasks;
1+
using System.Threading.Tasks;
2+
using Hyperbee.Pipeline.Context;
33

44
namespace Hyperbee.Pipeline.Binders.Abstractions;
55

@@ -18,10 +18,10 @@ protected virtual ValueTask<TNext> ProcessBlockAsync<TArgument, TNext>( Function
1818
{
1919
// If the function completes synchronously, avoid async state machine
2020
var task = blockFunction( context, nextArgument );
21-
22-
if (task.IsCompletedSuccessfully)
23-
return new ValueTask<TNext>(task.Result);
2421

25-
return new ValueTask<TNext>(task);
22+
if ( task.IsCompletedSuccessfully )
23+
return new ValueTask<TNext>( task.Result );
24+
25+
return new ValueTask<TNext>( task );
2626
}
2727
}

src/Hyperbee.Pipeline/Binders/ForEachBlockBinder.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
using Hyperbee.Pipeline.Binders.Abstractions;
2-
using System.Collections.Generic;
1+
using System.Collections.Generic;
32
using System.Threading.Tasks;
3+
using Hyperbee.Pipeline.Binders.Abstractions;
44

55
namespace Hyperbee.Pipeline.Binders;
66

@@ -20,32 +20,32 @@ public FunctionAsync<TStart, TOutput> Bind( FunctionAsync<TElement, object> next
2020
if ( canceled )
2121
return default;
2222

23-
if (nextArgument is IList<TElement> list)
23+
if ( nextArgument is IList<TElement> list )
2424
{
25-
for (int i = 0; i < list.Count; i++)
25+
for ( int i = 0; i < list.Count; i++ )
2626
{
27-
if (context.CancellationToken.IsCancellationRequested)
27+
if ( context.CancellationToken.IsCancellationRequested )
2828
break;
29-
await ProcessBlockAsync(next, context, list[i]).ConfigureAwait(false);
29+
await ProcessBlockAsync( next, context, list[i] ).ConfigureAwait( false );
3030
}
3131
}
32-
else if (nextArgument is TElement[] array)
32+
else if ( nextArgument is TElement[] array )
3333
{
34-
for (int i = 0; i < array.Length; i++)
34+
for ( int i = 0; i < array.Length; i++ )
3535
{
36-
if (context.CancellationToken.IsCancellationRequested)
36+
if ( context.CancellationToken.IsCancellationRequested )
3737
break;
38-
await ProcessBlockAsync(next, context, array[i]).ConfigureAwait(false);
38+
await ProcessBlockAsync( next, context, array[i] ).ConfigureAwait( false );
3939
}
4040
}
41-
else if (nextArgument is IEnumerable<TElement> enumerable)
41+
else if ( nextArgument is IEnumerable<TElement> enumerable )
4242
{
43-
foreach (var elementArgument in enumerable)
43+
foreach ( var elementArgument in enumerable )
4444
{
45-
if (context.CancellationToken.IsCancellationRequested)
45+
if ( context.CancellationToken.IsCancellationRequested )
4646
break;
4747

48-
await ProcessBlockAsync(next, context, elementArgument).ConfigureAwait(false);
48+
await ProcessBlockAsync( next, context, elementArgument ).ConfigureAwait( false );
4949
}
5050
}
5151

src/Hyperbee.Pipeline/Binders/ReduceBlockBinder.cs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
using Hyperbee.Pipeline.Binders.Abstractions;
2-
using System.Collections.Generic;
1+
using System.Collections.Generic;
32
using System.Threading.Tasks;
3+
using Hyperbee.Pipeline.Binders.Abstractions;
44

55
namespace Hyperbee.Pipeline.Binders;
66

@@ -24,35 +24,35 @@ public FunctionAsync<TStart, TNext> Bind( FunctionAsync<TElement, TNext> next )
2424
return default;
2525

2626
TNext accumulator = default;
27-
if (nextArgument is IList<TElement> list)
27+
if ( nextArgument is IList<TElement> list )
2828
{
29-
for (int i = 0; i < list.Count; i++)
29+
for ( int i = 0; i < list.Count; i++ )
3030
{
31-
if (context.CancellationToken.IsCancellationRequested)
31+
if ( context.CancellationToken.IsCancellationRequested )
3232
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 );
3535
}
3636
}
37-
else if (nextArgument is TElement[] array)
37+
else if ( nextArgument is TElement[] array )
3838
{
39-
for (int i = 0; i < array.Length; i++)
39+
for ( int i = 0; i < array.Length; i++ )
4040
{
41-
if (context.CancellationToken.IsCancellationRequested)
41+
if ( context.CancellationToken.IsCancellationRequested )
4242
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 );
4545
}
4646
}
47-
else if (nextArgument is IEnumerable<TElement> enumerable)
47+
else if ( nextArgument is IEnumerable<TElement> enumerable )
4848
{
49-
foreach (var elementArgument in enumerable)
49+
foreach ( var elementArgument in enumerable )
5050
{
51-
if (context.CancellationToken.IsCancellationRequested)
51+
if ( context.CancellationToken.IsCancellationRequested )
5252
break;
5353

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 );
5656
}
5757
}
5858

0 commit comments

Comments
 (0)