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:
@@ -13,23 +13,23 @@ using System.Text.Json;
|
||||
|
||||
namespace ReC.Application.RecActionViews.Commands;
|
||||
|
||||
public record InvokeRecActionCommand : IRequest<bool>
|
||||
public record InvokeRecActionViewCommand : IRequest<bool>
|
||||
{
|
||||
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,
|
||||
IHttpClientFactory clientFactory,
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user