Rename InvokeRecActionCommand to InvokeRecActionViewCommand

Refactored the RecAction invocation logic by renaming and moving InvokeRecActionCommand.cs to InvokeRecActionViewCommand.cs. Updated all class, record, and extension method names accordingly. The command handling logic remains unchanged, but all references and namespaces now reflect the new naming. Removed the old InvokeRecActionCommand.cs file.
This commit is contained in:
2025-12-12 14:58:33 +01:00
parent f8211e9e9d
commit 92e7d44d3b

View File

@@ -13,23 +13,23 @@ using System.Text.Json;
namespace ReC.Application.RecActionViews.Commands; namespace ReC.Application.RecActionViews.Commands;
public record InvokeRecActionCommand : IRequest<bool> public record InvokeRecActionViewCommand : IRequest<bool>
{ {
public RecActionDto Action { get; set; } = null!; public RecActionDto Action { get; set; } = null!;
} }
public static class InvokeRecActionCommandExtensions public static class InvokeRecActionViewCommandExtensions
{ {
public static InvokeRecActionCommand ToInvokeCommand(this RecActionDto dto) => new() { Action = dto }; public static InvokeRecActionViewCommand ToInvokeCommand(this RecActionDto dto) => new() { Action = dto };
} }
public class InvokeRecActionCommandHandler( public class InvokeRecActionViewCommandHandler(
ISender sender, ISender sender,
IHttpClientFactory clientFactory, IHttpClientFactory clientFactory,
IConfiguration? config = null IConfiguration? config = null
) : IRequestHandler<InvokeRecActionCommand, bool> ) : IRequestHandler<InvokeRecActionViewCommand, bool>
{ {
public async Task<bool> Handle(InvokeRecActionCommand request, CancellationToken cancel) public async Task<bool> Handle(InvokeRecActionViewCommand request, CancellationToken cancel)
{ {
var action = request.Action; var action = request.Action;