From 1edc44af2f9455acbc5c41a02152a619a2dc20de Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Wed, 26 Jun 2019 19:17:27 -0500 Subject: [PATCH] misc tidies --- src/FilterLists.Agent/ListArchiver/CaptureAllLists.cs | 6 +++--- .../ListArchiver/Events/ListReadyForCapture.cs | 6 +++--- src/FilterLists.Agent/{FilterList.cs => ListInfo.cs} | 2 +- src/FilterLists.Agent/Program.cs | 1 - 4 files changed, 7 insertions(+), 8 deletions(-) rename src/FilterLists.Agent/{FilterList.cs => ListInfo.cs} (84%) diff --git a/src/FilterLists.Agent/ListArchiver/CaptureAllLists.cs b/src/FilterLists.Agent/ListArchiver/CaptureAllLists.cs index 4392fbb04..b391798e3 100644 --- a/src/FilterLists.Agent/ListArchiver/CaptureAllLists.cs +++ b/src/FilterLists.Agent/ListArchiver/CaptureAllLists.cs @@ -28,9 +28,9 @@ public Handler(IFilterListsApiClient apiClient, IMediator mediator) protected override async Task Handle(Command request, CancellationToken cancellationToken) { var listsRequest = new RestRequest("lists"); - var filterLists = await _apiClient.ExecuteAsync>(listsRequest); - foreach (var filterList in filterLists) - await _mediator.Publish(new ListReadyForCapture(filterList), cancellationToken); + var lists = await _apiClient.ExecuteAsync>(listsRequest); + foreach (var list in lists) + await _mediator.Publish(new ListReadyForCapture(list), cancellationToken); } } } diff --git a/src/FilterLists.Agent/ListArchiver/Events/ListReadyForCapture.cs b/src/FilterLists.Agent/ListArchiver/Events/ListReadyForCapture.cs index 2049961f9..2b7253593 100644 --- a/src/FilterLists.Agent/ListArchiver/Events/ListReadyForCapture.cs +++ b/src/FilterLists.Agent/ListArchiver/Events/ListReadyForCapture.cs @@ -4,11 +4,11 @@ namespace FilterLists.Agent.ListArchiver.Events { public class ListReadyForCapture : INotification { - public ListReadyForCapture(FilterList filterList) + public ListReadyForCapture(ListInfo listInfo) { - FilterList = filterList; + ListInfo = listInfo; } - public FilterList FilterList { get; } + public ListInfo ListInfo { get; } } } \ No newline at end of file diff --git a/src/FilterLists.Agent/FilterList.cs b/src/FilterLists.Agent/ListInfo.cs similarity index 84% rename from src/FilterLists.Agent/FilterList.cs rename to src/FilterLists.Agent/ListInfo.cs index c2d350596..b9ef8110a 100644 --- a/src/FilterLists.Agent/FilterList.cs +++ b/src/FilterLists.Agent/ListInfo.cs @@ -2,7 +2,7 @@ namespace FilterLists.Agent { - public class FilterList + public class ListInfo { public int Id { get; private set; } public Uri ViewUrl { get; private set; } diff --git a/src/FilterLists.Agent/Program.cs b/src/FilterLists.Agent/Program.cs index e18b11a21..631129eda 100644 --- a/src/FilterLists.Agent/Program.cs +++ b/src/FilterLists.Agent/Program.cs @@ -23,7 +23,6 @@ public static async Task Main() RegisterServices(); var mediator = _serviceProvider.GetService(); - await mediator.Send(new CaptureAllLists.Command()); ((IDisposable) _serviceProvider).Dispose();