private void DispatchTo(RequestForQuotation rfq, List <IActorRef> recipientList) { recipientList.ForEach(x => rfq.RetailItems.ForEach(t => { Console.WriteLine($"OrderProcessor: {rfq.Id} item: {t.ItemId} to: {x.Path}"); x.Tell(new RequestPriceQuote(t.RetailPrice, rfq.TotalRetailPrice())); })); }
private List <IActorRef> CalculateRecipientList(RequestForQuotation rfq) => interestRegistryList.Where(x => rfq.TotalRetailPrice() >= x.PriceQuoteInterest.LowTotalRetail && rfq.TotalRetailPrice() <= x.PriceQuoteInterest.HighTotalRetail) .Select(x => x.PriceQuoteInterest.QuoteProcessor).ToList();