public DocumentBlueprintRepository(
     IScopeAccessor scopeAccessor,
     AppCaches appCaches,
     ILogger <DocumentBlueprintRepository> logger,
     ILoggerFactory loggerFactory,
     IContentTypeRepository contentTypeRepository,
     ITemplateRepository templateRepository,
     ITagRepository tagRepository,
     ILanguageRepository languageRepository,
     IRelationRepository relationRepository,
     IRelationTypeRepository relationTypeRepository,
     PropertyEditorCollection propertyEditorCollection,
     IDataTypeService dataTypeService,
     DataValueReferenceFactoryCollection dataValueReferenceFactories,
     IJsonSerializer serializer,
     IEventAggregator eventAggregator)
     : base(
         scopeAccessor,
         appCaches,
         logger,
         loggerFactory,
         contentTypeRepository,
         templateRepository,
         tagRepository,
         languageRepository,
         relationRepository,
         relationTypeRepository,
         propertyEditorCollection,
         dataValueReferenceFactories,
         dataTypeService,
         serializer,
         eventAggregator)
 {
 }
Example #2
0
 public MediaRepository(
     IScopeAccessor scopeAccessor,
     AppCaches cache,
     ILogger <MediaRepository> logger,
     ILoggerFactory loggerFactory,
     IMediaTypeRepository mediaTypeRepository,
     ITagRepository tagRepository,
     ILanguageRepository languageRepository,
     IRelationRepository relationRepository,
     IRelationTypeRepository relationTypeRepository,
     PropertyEditorCollection propertyEditorCollection,
     MediaUrlGeneratorCollection mediaUrlGenerators,
     DataValueReferenceFactoryCollection dataValueReferenceFactories,
     IDataTypeService dataTypeService,
     IJsonSerializer serializer,
     IEventAggregator eventAggregator)
     : base(scopeAccessor, cache, logger, languageRepository, relationRepository, relationTypeRepository, propertyEditorCollection, dataValueReferenceFactories, dataTypeService, eventAggregator)
 {
     _cache = cache;
     _mediaTypeRepository       = mediaTypeRepository ?? throw new ArgumentNullException(nameof(mediaTypeRepository));
     _tagRepository             = tagRepository ?? throw new ArgumentNullException(nameof(tagRepository));
     _mediaUrlGenerators        = mediaUrlGenerators;
     _serializer                = serializer;
     _mediaByGuidReadRepository = new MediaByGuidReadRepository(this, scopeAccessor, cache, loggerFactory.CreateLogger <MediaByGuidReadRepository>());
 }
Example #3
0
        private MemberRepository CreateRepository(IScopeProvider provider)
        {
            var                     accessor = (IScopeAccessor)provider;
            ITagRepository          tagRepo  = GetRequiredService <ITagRepository>();
            IRelationTypeRepository relationTypeRepository = GetRequiredService <IRelationTypeRepository>();
            IRelationRepository     relationRepository     = GetRequiredService <IRelationRepository>();
            var                     propertyEditors        = new PropertyEditorCollection(new DataEditorCollection(() => Enumerable.Empty <IDataEditor>()));
            var                     dataValueReferences    = new DataValueReferenceFactoryCollection(() => Enumerable.Empty <IDataValueReferenceFactory>());

            return(new MemberRepository(
                       accessor,
                       AppCaches.Disabled,
                       LoggerFactory.CreateLogger <MemberRepository>(),
                       MemberTypeRepository,
                       MemberGroupRepository,
                       tagRepo,
                       Mock.Of <ILanguageRepository>(),
                       relationRepository,
                       relationTypeRepository,
                       PasswordHasher,
                       propertyEditors,
                       dataValueReferences,
                       DataTypeService,
                       JsonSerializer,
                       Mock.Of <IEventAggregator>(),
                       Options.Create(new MemberPasswordConfigurationSettings())));
        }
Example #4
0
 public MemberRepository(
     IScopeAccessor scopeAccessor,
     AppCaches cache,
     ILogger <MemberRepository> logger,
     IMemberTypeRepository memberTypeRepository,
     IMemberGroupRepository memberGroupRepository,
     ITagRepository tagRepository,
     ILanguageRepository languageRepository,
     IRelationRepository relationRepository,
     IRelationTypeRepository relationTypeRepository,
     IPasswordHasher passwordHasher,
     PropertyEditorCollection propertyEditors,
     DataValueReferenceFactoryCollection dataValueReferenceFactories,
     IDataTypeService dataTypeService,
     IJsonSerializer serializer,
     IEventAggregator eventAggregator,
     IOptions <MemberPasswordConfigurationSettings> passwordConfiguration)
     : base(scopeAccessor, cache, logger, languageRepository, relationRepository, relationTypeRepository,
            propertyEditors, dataValueReferenceFactories, dataTypeService, eventAggregator)
 {
     _memberTypeRepository =
         memberTypeRepository ?? throw new ArgumentNullException(nameof(memberTypeRepository));
     _tagRepository               = tagRepository ?? throw new ArgumentNullException(nameof(tagRepository));
     _passwordHasher              = passwordHasher;
     _jsonSerializer              = serializer;
     _memberGroupRepository       = memberGroupRepository;
     _passwordConfiguration       = passwordConfiguration.Value;
     _memberByUsernameCachePolicy =
         new DefaultRepositoryCachePolicy <IMember, string>(GlobalIsolatedCache, ScopeAccessor, DefaultOptions);
 }
Example #5
0
        internal ExpertService(
            [NotNull] IExpertRepository expertRepository,
            [NotNull] ITypeRepository <NotionType> notionTypeRepository,
            [NotNull] IRelationTypeRepository relationTypeRepository,
            [NotNull] IAssociationRepository associationRepository,
            [NotNull] IRelationRepository relationRepository)
        {
            if (expertRepository == null)
            {
                throw new ArgumentNullException(nameof(expertRepository));
            }
            if (notionTypeRepository == null)
            {
                throw new ArgumentNullException(nameof(notionTypeRepository));
            }
            if (relationTypeRepository == null)
            {
                throw new ArgumentNullException(nameof(relationTypeRepository));
            }
            if (associationRepository == null)
            {
                throw new ArgumentNullException(nameof(associationRepository));
            }
            if (relationRepository == null)
            {
                throw new ArgumentNullException(nameof(relationRepository));
            }

            _expertRepository       = expertRepository;
            _notionTypeRepository   = notionTypeRepository;
            _relationTypeRepository = relationTypeRepository;
            _associationRepository  = associationRepository;
            _relationRepository     = relationRepository;
        }
 public RelationTypeService(
     IRelationTypeRepository RelationTypeRepository,
     IMapper mapper, MyDbContext context) : base(context)
 {
     _RelationTypeRepository = RelationTypeRepository;
     _mapper = mapper;
 }
Example #7
0
 public RelationService(IScopeProvider uowProvider, ILogger logger, IEventMessagesFactory eventMessagesFactory, IEntityService entityService,
                        IRelationRepository relationRepository, IRelationTypeRepository relationTypeRepository)
     : base(uowProvider, logger, eventMessagesFactory)
 {
     _relationRepository     = relationRepository;
     _relationTypeRepository = relationTypeRepository;
     _entityService          = entityService ?? throw new ArgumentNullException(nameof(entityService));
 }
Example #8
0
        private ExpertService CreateServiceUnderTest()
        {
            FakeExpertRepository       = Substitute.For <IExpertRepository>();
            FakeAssociationRepository  = Substitute.For <IAssociationRepository>();
            FakeRelationRepository     = Substitute.For <IRelationRepository>();
            FakeNotionTypeRepository   = Substitute.For <ITypeRepository <NotionType> >();
            FakeRelationTypeRepository = Substitute.For <IRelationTypeRepository>();

            return(new ExpertService(
                       FakeExpertRepository,
                       FakeNotionTypeRepository,
                       FakeRelationTypeRepository,
                       FakeAssociationRepository,
                       FakeRelationRepository));
        }
        public MemberRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger,
                                IMemberTypeRepository memberTypeRepository, IMemberGroupRepository memberGroupRepository, ITagRepository tagRepository, ILanguageRepository languageRepository, IRelationRepository relationRepository, IRelationTypeRepository relationTypeRepository,
                                Lazy <PropertyEditorCollection> propertyEditors, DataValueReferenceFactoryCollection dataValueReferenceFactories)
            : base(scopeAccessor, cache, logger, languageRepository, relationRepository, relationTypeRepository, propertyEditors, dataValueReferenceFactories)
        {
            _memberTypeRepository  = memberTypeRepository ?? throw new ArgumentNullException(nameof(memberTypeRepository));
            _tagRepository         = tagRepository ?? throw new ArgumentNullException(nameof(tagRepository));
            _memberGroupRepository = memberGroupRepository;

            _memberByUsernameCachePolicy = new DefaultRepositoryCachePolicy <IMember, string>(GlobalIsolatedCache, ScopeAccessor, DefaultOptions);
        }
Example #10
0
 public DocumentBlueprintRepository(IScopeAccessor scopeAccessor, AppCaches appCaches, ILogger logger,
                                    IContentTypeRepository contentTypeRepository, ITemplateRepository templateRepository, ITagRepository tagRepository, ILanguageRepository languageRepository, IRelationRepository relationRepository, IRelationTypeRepository relationTypeRepository,
                                    Lazy <PropertyEditorCollection> propertyEditorCollection, DataValueReferenceFactoryCollection dataValueReferenceFactories)
     : base(scopeAccessor, appCaches, logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, relationRepository, relationTypeRepository, propertyEditorCollection, dataValueReferenceFactories)
 {
 }
 public RelationRepository(IScopeAccessor scopeAccessor, ILogger logger, IRelationTypeRepository relationTypeRepository)
     : base(scopeAccessor, CacheHelper.NoCache, logger)
 {
     _relationTypeRepository = relationTypeRepository;
 }
Example #12
0
 public MediaRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger, IMediaTypeRepository mediaTypeRepository, ITagRepository tagRepository, ILanguageRepository languageRepository, IRelationRepository relationRepository, IRelationTypeRepository relationTypeRepository,
                        Lazy <PropertyEditorCollection> propertyEditorCollection, DataValueReferenceFactoryCollection dataValueReferenceFactories)
     : base(scopeAccessor, cache, logger, languageRepository, relationRepository, relationTypeRepository, propertyEditorCollection, dataValueReferenceFactories)
 {
     _cache = cache;
     _mediaTypeRepository       = mediaTypeRepository ?? throw new ArgumentNullException(nameof(mediaTypeRepository));
     _tagRepository             = tagRepository ?? throw new ArgumentNullException(nameof(tagRepository));
     _mediaByGuidReadRepository = new MediaByGuidReadRepository(this, scopeAccessor, cache, logger);
 }
Example #13
0
 public RelationRepository(IDatabaseUnitOfWork work, CacheHelper cache, ILogger logger, ISqlSyntaxProvider sqlSyntax, IRelationTypeRepository relationTypeRepository)
     : base(work, cache, logger, sqlSyntax)
 {
     _relationTypeRepository = relationTypeRepository;
 }
Example #14
0
 public RelationRepository(IDatabaseUnitOfWork work, IRepositoryCacheProvider cache, IRelationTypeRepository relationTypeRepository)
     : base(work, cache)
 {
     _relationTypeRepository = relationTypeRepository;
 }
Example #15
0
 public RelationRepository(IDatabaseUnitOfWork work, IRelationTypeRepository relationTypeRepository)
     : base(work)
 {
     _relationTypeRepository = relationTypeRepository;
 }
Example #16
0
 public RelationTypeLogic(IImisModules imisModules)
 {
     this.relationTypeRepository = new RelationTypeRepository();
     this.imisModules            = imisModules;
 }
 public RelationRepository(IScopeAccessor scopeAccessor, ILogger logger, IRelationTypeRepository relationTypeRepository, IEntityRepository entityRepository)
     : base(scopeAccessor, AppCaches.NoCache, logger)
 {
     _relationTypeRepository = relationTypeRepository;
     _entityRepository       = entityRepository;
 }
Example #18
0
 public MemberRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger,
                         IMemberTypeRepository memberTypeRepository, IMemberGroupRepository memberGroupRepository, ITagRepository tagRepository, ILanguageRepository languageRepository, IRelationRepository relationRepository, IRelationTypeRepository relationTypeRepository,
                         Lazy <PropertyEditorCollection> propertyEditors, DataValueReferenceFactoryCollection dataValueReferenceFactories)
     : base(scopeAccessor, cache, logger, languageRepository, relationRepository, relationTypeRepository, propertyEditors, dataValueReferenceFactories)
 {
     _memberTypeRepository  = memberTypeRepository ?? throw new ArgumentNullException(nameof(memberTypeRepository));
     _tagRepository         = tagRepository ?? throw new ArgumentNullException(nameof(tagRepository));
     _memberGroupRepository = memberGroupRepository;
 }