mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
misc tidies
This commit is contained in:
parent
fcb7931d80
commit
1edc44af2f
4 changed files with 7 additions and 8 deletions
|
|
@ -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<IEnumerable<FilterList>>(listsRequest);
|
||||
foreach (var filterList in filterLists)
|
||||
await _mediator.Publish(new ListReadyForCapture(filterList), cancellationToken);
|
||||
var lists = await _apiClient.ExecuteAsync<IEnumerable<ListInfo>>(listsRequest);
|
||||
foreach (var list in lists)
|
||||
await _mediator.Publish(new ListReadyForCapture(list), cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
}
|
||||
}
|
||||
|
|
@ -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; }
|
||||
|
|
@ -23,7 +23,6 @@ public static async Task Main()
|
|||
RegisterServices();
|
||||
|
||||
var mediator = _serviceProvider.GetService<IMediator>();
|
||||
|
||||
await mediator.Send(new CaptureAllLists.Command());
|
||||
|
||||
((IDisposable) _serviceProvider).Dispose();
|
||||
|
|
|
|||
Loading…
Reference in a new issue