Skip to content

Commit 27dc3f4

Browse files
committed
- Make all commands and queries internal
- Update MediatR
1 parent b7ab2f4 commit 27dc3f4

19 files changed

+35
-33
lines changed

src/todo.application/Commands/AddPriorityCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77

88
namespace Alteridem.Todo.Application.Commands;
99

10-
public class AddPriorityCommand : IRequest<TaskItem>
10+
public sealed class AddPriorityCommand : IRequest<TaskItem>
1111
{
1212
public int ItemNumber { get; set; }
1313

1414
public char Priority { get; set; }
1515
}
1616

17-
public class AddPriorityCommandHandler : IRequestHandler<AddPriorityCommand, TaskItem>
17+
internal sealed class AddPriorityCommandHandler : IRequestHandler<AddPriorityCommand, TaskItem>
1818
{
1919
private readonly ITaskFile _taskFile;
2020
private readonly ITaskConfiguration _config;

src/todo.application/Commands/AddTaskCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public sealed class AddTaskCommand : IRequest<TaskItem>
1616
public bool AddCreationDate { get; set; }
1717
}
1818

19-
public sealed class AddTaskCommandHandler : IRequestHandler<AddTaskCommand, TaskItem>
19+
internal sealed class AddTaskCommandHandler : IRequestHandler<AddTaskCommand, TaskItem>
2020
{
2121
private readonly ITaskFile _taskFile;
2222

src/todo.application/Commands/AppendCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public sealed class AppendCommand : IRequest<TaskItem>
1313
public string Text { get; set; }
1414
}
1515

16-
public sealed class AppendCommandHandler : IRequestHandler<AppendCommand, TaskItem>
16+
internal sealed class AppendCommandHandler : IRequestHandler<AppendCommand, TaskItem>
1717
{
1818
private readonly ITaskFile _taskFile;
1919
private readonly ITaskConfiguration _config;

src/todo.application/Commands/ArchiveTasksCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public sealed class ArchiveTasksCommand : IRequest<IList<TaskItem>>
1111
{
1212
}
1313

14-
public sealed class ArchiveTasksCommandHandler : IRequestHandler<ArchiveTasksCommand, IList<TaskItem>>
14+
internal sealed class ArchiveTasksCommandHandler : IRequestHandler<ArchiveTasksCommand, IList<TaskItem>>
1515
{
1616
private readonly ITaskFile _taskFile;
1717
private readonly ITaskConfiguration _config;

src/todo.application/Commands/DeleteTaskCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
namespace Alteridem.Todo.Application.Commands;
88

9-
public class DeleteTaskCommand : IRequest<int>
9+
public sealed class DeleteTaskCommand : IRequest<int>
1010
{
1111
public int ItemNumber { get; set; }
1212
}
1313

14-
public class DeleteTaskCommandHandler : IRequestHandler<DeleteTaskCommand, int>
14+
internal sealed class DeleteTaskCommandHandler : IRequestHandler<DeleteTaskCommand, int>
1515
{
1616
private readonly ITaskFile _taskFile;
1717
private readonly ITaskConfiguration _config;

src/todo.application/Commands/DeleteTermCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77

88
namespace Alteridem.Todo.Application.Commands;
99

10-
public class DeleteTermCommand : IRequest<DeleteTermResult>
10+
public sealed class DeleteTermCommand : IRequest<DeleteTermResult>
1111
{
1212
public int ItemNumber { get; set; }
1313

1414
public string Term { get; set; }
1515
}
1616

17-
public class DeleteTermCommandHandler : IRequestHandler<DeleteTermCommand, DeleteTermResult>
17+
internal sealed class DeleteTermCommandHandler : IRequestHandler<DeleteTermCommand, DeleteTermResult>
1818
{
1919
private readonly ITaskFile _taskFile;
2020
private readonly ITaskConfiguration _config;

src/todo.application/Commands/DeprioritizeCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public sealed class DeprioritizeCommand : IRequest<IList<TaskItem>>
1313
public int[] ItemNumbers { get; set; }
1414
}
1515

16-
public sealed class DeprioritizeCommandHandler : IRequestHandler<DeprioritizeCommand, IList<TaskItem>>
16+
internal sealed class DeprioritizeCommandHandler : IRequestHandler<DeprioritizeCommand, IList<TaskItem>>
1717
{
1818
private readonly ITaskFile _taskFile;
1919
private readonly ITaskConfiguration _config;

src/todo.application/Commands/DoTasksCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99

1010
namespace Alteridem.Todo.Application.Commands;
1111

12-
public class DoTasksCommand : IRequest<IList<TaskItem>>
12+
public sealed class DoTasksCommand : IRequest<IList<TaskItem>>
1313
{
1414
private int[] _itemNumbers;
1515

1616
public int[] ItemNumbers { get => _itemNumbers ?? new int[0]; set => _itemNumbers = value; }
1717
public bool DontArchive { get; set; }
1818
}
1919

20-
public class DoTasksCommandHandler : IRequestHandler<DoTasksCommand, IList<TaskItem>>
20+
internal sealed class DoTasksCommandHandler : IRequestHandler<DoTasksCommand, IList<TaskItem>>
2121
{
2222
private readonly ITaskFile _taskFile;
2323
private readonly ITaskConfiguration _config;

src/todo.application/Commands/PrependCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public sealed class PrependCommand : IRequest<TaskItem>
1313
public string Text { get; set; }
1414
}
1515

16-
public sealed class PrependCommandHandler : IRequestHandler<PrependCommand, TaskItem>
16+
internal sealed class PrependCommandHandler : IRequestHandler<PrependCommand, TaskItem>
1717
{
1818
private readonly ITaskFile _taskFile;
1919
private readonly ITaskConfiguration _config;

src/todo.application/Commands/ReplaceCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public sealed class ReplaceCommand : IRequest<TaskItem>
1313
public string Text { get; set; }
1414
}
1515

16-
public sealed class ReplaceCommandHandler : IRequestHandler<ReplaceCommand, TaskItem>
16+
internal sealed class ReplaceCommandHandler : IRequestHandler<ReplaceCommand, TaskItem>
1717
{
1818
private readonly ITaskFile _taskFile;
1919
private readonly ITaskConfiguration _config;

0 commit comments

Comments
 (0)