1
0
mirror of synced 2024-12-18 17:25:54 +01:00
GC-local-server-rewrite/Application/Game/Card/OnlineMatching/UploadOnlineMatchingResultCommand.cs

24 lines
879 B
C#
Raw Normal View History

2023-02-16 09:53:02 +01:00
namespace Application.Game.Card.OnlineMatching;
public record UploadOnlineMatchingResultCommand(long CardId, string Data) : IRequestWrapper<string>;
2023-02-16 17:38:01 +01:00
public class UploadOnlineMatchingResultCommandHandler : RequestHandlerBase<UploadOnlineMatchingResultCommand, string>
{
2023-02-26 19:43:13 +01:00
private const string XPATH = "/root/online_battle_result";
public UploadOnlineMatchingResultCommandHandler(ICardDependencyAggregate aggregate) : base(aggregate)
{
}
public override Task<ServiceResult<string>> Handle(UploadOnlineMatchingResultCommand request, CancellationToken cancellationToken)
{
2023-02-26 19:43:13 +01:00
var result = new OnlineMatchingResult { Status = 1 }.SerializeCardData(XPATH);
return Task.FromResult(new ServiceResult<string>(result));
}
2023-02-26 19:43:13 +01:00
}
public class OnlineMatchingResult
{
[XmlElement(ElementName = "status")]
public int Status { get; set; }
}