private static void AddShopUnits(int amount, IShopPanelView shopPanel, IUnitPool <IShopUnitModel> unitPool, IShopFactory shopFactory, IRandomUnitGenerator unitGenerator) { amount.Times(() => unitPool.AddUnit(shopFactory.Create(unitGenerator.GetRandomUnitId(), shopPanel.UnitParent))); // create unit controller with preparation unit factory }
public ShopPanelController(IShopPanelView view, IShopConfig config, IShopFactory factory, IUnitPool <IShopUnitModel> shopPool, IRandomUnitGenerator unitGenerator, IEventBus eventBus, IDisposer disposer) { _eventBus = eventBus; view.CloseButton.OnClickAsObservable() .Merge(view.BackgroundButton.OnClickAsObservable()) .SubscribeBlind(() => ClosePanel(view)) .AddToDisposer(disposer); // open panel on event eventBus.OnEvent <OpenShopCommand>().SubscribeBlind(view.Open).AddToDisposer(disposer); // only spawn items once shop is first opened AddShopUnits(config.ShopEntryAmount, view, shopPool, factory, unitGenerator); }
public ETLService(IBufferService bufferService, IShopRepository shopRepository, IProductRepository productRepository, ITransactionRepository transactionRepository, ITransactionProductRepository transactionProductRepository, IUnitOfWork unitOfWork, IProductFactory productFactory, IShopFactory shopFactory, ITransactionFactory transactionFactory, ITransactionProductFactory transactionProductFactory) { _bufferService = bufferService; _shopRepository = shopRepository; _productRepository = productRepository; _transactionRepository = transactionRepository; _transactionProductRepository = transactionProductRepository; _unitOfWork = unitOfWork; _productFactory = productFactory; _shopFactory = shopFactory; _transactionFactory = transactionFactory; _transactionProductFactory = transactionProductFactory; }
public ShopController(IShopFactory factory) { this.factory = factory; this.orderService = factory.OrderService; }
public CommerceGraphQL(IShopFactory shopFactory) { this.shopFactory = shopFactory; }