public TradesController(ITradeService tradeService, ITradeFacade tradeFacade, IMyMapper mapper, IOptions <AppConfig> appConfig) { _tradeService = tradeService ?? throw new ArgumentNullException(nameof(tradeService)); _tradeFacade = tradeFacade ?? throw new ArgumentNullException(nameof(tradeFacade)); _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); _appConfig = appConfig ?? throw new ArgumentNullException(nameof(mapper)); }
public EventSender( IGenericRepository <IMessage> IMrepo, IGenericRepository <LogRecord> Lgrepo, ILinkGenerator linkGenerator, IMyMapper mapper) { _IMrepo = IMrepo; _Lgrepo = Lgrepo; _linkGenerator = linkGenerator; _mapper = mapper; }
public CheckMail(IGenericRepository <MailServer> MSrepo, IGenericRepository <IMessage> IMrepo, IGenericRepository <LogRecord> Lgrepo, IGenericRepository <Profile> Prepo, IMyMapper mapper) { _MSrepo = MSrepo; _IMrepo = IMrepo; _Lgrepo = Lgrepo; _Prepo = Prepo; _mapper = mapper; }
public CheckRecipes( IGenericRepository <Recipe> Rrepo, IGenericRepository <Profile> Prepo, IEventSender EventSender, IGenericRepository <IMessage> IMrepo, IGenericRepository <LogRecord> Lgrepo, ILinkGenerator linkGenerator, IMyMapper mapper) { _Rctx = Rrepo; _Pctx = Prepo; _EventSender = new EventSender(IMrepo, Lgrepo, linkGenerator, mapper); }
public void TestInitialize() { _mockRepo = Substitute.For <IPackageRepository>(); _mockUow = Substitute.For <IUnitOfWork>(); _mockUow.Packages.Returns(_mockRepo); _packageDto = new PackageDto(); _mockMapper = Substitute.For <IMyMapper>(); _mockMapper.Map <Package, PackageDto>(Arg.Any <Package>()) .Returns(_packageDto); _query = new GetPackageQuery(); _handler = new GetPackageQueryHandler(_mockUow, _mockMapper); }
public void TestInitialize() { _repoResult = new PagedResult <Package>(new PagingInformation(1, 1), 1, 1, _packages); _mockRepo = Substitute.For <IPackageRepository>(); _mockRepo.GetAll(Arg.Any <PagingInformation>()).Returns(_repoResult); _mockUow = Substitute.For <IUnitOfWork>(); _mockUow.Packages.Returns(_mockRepo); _packageDtos = new PackageDto[0]; _mockMapper = Substitute.For <IMyMapper>(); _mockMapper.Map <Package[], PackageDto[]>(Arg.Any <Package[]>()) .Returns(_packageDtos); _query = new GetAllPackagesQuery(new PagingInformation(1, 1)); _queryResult = new PagedResult <PackageDto>(new PagingInformation(1, 1), 1, 1, _packageDtos); _handler = new GetAllPackagesQueryHandler(_mockUow, _mockMapper); }
public void TestInitialize() { _query = new GetMacrosByPackageIdQuery(Guid.NewGuid()); _mockRepo = Substitute.For <IMacroProfileRepository>(); _mockRepo.GetByPackageId(Arg.Any <Guid>()).Returns(_profiles); _mockUow = Substitute.For <IUnitOfWork>(); _mockUow.MacroProfiles.Returns(_mockRepo); _profileDto = new MacroProfileDto(); _mockMapper = Substitute.For <IMyMapper>(); _mockMapper.Map <MacroProfile, MacroProfileDto>(Arg.Any <MacroProfile>()) .Returns(new MacroProfileDto(_profiles[0].Id, Guid.Empty, Guid.Empty)); _mockMapper.Map <Macro, MacroDto>(Arg.Any <Macro>()) .Returns(new MacroDto(_profiles[0].Macro.Id)); _handler = new GetMacrosByPackageIdQueryHandler(_mockUow, _mockMapper); }
public void Start() { _reflectionMapper = new ReflectionMapper(); _reflectionMapper.Register <MappedClass, DestClass>(); _expressionMapper = new ExpressionMapper(); _expressionMapper.Register <MappedClass, DestClass>(); _funcMap = x => new DestClass { DateTimeProp = x.DateTimeProp, IntProp = x.IntProp, StringProp = x.StringProp }; _objectForClone = new MappedClass { DateTimeProp = DateTime.Now, IntProp = 5, StringProp = "qwe" }; }
internal BaseService(IBaseRepository <TEntity> repository, IMyMapper mapper) { _repository = repository ?? throw new ArgumentNullException(nameof(repository)); _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); }
public GetAllPackagesQueryHandler(IUnitOfWork unitOfWork, IMyMapper mapper) { _unitOfWork = unitOfWork; _mapper = mapper; }
public RateService(ILatestRatesService latestRatesService, IMyMapper mapper) { _latestRatesService = latestRatesService; _mapper = mapper; }
public GetMacrosByPackageIdQueryHandler(IUnitOfWork unitOfWork, IMyMapper mapper) { _unitOfWork = unitOfWork; _mapper = mapper; }
public CheckPackageUniqueNameQueryHandler(IUnitOfWork unitOfWork, IMyMapper mapper) { _unitOfWork = unitOfWork; _mapper = mapper; }
public GetPackageLibraryMetadataQueryHandler(IUnitOfWork unitOfWork, IMyMapper mapper) { _unitOfWork = unitOfWork; _mapper = mapper; }
public ProfitService(IProfitRepository profitRepository, IMyMapper mapper) : base(profitRepository, mapper) { _profitRepository = profitRepository; }
public GetPackagesByUserIdQueryHandler(IUnitOfWork unitOfWork, IMyMapper mapper) { _unitOfWork = unitOfWork; _mapper = mapper; }
public MyMapperSwitch(TSource source, TSourceProperty property, IMyMapper <TSource, TDestination> mapper) { this.Source = source; this.Property = property; this.Mapper = mapper; }
public ProductsRepository(IMyMapper myMapper) { _myMapper = myMapper; }
public ProfitsController(IProfitService profitService, IProfitFacade profitFacade, IMyMapper mapper) { _profitService = profitService ?? throw new ArgumentNullException(nameof(profitService)); _profitFacade = profitFacade ?? throw new ArgumentNullException(nameof(profitFacade)); _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); }
public TradeService(ITradeRepository tradeRepository, IMyMapper mapper) : base(tradeRepository, mapper) { _tradeRepository = tradeRepository; }
public GetReferenceProfilesByPackageIdQueryHandler(IUnitOfWork unitOfWork, IMyMapper mapper) { _unitOfWork = unitOfWork; _mapper = mapper; }
public GetUserQueryHandler(IUnitOfWork unitOfWork, IMyMapper mapper) { _unitOfWork = unitOfWork; _mapper = mapper; }