public async Task ProcessAsync(Message message) { var body = Encoding.UTF8.GetString(message.Body); await commandRA.SaveAsync(new Models.Notification { Payload = body }); }
public async Task ProcessAsync(Message message) { var quote = AssembleQuote(Encoding.UTF8.GetString(message.Body)); var saveTask = commandRA.SaveAsync(quote); await messagePublisher.Publish(PrepareEventMessage(quote)); }
public async Task ProcessAsync(NewQuoteReceived message) { var rateFeed = await commandRA.SaveAsync(new RateFeed { BaseCurrency = message.BaseCurrency, TradeCurrency = message.TradeCurrency, Rate = message.Rate }); await notifyRateFeedClient.SendAsync(rateFeed); }
public async Task ProcessAsync(NewQuoteReceived message) { await commandRA.SaveAsync (new Quote { Id = message.Id, BaseCurrency = message.BaseCurrency, TargetCurrency = message.TradeCurrency, Rate = message.Rate } ); }
public async Task Post([FromBody] Contracts.ThirdPartyRate value) { var thirdPartyRate = await command.SaveAsync ( new ThirdPartyRate { BaseCurrency = value.BaseCurrency, TradeCurrency = value.TradeCurrency, Rate = value.Rate, ReferenceId = value.PartnerId } ); await sender.SendAsync(new Contracts.CreateQuote { Id = thirdPartyRate.Id, BaseCurrency = thirdPartyRate.BaseCurrency, TradeCurrency = thirdPartyRate.TradeCurrency, Rate = thirdPartyRate.Rate, }); }
public async Task Post([FromBody] ThirdPartyRate value) { var saveTask = command.SaveAsync(value); await sender.Send(value); }
public async Task ProcessAsync(Contracts.CreateQuote message) { var quote = await commandRA.SaveAsync(AssembleQuote(message)); var pubTask = messagePublisher.SendAsync(PrepareEventMessage(quote)); }
public async Task Handle(Message message, CancellationToken token) { var payload = JsonConvert.DeserializeObject <object>(Encoding.UTF8.GetString(message.Body)); await commandRA.SaveAsync(payload); }