public void RegisterPhonesSuppliedListener(IPhonesSuppliedListener listener) { phonesSuppliedListener = listener; }
public ProductionFacadeWithNotifier(IPhoneRepository phones, IWarehouseRepository warehouses, IImportFeeCalculator importCalculator, IProductionFactory productionFactory, IPhoneSupplier phoneSupplier, IPhonesSuppliedListener listener) { this.phones = phones; this.warehouses = warehouses; this.importCalculator = importCalculator; this.productionFactory = productionFactory; this.phoneSupplier = phoneSupplier; if (null != listener) { this.phoneSupplier.RegisterPhonesSuppliedListener(listener); } }