Ejemplo n.º 1
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>());
 }
 public MediaRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger, IMediaTypeRepository mediaTypeRepository, ITagRepository tagRepository, ILanguageRepository languageRepository)
     : base(scopeAccessor, cache, languageRepository, logger)
 {
     _mediaTypeRepository       = mediaTypeRepository ?? throw new ArgumentNullException(nameof(mediaTypeRepository));
     _tagRepository             = tagRepository ?? throw new ArgumentNullException(nameof(tagRepository));
     _mediaByGuidReadRepository = new MediaByGuidReadRepository(this, scopeAccessor, cache, logger);
 }
Ejemplo n.º 3
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)
 {
     _mediaTypeRepository       = mediaTypeRepository ?? throw new ArgumentNullException(nameof(mediaTypeRepository));
     _tagRepository             = tagRepository ?? throw new ArgumentNullException(nameof(tagRepository));
     _mediaByGuidReadRepository = new MediaByGuidReadRepository(this, scopeAccessor, cache, logger);
 }
Ejemplo n.º 4
0
 public MediaRepository(IScopeAccessor scopeAccessor, CacheHelper cache, ILogger logger, IMediaTypeRepository mediaTypeRepository, ITagRepository tagRepository, IContentSection contentSection, ILanguageRepository languageRepository)
     : base(scopeAccessor, cache, languageRepository, logger)
 {
     _mediaTypeRepository       = mediaTypeRepository ?? throw new ArgumentNullException(nameof(mediaTypeRepository));
     _tagRepository             = tagRepository ?? throw new ArgumentNullException(nameof(tagRepository));
     _mediaByGuidReadRepository = new MediaByGuidReadRepository(this, scopeAccessor, cache, logger);
     EnsureUniqueNaming         = contentSection.EnsureUniqueNaming;
 }
Ejemplo n.º 5
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);
     _mediaByGuidReadRepository = new MediaByGuidReadRepository(this, work, cache, logger, sqlSyntax);
     EnsureUniqueNaming         = contentSection.EnsureUniqueNaming;
 }