From 91ea7b41c543004556300d76514ff67a6534c93f Mon Sep 17 00:00:00 2001 From: Tommaso Bertoni Date: Sat, 2 Jan 2021 10:08:24 +0100 Subject: [PATCH] Renames RecipientRun to RecipientRunner. --- src/NScatterGather/Aggregator.cs | 4 ++-- src/NScatterGather/Recipients/Recipient.cs | 8 ++++---- .../Run/{RecipientRun.cs => RecipientRunner.cs} | 4 ++-- src/NScatterGather/Responses/AggregatedResponseFactory.cs | 2 +- .../Run/{RecipientRunTests.cs => RecipientRunnerTests.cs} | 4 ++-- .../Responses/AggregatedResponseExtensionsTests.cs | 2 +- .../Responses/AggregatedResponseTests.cs | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) rename src/NScatterGather/Recipients/Run/{RecipientRun.cs => RecipientRunner.cs} (95%) rename tests/NScatterGather.Tests/Recipients/Run/{RecipientRunTests.cs => RecipientRunnerTests.cs} (98%) diff --git a/src/NScatterGather/Aggregator.cs b/src/NScatterGather/Aggregator.cs index 174418e..dfdbd38 100644 --- a/src/NScatterGather/Aggregator.cs +++ b/src/NScatterGather/Aggregator.cs @@ -41,7 +41,7 @@ public Aggregator(RecipientsCollection collection) return AggregatedResponseFactory.CreateFrom(invocations); } - private async Task>> Invoke( + private async Task>> Invoke( IReadOnlyList recipients, object request, CancellationToken cancellationToken) @@ -85,7 +85,7 @@ public async Task> Send( return AggregatedResponseFactory.CreateFrom(runners); } - private async Task>> Invoke( + private async Task>> Invoke( IReadOnlyList recipients, object request, CancellationToken cancellationToken) diff --git a/src/NScatterGather/Recipients/Recipient.cs b/src/NScatterGather/Recipients/Recipient.cs index e12aca7..393f242 100644 --- a/src/NScatterGather/Recipients/Recipient.cs +++ b/src/NScatterGather/Recipients/Recipient.cs @@ -39,22 +39,22 @@ public bool CanAccept(Type requestType) => public bool CanReplyWith(Type requestType, Type responseType) => _descriptor.CanReplyWith(requestType, responseType, CollisionStrategy); - public IReadOnlyList> Accept(object request) + public IReadOnlyList> Accept(object request) { var preparedInvocations = _invoker.PrepareInvocations(request); var runners = preparedInvocations.Select(preparedInvocation => - new RecipientRun(this, preparedInvocation)); + new RecipientRunner(this, preparedInvocation)); return runners.ToArray(); } - public IReadOnlyList> ReplyWith(object request) + public IReadOnlyList> ReplyWith(object request) { var preparedInvocations = _invoker.PrepareInvocations(request); var runners = preparedInvocations.Select(preparedInvocation => - new RecipientRun(this, preparedInvocation)); + new RecipientRunner(this, preparedInvocation)); return runners.ToArray(); } diff --git a/src/NScatterGather/Recipients/Run/RecipientRun.cs b/src/NScatterGather/Recipients/Run/RecipientRunner.cs similarity index 95% rename from src/NScatterGather/Recipients/Run/RecipientRun.cs rename to src/NScatterGather/Recipients/Run/RecipientRunner.cs index 4d54e61..0c938a6 100644 --- a/src/NScatterGather/Recipients/Run/RecipientRun.cs +++ b/src/NScatterGather/Recipients/Run/RecipientRunner.cs @@ -7,7 +7,7 @@ namespace NScatterGather.Recipients.Run { - internal class RecipientRun + internal class RecipientRunner { public Recipient Recipient { get; } @@ -28,7 +28,7 @@ internal class RecipientRun private readonly PreparedInvocation _preparedInvocation; - public RecipientRun(Recipient recipient, PreparedInvocation preparedInvocation) + public RecipientRunner(Recipient recipient, PreparedInvocation preparedInvocation) { Recipient = recipient; _preparedInvocation = preparedInvocation; diff --git a/src/NScatterGather/Responses/AggregatedResponseFactory.cs b/src/NScatterGather/Responses/AggregatedResponseFactory.cs index 076bdaf..6a7a09a 100644 --- a/src/NScatterGather/Responses/AggregatedResponseFactory.cs +++ b/src/NScatterGather/Responses/AggregatedResponseFactory.cs @@ -8,7 +8,7 @@ namespace NScatterGather.Responses internal class AggregatedResponseFactory { public static AggregatedResponse CreateFrom( - IEnumerable> invocations) + IEnumerable> invocations) { var completed = new List>(); var faulted = new List(); diff --git a/tests/NScatterGather.Tests/Recipients/Run/RecipientRunTests.cs b/tests/NScatterGather.Tests/Recipients/Run/RecipientRunnerTests.cs similarity index 98% rename from tests/NScatterGather.Tests/Recipients/Run/RecipientRunTests.cs rename to tests/NScatterGather.Tests/Recipients/Run/RecipientRunnerTests.cs index d17b046..50afa01 100644 --- a/tests/NScatterGather.Tests/Recipients/Run/RecipientRunTests.cs +++ b/tests/NScatterGather.Tests/Recipients/Run/RecipientRunnerTests.cs @@ -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); diff --git a/tests/NScatterGather.Tests/Responses/AggregatedResponseExtensionsTests.cs b/tests/NScatterGather.Tests/Responses/AggregatedResponseExtensionsTests.cs index 28e6800..f90d872 100644 --- a/tests/NScatterGather.Tests/Responses/AggregatedResponseExtensionsTests.cs +++ b/tests/NScatterGather.Tests/Responses/AggregatedResponseExtensionsTests.cs @@ -10,7 +10,7 @@ namespace NScatterGather.Responses { public class AggregatedResponseExtensionsTests { - private readonly RecipientRun[] _runners; + private readonly RecipientRunner[] _runners; public AggregatedResponseExtensionsTests() { diff --git a/tests/NScatterGather.Tests/Responses/AggregatedResponseTests.cs b/tests/NScatterGather.Tests/Responses/AggregatedResponseTests.cs index 79e006b..97ade03 100644 --- a/tests/NScatterGather.Tests/Responses/AggregatedResponseTests.cs +++ b/tests/NScatterGather.Tests/Responses/AggregatedResponseTests.cs @@ -8,7 +8,7 @@ namespace NScatterGather.Responses { public class AggregatedResponseTests { - private readonly RecipientRun[] _runners; + private readonly RecipientRunner[] _runners; public AggregatedResponseTests() {