public static ReadModelFacade BuildTheReadModelHexagon(IProveerPizzas pizzasAdapter, IProveerPizzeria pizzeriaAdapter, IProveerPedido pedidoAdapter = null, ISubscribeToEvents bus = null) { if (bus == null) { bus = new FakeBus(); } if (pedidoAdapter == null) { pedidoAdapter = new ReservaAdapter(bus); } return(new ReadModelFacade(pizzasAdapter, pizzeriaAdapter, pedidoAdapter, bus)); }
public ReadModelFacade(IProveerPizzas pizzasProvider, IProveerPizzeria pizzeriaProvider, IProveerPedido pedidoProvider, ISubscribeToEvents bus) { this.pizzasProvider = pizzasProvider; this.pizzeriasProvider = pizzeriaProvider; this.pedidosProvider = pedidoProvider; }