30 lines
757 B
C#
30 lines
757 B
C#
using CH.CQRS.Service.CryptoStats;
|
|
using CH.CQRS.Service.User;
|
|
using FluentValidation;
|
|
using OpenHarbor.CQRS.Abstractions;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace CH.CQRS.Command.CryptoStats;
|
|
|
|
public class GetCryptoStatsCommand
|
|
{
|
|
}
|
|
|
|
public class GetCryptoStatsCommandHandler(CryptoService cryptoService) : ICommandHandler<GetCryptoStatsCommand>
|
|
{
|
|
public Task HandleAsync(GetCryptoStatsCommand command, CancellationToken cancellationToken = default)
|
|
{
|
|
return cryptoService.GetCryptoStatsAsync(cancellationToken);
|
|
}
|
|
}
|
|
|
|
public class GetCryptoStatsCommandValidator : AbstractValidator<GetCryptoStatsCommand>
|
|
{
|
|
public GetCryptoStatsCommandValidator()
|
|
{
|
|
}
|
|
} |