public void InitializeIdGenerator() { this.GenerateID = new GenerateId(int.MinValue, int.MaxValue); courseName = "course name"; courseMaximumCapacity = 10; }
public AddItemUsecaseFactory(IGenerateId idGenerator) { this.IdGen = idGenerator ?? throw new ArgumentNullException( nameof(idGenerator), $"{nameof(AddItemUsecaseFactory)}.ctor() cannot take null as argument"); }
internal AddItemInteractor( IGenerateId idGenerator, IStarBusinessEntity starBl) { this.StarItemBusinessLogic = starBl; this.IdGenerator = idGenerator; this.OutputBoundary = new NoOutputBoundary(); }
public Account Create(AccountType type, Person owner, IGenerateId generator) { Account newAccount = null; switch (type) { case AccountType.Base: newAccount = new BaseAccount(owner, generator); break; case AccountType.Gold: newAccount = new GoldAccount(owner, generator); break; case AccountType.Platinum: newAccount = new PlatinumAccount(owner, generator); break; } return(newAccount); }
public GoldAccount(Person owner, IGenerateId generator, bool isClosed = false) : base(owner, generator, isClosed) { }
public AccountService(ILogger <AccountService> logger, IUnitOfWork unitOfWork, IGenerateId idGenerator) { _logger = logger; _unitOfWork = unitOfWork; _idGenerator = idGenerator; }
public Account(Person owner, IGenerateId generator, bool isClosed = false) { this.Id = generator.Generate(); this.IsClosed = isClosed; this.Owner = owner; }
/// <summary> /// Initializes a new instance of the <see cref="BankService"/> class /// </summary> /// <param name="unitOfWork">contains methods for commit after solve unit of work</param> /// <param name="accountRepository">repository for accounts</param> /// <param name="generateId">contains method for generate id</param> public BankService(IUnitOfWork unitOfWork, IAccountRepository accountRepository, IGenerateId generateId) { AccountRepository = accountRepository ?? throw new ArgumentNullException(nameof(accountRepository)); UnitOfWork = unitOfWork ?? throw new ArgumentNullException(nameof(unitOfWork)); GenerateId = generateId ?? throw new ArgumentNullException(nameof(generateId)); }
public SwedbankHtmlTransactionBuilder(IGenerateId<TransactionDto> idGenerator) { _idGenerator = idGenerator; }
public void CreateAccount(AccountType type, Person person, IGenerateId generator) { accountFactory.Create(type, person, generator); repository.Add(); }
public GroupsController(IGenerateId _generateId) { generateId = _generateId; }