Ejemplo n.º 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;
 }
Ejemplo n.º 2
0
 public AttributesController(
     ILogger <AttributesController> logger,
     IAttributeRepository attributeRepository)
 {
     _logger = logger;
     _attributeRepository = attributeRepository;
 }
Ejemplo n.º 3
0
 public AttributesController(IAttributeRepository attributeRepository,
                             IEntityTypeRepository entityTypeRepository, IHubContext <SignalRServer> signalRHub)
 {
     _signalRHub           = signalRHub;
     _attributeRepository  = attributeRepository;
     _entityTypeRepository = entityTypeRepository;
 }
Ejemplo n.º 4
0
 public CreateCommandHandler(IAttributeRepository repository, IUnitOfWork unitOfWork, IMapper mapper, IAuthenticatedUserService authenticatedUser)
 {
     _repository        = repository;
     _unitOfWork        = unitOfWork;
     _mapper            = mapper;
     _authenticatedUser = authenticatedUser;
 }
Ejemplo n.º 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;
        }
 public AttributesManager(IAttributeRepository IAttributeRepository)
 {
     //log = LoggerFactory.GetLogger("Xunit");
     //detailedLog = LoggerFactory.GetLogger("Xunit");
     this.AttributeRespository = IAttributeRepository;
     parameters = new Dictionary<string, string>();
 }
Ejemplo n.º 7
0
 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");
 }
Ejemplo n.º 8
0
        public AtributosController()
        {
            var ctxFactory = new EFDataContextFactory();

            _attributeRepository = new AttributeRepository(ctxFactory);
            _categoryRepository  = new CategoryRepository(ctxFactory);
        }
Ejemplo n.º 9
0
 public AttributeFinder(IAppContext appContext
                        , IAttributeRepository attributeRepository
                        )
 {
     _appContext          = appContext;
     _attributeRepository = attributeRepository;
     _cacheService        = new Caching.CacheManager <Domain.Attribute>(_appContext.OrganizationUniqueName + ":attributes", _appContext.PlatformSettings.CacheEnabled);
 }
Ejemplo n.º 10
0
 public AttributeDependency(IAttributeRepository attributeRepository
                            , IDependencyService dependencyService
                            , IDependencyBatchBuilder dependencyBatchBuilder)
 {
     _attributeRepository    = attributeRepository;
     _dependencyService      = dependencyService;
     _dependencyBatchBuilder = dependencyBatchBuilder;
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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());
            }
        }
Ejemplo n.º 16
0
 public UnitOfWork(IProductRepository productRepository,
                   IAttributeRepository attributeRepository,
                   ICategoryRepository categoryRepository,
                   IValueRepository valueRepository)
 {
     ProductRepository   = productRepository;
     AttributeRepository = attributeRepository;
     CategoryRepository  = categoryRepository;
     ValueRepository     = valueRepository;
 }
Ejemplo n.º 17
0
 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);
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 19
0
        public AttributeService(IAttributeRepository attributeRepository,
                                IMapper mapper,
                                IUnitOfWork unitOfWork)
        {
            _attributeRepository = attributeRepository;

            _mapper = mapper;

            _unitOfWork = unitOfWork;
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 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
            };
        }
Ejemplo n.º 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
            };
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
        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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 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"
                    )
            });
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 36
0
 public AttributeService( IAttributeRepository AttributeRepository )
 {
     _repository = AttributeRepository;
 }
 public AttributesManager()
 {
     this.AttributeRespository = new AttributeRepository();
     parameters = new Dictionary<string, string>();
 }
Ejemplo n.º 38
0
        public AttributesManager initAttributesManager(IAttributeRepository IAttributeRepository)
        {
            AttributesManager AttributesManager = new AttributesManager(IAttributeRepository);

            return AttributesManager;
        }