Skip to content

Commit

Permalink
Renames RecipientRun to RecipientRunner.
Browse files Browse the repository at this point in the history
  • Loading branch information
tommasobertoni committed Jan 3, 2021
1 parent 72cbad3 commit 91ea7b4
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/NScatterGather/Aggregator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public Aggregator(RecipientsCollection collection)
return AggregatedResponseFactory.CreateFrom(invocations);
}

private async Task<IReadOnlyList<RecipientRun<object?>>> Invoke(
private async Task<IReadOnlyList<RecipientRunner<object?>>> Invoke(
IReadOnlyList<Recipient> recipients,
object request,
CancellationToken cancellationToken)
Expand Down Expand Up @@ -85,7 +85,7 @@ public Aggregator(RecipientsCollection collection)
return AggregatedResponseFactory.CreateFrom(runners);
}

private async Task<IReadOnlyList<RecipientRun<TResponse>>> Invoke<TResponse>(
private async Task<IReadOnlyList<RecipientRunner<TResponse>>> Invoke<TResponse>(
IReadOnlyList<Recipient> recipients,
object request,
CancellationToken cancellationToken)
Expand Down
8 changes: 4 additions & 4 deletions src/NScatterGather/Recipients/Recipient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,22 @@ internal abstract class Recipient
public bool CanReplyWith(Type requestType, Type responseType) =>
_descriptor.CanReplyWith(requestType, responseType, CollisionStrategy);

public IReadOnlyList<RecipientRun<object?>> Accept(object request)
public IReadOnlyList<RecipientRunner<object?>> Accept(object request)
{
var preparedInvocations = _invoker.PrepareInvocations(request);

var runners = preparedInvocations.Select(preparedInvocation =>
new RecipientRun<object?>(this, preparedInvocation));
new RecipientRunner<object?>(this, preparedInvocation));

return runners.ToArray();
}

public IReadOnlyList<RecipientRun<TResponse>> ReplyWith<TResponse>(object request)
public IReadOnlyList<RecipientRunner<TResponse>> ReplyWith<TResponse>(object request)
{
var preparedInvocations = _invoker.PrepareInvocations<TResponse>(request);

var runners = preparedInvocations.Select(preparedInvocation =>
new RecipientRun<TResponse>(this, preparedInvocation));
new RecipientRunner<TResponse>(this, preparedInvocation));

return runners.ToArray();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace NScatterGather.Recipients.Run
{
internal class RecipientRun<TResult>
internal class RecipientRunner<TResult>
{
public Recipient Recipient { get; }

Expand All @@ -28,7 +28,7 @@ internal class RecipientRun<TResult>

private readonly PreparedInvocation<TResult> _preparedInvocation;

public RecipientRun(Recipient recipient, PreparedInvocation<TResult> preparedInvocation)
public RecipientRunner(Recipient recipient, PreparedInvocation<TResult> preparedInvocation)
{
Recipient = recipient;
_preparedInvocation = preparedInvocation;
Expand Down
2 changes: 1 addition & 1 deletion src/NScatterGather/Responses/AggregatedResponseFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace NScatterGather.Responses
internal class AggregatedResponseFactory
{
public static AggregatedResponse<TResponse> CreateFrom<TResponse>(
IEnumerable<RecipientRun<TResponse>> invocations)
IEnumerable<RecipientRunner<TResponse>> invocations)
{
var completed = new List<CompletedInvocation<TResponse>>();
var faulted = new List<FaultedInvocation>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@

namespace NScatterGather.Run
{
public class RecipientRunTests
public class RecipientRunnerTests
{
private readonly Recipient _recipient;
private readonly Recipient _faultingRecipient;
private readonly Recipient _anotherFaultingRecipient;

public RecipientRunTests()
public RecipientRunnerTests()
{
var registry = new TypeInspectorRegistry();
_recipient = InstanceRecipient.Create(registry, new SomeType(), name: null, IgnoreRecipient);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace NScatterGather.Responses
{
public class AggregatedResponseExtensionsTests
{
private readonly RecipientRun<object?>[] _runners;
private readonly RecipientRunner<object?>[] _runners;

public AggregatedResponseExtensionsTests()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace NScatterGather.Responses
{
public class AggregatedResponseTests
{
private readonly RecipientRun<object?>[] _runners;
private readonly RecipientRunner<object?>[] _runners;

public AggregatedResponseTests()
{
Expand Down

0 comments on commit 91ea7b4

Please sign in to comment.