public AccountService(IAccountFactory accountFactory, IAmountFactory amountFactory, IStatementCollectionFactory statementCollectionFactory, IStatementFactory statementFactory) { _accountFactory = accountFactory ?? throw new ArgumentNullException(nameof(accountFactory)); _amountFactory = amountFactory ?? throw new ArgumentNullException(nameof(amountFactory)); _statementCollectionFactory = statementCollectionFactory ?? throw new ArgumentNullException(nameof(statementCollectionFactory)); _statementFactory = statementFactory ?? throw new ArgumentNullException(nameof(statementFactory)); }
public Form(ISettings settings, IRecordsStorage aggregator, IAdder adder, IAmountFactory factory) { this.settings = settings; this.aggregator = aggregator; this.adder = adder; this.factory = factory; amount = factory.Create(selectedType); Types = Enum.GetValues(typeof(Types)).Cast <Types>(); UpdateCategories(selectedType); DateTime = DateTime.Now; Descriptions = settings.Descriptions; }
public BillService(IBillRepository billRepository, ISupplierRepository supplierRepository, ICategoryRepository categoryRepository, IBillFactory billFactory, IAmountFactory amountFactory, ISupplierFactory supplierFactory, ICategoryFactory categoryFactory) { _billRepository = billRepository; _supplierRepository = supplierRepository; _categoryRepository = categoryRepository; _billFactory = billFactory; _amountFactory = amountFactory; _supplierFactory = supplierFactory; _categoryFactory = categoryFactory; }