Пример #1
0
 public static Order CreateOpened(AskPlaced askPlaced)
 {
     return new Order()
     {
         Type = OrderType.Ask,
         OrderPrice = Domain.Price.CreateUsd(askPlaced.Price),
         UserId = askPlaced.UserId,
         Quantity = askPlaced.Quantity,
         CoinId = askPlaced.CoinId,
         CreatedAt = askPlaced.CreatedAt,
         Status = OrderStatus.Opened
     };
 }
 public void Handle(AskPlaced askPlaced)
 {
     _dbAccess.Add(Order.CreateOpened(askPlaced));
 }
Пример #3
0
        public async Task <Unit> Handle(CreateAskCommand request, CancellationToken cancellationToken)
        {
            await _messageBroker.Publish(AskPlaced.CreateFrom(request));

            return(Unit.Value);
        }