コード例 #1
0
 public CarPartControllerBuilder()
 {
     _partRepository    = Substitute.For <IPartRepository>();
     _mappingEngine     = Substitute.For <IMappingEngine>();
     _carPartRepository = Substitute.For <ICarPartRepository>();
     _carRepository     = Substitute.For <ICarRepository>();
 }
コード例 #2
0
 public CarPartsController(ICarPartRepository carPartRepository, ICarRepository carRepository, IPartRepository partRepository, IMappingEngine mappingEngine)
 {
     if (carPartRepository == null)
     {
         throw new ArgumentNullException(nameof(carPartRepository));
     }
     if (mappingEngine == null)
     {
         throw new ArgumentNullException(nameof(mappingEngine));
     }
     if (partRepository == null)
     {
         throw new ArgumentNullException(nameof(partRepository));
     }
     if (carRepository == null)
     {
         throw new ArgumentNullException(nameof(carRepository));
     }
     _carPartRepository = carPartRepository;
     _PartRepository    = partRepository;
     _carRepository     = carRepository;
     _mappingEngine     = mappingEngine;
 }
コード例 #3
0
 public CarPartControllerBuilder WithCarPartRepository(ICarPartRepository carPartRepository)
 {
     _carPartRepository = carPartRepository;
     return(this);
 }
コード例 #4
0
 public CarPartBusiness(ICarPartRepository carPartRepository,
                        IMapper mapper)
 {
     _carPartRepository = carPartRepository;
     this._mapper       = mapper;
 }
コード例 #5
0
ファイル: ICarPartService.cs プロジェクト: wijayakoon/Unixmo
 public CarPartService(ICarPartRepository repository)
 {
     _repository = repository;
 }