Files
managing-apps/src/Managing.Application/ManageBot/GetActiveBotsCommandHandler.cs

15 lines
496 B
C#

using Managing.Application.Abstractions;
using Managing.Application.ManageBot.Commands;
using MediatR;
namespace Managing.Application.ManageBot
{
public class GetActiveBotsCommandHandler(IBotService botService)
: IRequestHandler<GetActiveBotsCommand, List<ITradingBot>>
{
public Task<List<ITradingBot>> Handle(GetActiveBotsCommand request, CancellationToken cancellationToken)
{
return Task.FromResult(botService.GetActiveBots());
}
}
}