mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
refactor(arc): ♻ use records for app-level dtos
This commit is contained in:
parent
73b57e72b4
commit
f1dfd0a1c4
4 changed files with 6 additions and 27 deletions
|
|
@ -10,17 +10,9 @@ namespace FilterLists.Archival.Application.Commands;
|
|||
|
||||
public static class ArchiveList
|
||||
{
|
||||
public class Command : IRequest
|
||||
{
|
||||
public Command(int listId)
|
||||
{
|
||||
ListId = listId;
|
||||
}
|
||||
public record Command(int ListId) : IRequest;
|
||||
|
||||
public int ListId { get; }
|
||||
}
|
||||
|
||||
public class Handler : IRequestHandler<Command, Unit>
|
||||
internal class Handler : IRequestHandler<Command, Unit>
|
||||
{
|
||||
private readonly IHttpContentClient _client;
|
||||
private readonly IDirectoryApi _directory;
|
||||
|
|
|
|||
|
|
@ -7,11 +7,9 @@ namespace FilterLists.Archival.Application.Commands;
|
|||
|
||||
public static class EnqueueArchiveAllLists
|
||||
{
|
||||
public class Command : IRequest
|
||||
{
|
||||
}
|
||||
public record Command : IRequest;
|
||||
|
||||
public class Handler : IRequestHandler<Command, Unit>
|
||||
internal class Handler : IRequestHandler<Command, Unit>
|
||||
{
|
||||
private readonly IDirectoryApi _directory;
|
||||
private readonly ILogger _logger;
|
||||
|
|
|
|||
|
|
@ -1,14 +1,3 @@
|
|||
namespace FilterLists.Archival.Domain.ListArchives;
|
||||
|
||||
public class ListArchive
|
||||
{
|
||||
public ListArchive(int id, IAsyncEnumerable<ListArchiveSegment> segments)
|
||||
{
|
||||
Id = id;
|
||||
Segments = segments;
|
||||
}
|
||||
|
||||
public int Id { get; }
|
||||
|
||||
public IAsyncEnumerable<ListArchiveSegment> Segments { get; }
|
||||
}
|
||||
public record ListArchive(int Id, IAsyncEnumerable<ListArchiveSegment> Segments);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
namespace FilterLists.Archival.Domain.ListArchives;
|
||||
|
||||
public class ListArchiveSegment
|
||||
public record ListArchiveSegment
|
||||
{
|
||||
public ListArchiveSegment(Uri sourceUri, Stream content)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue