Пример #1
0
 public CreatePetCommand(IPetFactory animalFactory, IUserRepository users, IPetRepository pets, IWriter writer)
 {
     this.animalFactory = animalFactory ?? throw new ArgumentNullException("animalFactory");
     this.pets          = pets ?? throw new ArgumentNullException("pets");
     this.users         = users ?? throw new ArgumentNullException("users");
     this.writer        = writer ?? throw new ArgumentNullException("pets");
 }
Пример #2
0
 public AddPetCommandHandler(
     ICurrentUser currentUser,
     IClientRepository clientRepository,
     IPetFactory petFactory)
 {
     this.currentUser      = currentUser;
     this.clientRepository = clientRepository;
     this.petFactory       = petFactory;
 }
 public AddPetCommandHandler(
     ICurrentUser currentUser, 
     IAdoptionRepository adoptionRepository,
     IPetFactory petFactory)
 {
     this.currentUser = currentUser;
     this.adoptionRepository = adoptionRepository;
     this.petFactory = petFactory;
 }
Пример #4
0
 public CreatePetUseCase(
     IPetRepository petRepository,
     IUnitOfWork unitOfWork,
     IUserService userService,
     IPetFactory petFactory)
 {
     this._petRepository = petRepository;
     this._unitOfWork    = unitOfWork;
     this._userService   = userService;
     this._petFactory    = petFactory;
     this._outputPort    = new CreatePetPresenter();
 }
        public InteractionManager(ILogger logger)
        {
            this.trainers = new HashSet<ITrainer>();
            this.students = new HashSet<IStudent>();

            this.studentFactory = new StudentFactory();
            this.trainerFactory = new TrainerFactory();
            this.petFactory = new PetFactory();

            this.logger = logger;

            GeneratePreviousYearTrainers();
        }
Пример #6
0
        public InteractionManager(ILogger logger)
        {
            this.trainers = new HashSet <ITrainer>();
            this.students = new HashSet <IStudent>();

            this.studentFactory = new StudentFactory();
            this.trainerFactory = new TrainerFactory();
            this.petFactory     = new PetFactory();

            this.logger = logger;

            GeneratePreviousYearTrainers();
        }
Пример #7
0
 public AdoptionRepository(PetClinicDbContext context, IMapper mapper, IPetFactory petFactory)
     : base(context)
 {
     this.mapper     = mapper;
     this.petFactory = petFactory;
 }