22 lines
508 B
C#
22 lines
508 B
C#
using DotNetCore.CAP;
|
|
using CommonDomain;
|
|
|
|
namespace CommonService.Lottery
|
|
{
|
|
public class LotteryPrizeSubscriber : ICapSubscribe
|
|
{
|
|
private readonly LotteryPrizeHandler _handler;
|
|
|
|
public LotteryPrizeSubscriber(LotteryPrizeHandler handler)
|
|
{
|
|
_handler = handler;
|
|
}
|
|
|
|
[CapSubscribe("Lottery.DrawPrize")]
|
|
public async Task HandleLotteryDrawPrize(LotteryDrawMessage message)
|
|
{
|
|
await _handler.Handle(message);
|
|
}
|
|
}
|
|
}
|