Esempio n. 1
0
 // Initializes instances of required services using dependency injection
 public MediaLibraryController(IMediaFileUrlRetriever mediaFileUrlRetriever,
                               IMediaLibraryInfoProvider mediaLibraryInfoProvider,
                               IMediaFileInfoProvider mediaFileInfoProvider,
                               ISiteService siteService)
 {
     this.mediaFileUrlRetriever    = mediaFileUrlRetriever;
     this.mediaLibraryInfoProvider = mediaLibraryInfoProvider;
     this.mediaFileInfoProvider    = mediaFileInfoProvider;
     this.siteService = siteService;
 }
Esempio n. 2
0
 public MediaFileRepository(
     IMediaLibraryInfoProvider mediaLibraryInfoProvider,
     IMediaFileInfoProvider mediaFileInfoProvider,
     ISiteService siteService,
     IMediaFileUrlRetriever mediaFileUrlRetriever,
     IOptionsMonitor <XperienceOptions> optionsMonitor)
 {
     _mediaLibraryInfoProvider = mediaLibraryInfoProvider ?? throw new ArgumentNullException(nameof(mediaLibraryInfoProvider));
     _mediaFileInfoProvider    = mediaFileInfoProvider ?? throw new ArgumentNullException(nameof(mediaFileInfoProvider));
     _siteService           = siteService ?? throw new ArgumentNullException(nameof(siteService));
     _mediaFileUrlRetriever = mediaFileUrlRetriever ?? throw new ArgumentNullException(nameof(mediaFileUrlRetriever));
     _optionsMonitor        = optionsMonitor ?? throw new ArgumentNullException(nameof(optionsMonitor));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="KenticoMediaFileRepository"/> class.
 /// </summary>
 /// <param name="mediaLibraryInfoProvider">Provider for <see cref="MediaLibraryInfo"/> management.</param>
 /// <param name="mediaFileInfoProvider">Provider for <see cref="MediaFileInfo"/> management.</param>
 /// <exception cref="ArgumentNullException">Thrown when <paramref name="mediaLibraryInfoProvider"/> or <paramref name="mediaFileInfoProvider"/> is null.</exception>
 public KenticoMediaFileRepository(IMediaLibraryInfoProvider mediaLibraryInfoProvider, IMediaFileInfoProvider mediaFileInfoProvider)
 {
     this.mediaLibraryInfoProvider = mediaLibraryInfoProvider ?? throw new ArgumentNullException(nameof(mediaLibraryInfoProvider));
     this.mediaFileInfoProvider    = mediaFileInfoProvider ?? throw new ArgumentNullException(nameof(mediaFileInfoProvider));
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MediaFileRepository"/> class.
 /// </summary>
 /// <param name="mediaLibraryInfoProvider">Provider for <see cref="MediaLibraryInfo"/> management.</param>
 /// <param name="mediaFileInfoProvider">Provider for <see cref="MediaFileInfo"/> management.</param>
 /// <param name="repositoryCacheHelper">Handles caching of retrieved objects.</param>
 public MediaFileRepository(IMediaLibraryInfoProvider mediaLibraryInfoProvider, IMediaFileInfoProvider mediaFileInfoProvider, RepositoryCacheHelper repositoryCacheHelper)
 {
     this.mediaLibraryInfoProvider = mediaLibraryInfoProvider;
     this.mediaFileInfoProvider    = mediaFileInfoProvider;
     this.repositoryCacheHelper    = repositoryCacheHelper;
 }