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