コード例 #1
0
 /// <summary>
 /// Xunit Constructor
 /// </summary>
 /// <param name="IOfferRepository"></param>
 /// <param name="IOfferAttributeRepository"></param>
 /// <param name="IProviderRepository"></param>
 /// <param name="IAttributeRepository"></param>
 /// <param name="ILiveMatch"></param>
 /// <param name="IRespondentCatalog"></param>
 public OffersManager(
     IOfferRepository IOfferRepository,
     IOfferAttributeRepository IOfferAttributeRepository,
     IProviderRepository IProviderRepository,
     IAttributeRepository IAttributeRepository,
     ILiveMatch ILiveMatch,
     IRespondentCatalog IRespondentCatalog,
     IQuotaExpressionRepository IQuotaExpressionRepository,
     IQuotaMappingRepository IQuotaMappingRepository,
     ISampleMappingRepository ISampleMappingRepository,
     IGMIStudy IGMIStudy,
     ISteamStudy ISteamStudy,
     IQuotaLiveMatch IQuotaLiveMatch
     )
 {
     //log = LoggerFactory.GetLogger("Xunit");
     //detailedLog = LoggerFactory.GetLogger("Xunit");
     this.xunit = true;
     this.IOfferRepository = IOfferRepository;
     this.IOfferAttributeRepository = IOfferAttributeRepository;
     this.IProviderRepository = IProviderRepository;
     this.IAttributeRepository = IAttributeRepository;
     this.ILiveMatch = ILiveMatch;
     this.IRespondentCatalog = IRespondentCatalog;
     this.IQuotaExpressionRepository = IQuotaExpressionRepository;
     this.IQuotaMappingRepository = IQuotaMappingRepository;
     this.ISampleMappingRepository = ISampleMappingRepository;
     this.IGMIStudy = IGMIStudy;
     this.ISteamStudy = ISteamStudy;
     this.IQuotaLiveMatch = IQuotaLiveMatch;
 }
コード例 #2
0
 public AttributesController(
     ILogger <AttributesController> logger,
     IAttributeRepository attributeRepository)
 {
     _logger = logger;
     _attributeRepository = attributeRepository;
 }
コード例 #3
0
 public AttributesController(IAttributeRepository attributeRepository,
                             IEntityTypeRepository entityTypeRepository, IHubContext <SignalRServer> signalRHub)
 {
     _signalRHub           = signalRHub;
     _attributeRepository  = attributeRepository;
     _entityTypeRepository = entityTypeRepository;
 }
コード例 #4
0
 public CreateCommandHandler(IAttributeRepository repository, IUnitOfWork unitOfWork, IMapper mapper, IAuthenticatedUserService authenticatedUser)
 {
     _repository        = repository;
     _unitOfWork        = unitOfWork;
     _mapper            = mapper;
     _authenticatedUser = authenticatedUser;
 }
コード例 #5
0
        public OffersManager initOffersManager(
            IOfferRepository IOfferRepository,
            IOfferAttributeRepository IOfferAttributeRepository,
            IProviderRepository IProviderRepository,
            IAttributeRepository IAttributeRepository, 
            ILiveMatch ILiveMatch,
            IRespondentCatalog IRespondentCatalog,
            IQuotaExpressionRepository IQuotaExpressionRepository,
            IQuotaMappingRepository IQuotaMappingRepository,
            ISampleMappingRepository ISampleMappingRepository,
            IGMIStudy IGMIStudy,
            ISteamStudy ISteamStudy,
            IQuotaLiveMatch IQuotaLiveMatch
            )
        {
            OffersManager OffersManager = new OffersManager(
            IOfferRepository,
            IOfferAttributeRepository,
            IProviderRepository,
            IAttributeRepository,
            ILiveMatch,
            IRespondentCatalog,
            IQuotaExpressionRepository,
            IQuotaMappingRepository,
            ISampleMappingRepository,
            IGMIStudy,
            ISteamStudy,
            IQuotaLiveMatch);

            return OffersManager;
        }
コード例 #6
0
 public AttributesManager(IAttributeRepository IAttributeRepository)
 {
     //log = LoggerFactory.GetLogger("Xunit");
     //detailedLog = LoggerFactory.GetLogger("Xunit");
     this.AttributeRespository = IAttributeRepository;
     parameters = new Dictionary<string, string>();
 }
コード例 #7
0
ファイル: AttributeUpdater.cs プロジェクト: xixiky/xms
 public AttributeUpdater(IAppContext appContext
                         , IAttributeRepository attributeRepository
                         , IOptionSetDetailCreater optionSetDetailCreater
                         , IOptionSetDetailDeleter optionSetDetailDeleter
                         , IOptionSetDetailFinder optionSetDetailFinder
                         , IOptionSetDetailUpdater optionSetDetailUpdater
                         , IOptionSetFinder optionSetFinder
                         , IStringMapCreater stringMapCreater
                         , IStringMapUpdater stringMapUpdater
                         , ILocalizedLabelService localizedLabelService
                         , IEventPublisher eventPublisher)
 {
     _appContext             = appContext;
     _attributeRepository    = attributeRepository;
     _localizedLabelService  = localizedLabelService;
     _optionSetDetailCreater = optionSetDetailCreater;
     _optionSetDetailDeleter = optionSetDetailDeleter;
     _optionSetDetailFinder  = optionSetDetailFinder;
     _optionSetDetailUpdater = optionSetDetailUpdater;
     _optionSetFinder        = optionSetFinder;
     _stringMapCreater       = stringMapCreater;
     _stringMapUpdater       = stringMapUpdater;
     _eventPublisher         = eventPublisher;
     _cacheService           = new Caching.CacheManager <Domain.Attribute>(_appContext.OrganizationUniqueName + ":attributes", AttributeCache.BuildKey);
     _cacheServiceOption     = new Caching.CacheManager <Domain.OptionSet>(_appContext.OrganizationUniqueName + ":optionsets");
 }
コード例 #8
0
        public AtributosController()
        {
            var ctxFactory = new EFDataContextFactory();

            _attributeRepository = new AttributeRepository(ctxFactory);
            _categoryRepository  = new CategoryRepository(ctxFactory);
        }
コード例 #9
0
ファイル: AttributeFinder.cs プロジェクト: zzdxpq007/xms
 public AttributeFinder(IAppContext appContext
                        , IAttributeRepository attributeRepository
                        )
 {
     _appContext          = appContext;
     _attributeRepository = attributeRepository;
     _cacheService        = new Caching.CacheManager <Domain.Attribute>(_appContext.OrganizationUniqueName + ":attributes", _appContext.PlatformSettings.CacheEnabled);
 }
コード例 #10
0
 public AttributeDependency(IAttributeRepository attributeRepository
                            , IDependencyService dependencyService
                            , IDependencyBatchBuilder dependencyBatchBuilder)
 {
     _attributeRepository    = attributeRepository;
     _dependencyService      = dependencyService;
     _dependencyBatchBuilder = dependencyBatchBuilder;
 }
コード例 #11
0
 public EntityAttributeBusinessEngine(IDataRepositoryFactory data_repo_fact, IBusinessEngineFactory bus_eng_fact, IEntityServiceFactory ent_serv_fact)
     : base(data_repo_fact, bus_eng_fact, ent_serv_fact)
 {
     _attribute_repo    = _data_repository_factory.GetDataRepository <IAttributeRepository>();
     _entity_type_be    = _business_engine_factory.GetBusinessEngine <IEntityTypeBusinessEngine>();
     _attribute_type_be = _business_engine_factory.GetBusinessEngine <IAttributeTypeBusinessEngine>();
     _ent_att_es        = _entity_service_factory.GetEntityService <IEntityAttributeEntityService>();
 }
        public void Init()
        {
            attributeRepository = Substitute.For <IAttributeRepository>();
            var mapper = new MapperConfiguration(x => x.AddProfile(new MappingProfile())).CreateMapper();

            log = Substitute.For <ILog>();
            attributeService = new AttributeService(attributeRepository, mapper, log);
        }
コード例 #13
0
        public CoreAttributeController(IAttributeRepository repository, string catalog, LoginView view)
        {
            this._LoginId = view.LoginId.ToLong();
            this._UserId = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog = catalog;

            this.AttributeRepository = repository;
        }
コード例 #14
0
        public CoreAttributeController(IAttributeRepository repository, string catalog, LoginView view)
        {
            this._LoginId  = view.LoginId.ToLong();
            this._UserId   = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog  = catalog;

            this.AttributeRepository = repository;
        }
コード例 #15
0
        public int LookupCount(TestSearchParamsDto searchParams, IAttributeRepository attributeRepo)
        {
            using (var ctx = _factory.Create() as DbAgrotool)
            {
                //Predicate and conditions
                var query = ApplyConditions(ctx.Tests, searchParams, attributeRepo);

                return(query.Count());
            }
        }
コード例 #16
0
ファイル: UnitOfWork.cs プロジェクト: horodynskyi/MangoWebApi
 public UnitOfWork(IProductRepository productRepository,
                   IAttributeRepository attributeRepository,
                   ICategoryRepository categoryRepository,
                   IValueRepository valueRepository)
 {
     ProductRepository   = productRepository;
     AttributeRepository = attributeRepository;
     CategoryRepository  = categoryRepository;
     ValueRepository     = valueRepository;
 }
コード例 #17
0
ファイル: AttributeFinder.cs プロジェクト: xixiky/xms
 public AttributeFinder(IAppContext appContext
                        , IAttributeRepository attributeRepository
                        //, ILocalizedLabelService localizedLabelService
                        )
 {
     _appContext          = appContext;
     _attributeRepository = attributeRepository;
     //_localizedLabelService = localizedLabelService;
     _cacheService = new Caching.CacheManager <Domain.Attribute>(_appContext.OrganizationUniqueName + ":attributes", AttributeCache.BuildKey);
 }
コード例 #18
0
        public ProductosController()
        {
            var ctxFactory = new EFDataContextFactory();

            _productRepository   = new ProductRepository(ctxFactory);
            _categoryRepository  = new CategoryRepository(ctxFactory);
            _attributeRepository = new AttributeRepository(ctxFactory);
            _companyRepository   = new CompanyRepository(ctxFactory);
            _placeRepository     = new PlaceRepository(ctxFactory);
        }
コード例 #19
0
        public AttributeService(IAttributeRepository attributeRepository,
                                IMapper mapper,
                                IUnitOfWork unitOfWork)
        {
            _attributeRepository = attributeRepository;

            _mapper = mapper;

            _unitOfWork = unitOfWork;
        }
コード例 #20
0
 public ChartRepository(IDbContext dbContext
                        , IAttributeRepository attributeRepository
                        , IStringMapRepository stringMapRepository
                        , IOptionSetDetailRepository optionSetDetailRepository
                        ) : base(dbContext)
 {
     _dataRepository            = new DataRepositoryBase <dynamic>(dbContext);
     _attributeRepository       = attributeRepository;
     _stringMapRepository       = stringMapRepository;
     _optionSetDetailRepository = optionSetDetailRepository;
 }
コード例 #21
0
 public AdTileRepository(ICategoryRepository categoryRepository,
                         IAdvertisementRepository advertisementRepository, IAttributeRepository attributeRepository,
                         IImageRepository imageRepository, IAdTypeRepository adTypeRepository,
                         ClassifiedsContext context) : base(context)
 {
     _attributeRepository     = attributeRepository;
     _imageRepository         = imageRepository;
     _advertisementRepository = advertisementRepository;
     _adTypeRepository        = adTypeRepository;
     _categoryRepository      = categoryRepository;
 }
コード例 #22
0
        public AttributesController(IHttpContextAccessor contextAccessor, IAttributeRepository attributeRepository, IDistributedCache distributedCache)
        {
            string token = contextAccessor.HttpContext.Request.Headers[AttributeConstant.Authorization];

            token = token.Length != 0 ? token.Replace(AttributeConstant.BearerReplace, string.Empty) : string.Empty;
            var    arr     = new JwtSecurityToken(token);
            string orgCode = arr.Claims.ToList()[2].Value;// + AttributeConstant.ConnectionAdd;

            _organizationCode = orgCode;
            attributeRepository.LoadContext(orgCode, distributedCache);
            _attributeRepository = attributeRepository;
        }
コード例 #23
0
 public OfferRepository(ClassifiedsContext context, IAdvertisementRepository advertisementRepository,
                        IAttributeRepository attributeRepository,
                        ICategoryRepository categoryRepository, IImageRepository imageRepository,
                        IInboxRepository inboxRepository) : base(context)
 {
     _advertisementRepository = advertisementRepository;
     _imageRepository         = imageRepository;
     _attributeRepository     = attributeRepository;
     _categoryRepository      = categoryRepository;
     _context         = context;
     _inboxRepository = inboxRepository;
 }
コード例 #24
0
 public ProductCategoriesAttributeService(IProductCategoriesAttributeRepository productCategoriesAttributeRepository,
                                          IAttributeRepository attributeRepository,
                                          IProductCategoryRepository productCategoryRepository,
                                          IResourceService <SharedResource> sharedResourceService,
                                          IResourceService <GhmWarehouseResource> resourceService)
 {
     _productCategoriesAttributeRepository = productCategoriesAttributeRepository;
     _productCategoryRepository            = productCategoryRepository;
     _attributeRepository   = attributeRepository;
     _sharedResourceService = sharedResourceService;
     _resourceService       = resourceService;
 }
コード例 #25
0
 public ProductCategoryService(IProductCategoryRepository productCategoryRepository, IProductCategoryTranslationRepository productCategoryTranslationRepository,
                               IResourceService <SharedResource> sharedResourceService, IResourceService <GhmWarehouseResource> productResourceService,
                               IProductCategoriesAttributeRepository productCategoriesAttributeRepository, IAttributeRepository attributeRepository,
                               IProductsCategorieRepository productsCategorieRepository)
 {
     _productCategoryRepository            = productCategoryRepository;
     _productCategoryTranslationRepository = productCategoryTranslationRepository;
     _sharedResourceService  = sharedResourceService;
     _productResourceService = productResourceService;
     _productCategoriesAttributeRepository = productCategoriesAttributeRepository;
     _attributeRepository         = attributeRepository;
     _productsCategorieRepository = productsCategorieRepository;
 }
コード例 #26
0
        public ItemModifier(ItemModifierData data,
                            IAttributeRepository attributeRepository, IPropertyRepository propertyRepository,
                            IRarityRepository rarityRepository, IItemModifierRepository itemModifierRepository)
        {
            this.data = data;
            this.attributeRepository = attributeRepository;
            this.propertyRepository  = propertyRepository;

            Id            = data.Id;
            Rarity        = rarityRepository.Find(data.RarityId);
            ItemModifiers = itemModifierRepository.Find(data.ItemModifiers);
            Text          = I18N.Instance.Get(data.SuffixTextKey);
            Quality       = 1;
        }
コード例 #27
0
        public CoreAttributeController()
        {
            this._LoginId = AppUsers.GetCurrent().View.LoginId.ToLong();
            this._UserId = AppUsers.GetCurrent().View.UserId.ToInt();
            this._OfficeId = AppUsers.GetCurrent().View.OfficeId.ToInt();
            this._Catalog = AppUsers.GetCurrentUserDB();

            this.AttributeRepository = new MixERP.Net.Schemas.Core.Data.Attribute
            {
                _Catalog = this._Catalog,
                _LoginId = this._LoginId,
                _UserId = this._UserId
            };
        }
コード例 #28
0
        public CoreAttributeController()
        {
            this._LoginId  = AppUsers.GetCurrent().View.LoginId.ToLong();
            this._UserId   = AppUsers.GetCurrent().View.UserId.ToInt();
            this._OfficeId = AppUsers.GetCurrent().View.OfficeId.ToInt();
            this._Catalog  = AppUsers.GetCurrentUserDB();

            this.AttributeRepository = new MixERP.Net.Schemas.Core.Data.Attribute
            {
                _Catalog = this._Catalog,
                _LoginId = this._LoginId,
                _UserId  = this._UserId
            };
        }
コード例 #29
0
 public AttributeValueService(IAttributeValueRepository attributeValueRepository,
                              IAttributeValueTranslationRepository attributeValueTranslationRepository,
                              IAttributeRepository attributeRepository,
                              IProductAttributeRepository productAttributeRepository,
                              IResourceService <SharedResource> sharedResourceService,
                              IResourceService <GhmWarehouseResource> warehouseResourceService
                              )
 {
     _attributeValueRepository            = attributeValueRepository;
     _attributeValueTranslationRepository = attributeValueTranslationRepository;
     _attributeRepository        = attributeRepository;
     _productAttributeRepository = productAttributeRepository;
     _sharedResourceService      = sharedResourceService;
     _warehouseResourceService   = warehouseResourceService;
 }
コード例 #30
0
 public AdDetailRepository(IAdvertisementRepository advertisementRepository, IImageRepository imageRepository,
     IAttributeDetailRepository attributeDetailRepository, ICategoryRepository categoryRepository,
     IAttributeRepository attributeRepository, IInboxRepository inboxRepository,
     IReportRepository reportRepository,
     ClassifiedsContext context, IConfiguration configuration) : base(context)
 {
     _advertisementRepository = advertisementRepository;
     _reportRepository = reportRepository;
     _inboxRepository = inboxRepository;
     _imageRepository = imageRepository;
     _attributeDetailRepository = attributeDetailRepository;
     _attributeRepository = attributeRepository;
     _categoryRepository = categoryRepository;
     _configuration = configuration;
     _context = context;
 }
コード例 #31
0
        public void Setup()
        {
            var options = new DbContextOptionsBuilder <ItemContext>().UseInMemoryDatabase(databaseName: "InMemoryDatabase")
                          .Options;

            _itemContext = new ItemContext(options);

            MapperConfiguration config = new MapperConfiguration(cfg =>
            {
                cfg.AddProfile(new AutoMappingProfile());
            });
            IMapper _mapper = new Mapper(config);

            _attributeRepository = new AttributeRepository(_itemContext, _mapper);
            _attributeController = new AttributeController(_attributeRepository);
        }
コード例 #32
0
        //private readonly ILogger _logger;

        public ExcelImportDataService(IScenarioRepository scenarioRepository,
                                      IRegionRepository regionRepository,
                                      IVariableRepository variableRepository,
                                      IVariableXlsDescriptionRepository variableXlsDescriptionRepository,
                                      IAgrigationXlsDescriptionRepository agrigationXlsDescriptionRepository,
                                      ISubVariableRepository subVariableRepository,
                                      ISubVariableDataRepository subVariableDataRepository,
                                      IProcessSetRepository processSetRepository,
                                      ICommodityRepository commodityRepository,
                                      ICommoditySetRepository commoditySetRepository,
                                      IAttributeRepository attributeRepository,
                                      IUserConstraintRepository userConstraintRepository,
                                      IVariableDataRepository variableDataRepository,
                                      IRegionAgrigationTypeRepository regionAgrigationTypeRepository,
                                      AggregationSumCulculationService aggregationSumulCalculationService,
                                      AggregationSumWorldCulculationService aggregationSumWorldCulculationService,
                                      IXlsFormulaUpdaterService xlsFormulaUpdaterService,
                                      IDataRepository dataRepository,
                                      IUnitOfWork unitOfWork,
                                      //ILogger<ExcelImportDataService> logger,
                                      NxsDbContext context)
        {
            ScenarioRepository                     = scenarioRepository;
            RegionRepository                       = regionRepository;
            ProcessSetRepository                   = processSetRepository;
            CommodityRepository                    = commodityRepository;
            CommoditySetRepository                 = commoditySetRepository;
            AttributeRepository                    = attributeRepository;
            UserConstraintRepository               = userConstraintRepository;
            VariableDataRepository                 = variableDataRepository;
            SubVariableRepository                  = subVariableRepository;
            SubVariableDataRepository              = subVariableDataRepository;
            _aggregationSumCulculationService      = aggregationSumulCalculationService;
            _aggregationSumWorldCulculationService = aggregationSumWorldCulculationService;
            _xlsFormulaUpdaterService              = xlsFormulaUpdaterService;
            _variableRepository                    = variableRepository;
            _variableXlsDescriptionRepository      = variableXlsDescriptionRepository;
            _agrigationXlsDescriptionRepository    = agrigationXlsDescriptionRepository;
            _dataRepository = dataRepository;
            _context        = context;
            UnitOfWork      = unitOfWork;
            //_logger = logger;
            _variableDataHandler        = new VariableDataHandler(this);
            _agrigationDataHandler      = new AggregationDataHandler(this);
            _agrigationDataHandlerWorld = new AggregationDataHandlerWorld(this);
            _aggregationDataHandlerGdp  = new AggregationDataHandlerGdp(this);
        }
コード例 #33
0
        public GetCustomAttributesDataResponse GetCustomAttributesByType(GetCustomAttributesDataRequest request)
        {
            GetCustomAttributesDataResponse result = null;

            try
            {
                result = new GetCustomAttributesDataResponse();
                IAttributeRepository repo = AttrFactory.GetRepository(request, RepositoryType.AttributeLibrary);

                result.CustomAttributes = repo.FindByType(request.TypeId) as List <CustomAttributeData>;
                result.Version          = request.Version;
                return(result);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #34
0
        public IndexViewModel Create(int featureId, string orderBy, string direction, int skip, int take, string filter)
        {
            IAttributeRepository attributeRepository           = this.RequestHandler.Storage.GetRepository <IAttributeRepository>();
            IStringLocalizer <IndexViewModelFactory> localizer = this.RequestHandler.GetService <IStringLocalizer <IndexViewModelFactory> >();

            return(new IndexViewModel()
            {
                FeatureId = featureId,
                Grid = new GridViewModelFactory(this.RequestHandler).Create(
                    orderBy, direction, skip, take, attributeRepository.Count(featureId, filter),
                    new[] {
                    new GridColumnViewModelFactory(this.RequestHandler).Create(localizer["Value"]),
                    new GridColumnViewModelFactory(this.RequestHandler).Create(localizer["Position"], "Position"),
                    new GridColumnViewModelFactory(this.RequestHandler).CreateEmpty()
                },
                    attributeRepository.Range(featureId, orderBy, direction, skip, take, filter).ToList().Select(a => new AttributeViewModelFactory(this.RequestHandler).Create(a)),
                    "_Attribute"
                    )
            });
        }
コード例 #35
0
 public UnitMapper(
     IAttributeRepository attributeRepository,
     IPropertyRepository propertyRepository,
     IBehaviourTreeRepository behaviourTreeRepository,
     IBehaviourRepository behaviourRepository,
     ISkillRepository skillRepository,
     IArchetypeDataRepository archetypeDataRepository,
     ILootDataRepository lootDataRepository,
     IItemRepository itemRepository,
     IPathfinder pathfinder)
 {
     this.attributeRepository     = attributeRepository;
     this.propertyRepository      = propertyRepository;
     this.behaviourTreeRepository = behaviourTreeRepository;
     this.behaviourRepository     = behaviourRepository;
     this.skillRepository         = skillRepository;
     this.archetypeDataRepository = archetypeDataRepository;
     this.lootDataRepository      = lootDataRepository;
     this.itemRepository          = itemRepository;
     this.pathfinder = pathfinder;
 }
コード例 #36
0
 public AttributeService( IAttributeRepository AttributeRepository )
 {
     _repository = AttributeRepository;
 }
コード例 #37
0
 public AttributesManager()
 {
     this.AttributeRespository = new AttributeRepository();
     parameters = new Dictionary<string, string>();
 }
コード例 #38
0
        public AttributesManager initAttributesManager(IAttributeRepository IAttributeRepository)
        {
            AttributesManager AttributesManager = new AttributesManager(IAttributeRepository);

            return AttributesManager;
        }