コード例 #1
0
        public void InitializeIdGenerator()
        {
            this.GenerateID = new GenerateId(int.MinValue, int.MaxValue);

            courseName            = "course name";
            courseMaximumCapacity = 10;
        }
コード例 #2
0
 public AddItemUsecaseFactory(IGenerateId idGenerator)
 {
     this.IdGen = idGenerator
                  ?? throw new ArgumentNullException(
                            nameof(idGenerator),
                            $"{nameof(AddItemUsecaseFactory)}.ctor() cannot take null as argument");
 }
コード例 #3
0
 internal AddItemInteractor(
     IGenerateId idGenerator,
     IStarBusinessEntity starBl)
 {
     this.StarItemBusinessLogic = starBl;
     this.IdGenerator           = idGenerator;
     this.OutputBoundary        = new NoOutputBoundary();
 }
コード例 #4
0
        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);
        }
コード例 #5
0
 public GoldAccount(Person owner, IGenerateId generator, bool isClosed = false) : base(owner, generator, isClosed)
 {
 }
コード例 #6
0
 public AccountService(ILogger <AccountService> logger, IUnitOfWork unitOfWork, IGenerateId idGenerator)
 {
     _logger      = logger;
     _unitOfWork  = unitOfWork;
     _idGenerator = idGenerator;
 }
コード例 #7
0
 public Account(Person owner, IGenerateId generator, bool isClosed = false)
 {
     this.Id       = generator.Generate();
     this.IsClosed = isClosed;
     this.Owner    = owner;
 }
コード例 #8
0
 /// <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));
 }
コード例 #9
0
		public SwedbankHtmlTransactionBuilder(IGenerateId<TransactionDto> idGenerator)
		{
			_idGenerator = idGenerator;
		}
コード例 #10
0
 public void CreateAccount(AccountType type, Person person, IGenerateId generator)
 {
     accountFactory.Create(type, person, generator);
     repository.Add();
 }
コード例 #11
0
 public GroupsController(IGenerateId _generateId)
 {
     generateId = _generateId;
 }