コード例 #1
0
 public MediaRepository(IScopeUnitOfWork work, CacheHelper cache, ILogger logger, ISqlSyntaxProvider sqlSyntax, IMediaTypeRepository mediaTypeRepository, ITagRepository tagRepository, IContentSection contentSection)
     : base(work, cache, logger, sqlSyntax, contentSection)
 {
     if (mediaTypeRepository == null) throw new ArgumentNullException("mediaTypeRepository");
     if (tagRepository == null) throw new ArgumentNullException("tagRepository");
     _mediaTypeRepository = mediaTypeRepository;
     _tagRepository = tagRepository;
     _contentXmlRepository = new ContentXmlRepository<IMedia>(work, CacheHelper.NoCache, logger, sqlSyntax);
     _contentPreviewRepository = new ContentPreviewRepository<IMedia>(work, CacheHelper.NoCache, logger, sqlSyntax);
     EnsureUniqueNaming = contentSection.EnsureUniqueNaming;
 }
コード例 #2
0
 public MemberRepository(IDatabaseUnitOfWork work, CacheHelper cache, ILogger logger, ISqlSyntaxProvider sqlSyntax, IMemberTypeRepository memberTypeRepository, IMemberGroupRepository memberGroupRepository, ITagRepository tagRepository, IContentSection contentSection)
     : base(work, cache, logger, sqlSyntax, contentSection)
 {
     if (memberTypeRepository == null)
     {
         throw new ArgumentNullException("memberTypeRepository");
     }
     if (tagRepository == null)
     {
         throw new ArgumentNullException("tagRepository");
     }
     _memberTypeRepository     = memberTypeRepository;
     _tagRepository            = tagRepository;
     _memberGroupRepository    = memberGroupRepository;
     _contentXmlRepository     = new ContentXmlRepository <IMember>(work, CacheHelper.CreateDisabledCacheHelper(), logger, sqlSyntax);
     _contentPreviewRepository = new ContentPreviewRepository <IMember>(work, CacheHelper.CreateDisabledCacheHelper(), logger, sqlSyntax);
 }
コード例 #3
0
        public ContentRepository(IDatabaseUnitOfWork work, CacheHelper cacheHelper, ILogger logger, ISqlSyntaxProvider syntaxProvider, IContentTypeRepository contentTypeRepository, ITemplateRepository templateRepository, ITagRepository tagRepository, IContentSection contentSection)
            : base(work, cacheHelper, logger, syntaxProvider, contentSection)
        {
            if (contentTypeRepository == null)
            {
                throw new ArgumentNullException("contentTypeRepository");
            }
            if (templateRepository == null)
            {
                throw new ArgumentNullException("templateRepository");
            }
            if (tagRepository == null)
            {
                throw new ArgumentNullException("tagRepository");
            }
            _contentTypeRepository    = contentTypeRepository;
            _templateRepository       = templateRepository;
            _tagRepository            = tagRepository;
            _cacheHelper              = cacheHelper;
            _contentPreviewRepository = new ContentPreviewRepository <IContent>(work, CacheHelper.CreateDisabledCacheHelper(), logger, syntaxProvider);
            _contentXmlRepository     = new ContentXmlRepository <IContent>(work, CacheHelper.CreateDisabledCacheHelper(), logger, syntaxProvider);

            EnsureUniqueNaming = true;
        }