Пример #1
0
 public EvilGlobalServices(IFileDownloadHelper downloadHelper, IFileDownloader fileDownloader,
     IStringDownloader stringDownloader,
     Func<ExportLifetimeContext<IHostChecker>> getHostChecker) {
     DownloadHelper = downloadHelper;
     Downloader = fileDownloader;
     StringDownloader = stringDownloader;
     GetHostChecker = getHostChecker;
 }
Пример #2
0
 public YomaContent(IAbsoluteDirectoryPath destination, Uri uri, IFileDownloadHelper downloader) {
     Contract.Requires<ArgumentNullException>(destination != null);
     _downloader = downloader;
     Destination = destination;
     YasDir = Destination.GetChildDirectoryWithName(".yas");
     FilesDir = YasDir.GetChildDirectoryWithName("files");
     Url = uri;
     ConfigArchive = YasDir.GetChildFileWithName("config" + ArchiveExtension);
     TmpPath = YasDir.GetChildDirectoryWithName("tmp");
 }
Пример #3
0
 public EvilGlobalServices(IFileDownloadHelper downloadHelper, IFileDownloader fileDownloader,
                           IStringDownloader stringDownloader,
                           Func <ExportLifetimeContext <IHostChecker> > getHostChecker, Lazy <IYamlUtil> yaml)
 {
     DownloadHelper   = downloadHelper;
     Downloader       = fileDownloader;
     StringDownloader = stringDownloader;
     GetHostChecker   = getHostChecker;
     Yaml             = yaml;
 }
Пример #4
0
 public FileController(IPublicOrder orderManagerClient,
                       IDownloadTokenDataAccess downloadTokenDataAccess,
                       IFileDownloadHelper downloadHelper,
                       IRequestClient <DownloadAssetRequest> downloadClient,
                       IRequestClient <DoesExistInCacheRequest> doesExistInCacheClient,
                       ICacheHelper cacheHelper)
 {
     this.orderManagerClient      = orderManagerClient;
     this.downloadTokenDataAccess = downloadTokenDataAccess;
     this.downloadHelper          = downloadHelper;
     this.downloadClient          = downloadClient;
     this.doesExistInCacheClient  = doesExistInCacheClient;
     this.cacheHelper             = cacheHelper;
 }
Пример #5
0
        public FileController(IRequestClient <DownloadAssetRequest, DownloadAssetResult> downloadClient,
                              IRequestClient <GetAssetStatusRequest, GetAssetStatusResult> statusClient,
                              IRequestClient <PrepareAssetRequest, PrepareAssetResult> prepareClient,
                              IDownloadTokenDataAccess downloadTokenDataAccess,
                              IDownloadLogDataAccess downloadLogDataAccess,
                              IElasticService elasticService,
                              IUsageAnalyzer usageAnalyzer,
                              IUserAccessProvider userAccessProvider,
                              ITranslator translator,
                              ICacheHelper cacheHelper,
                              IUserDataAccess userDataAccess,
                              IOrderDataAccess orderDataAccess,
                              IFileDownloadHelper downloadHelper,
                              IKontrollstellenInformer kontrollstellenInformer)
        {
            this.usageAnalyzer           = usageAnalyzer;
            this.translator              = translator;
            this.cacheHelper             = cacheHelper;
            this.downloadClient          = downloadClient;
            this.statusClient            = statusClient;
            this.prepareClient           = prepareClient;
            this.downloadTokenDataAccess = downloadTokenDataAccess;
            this.downloadLogDataAccess   = downloadLogDataAccess;
            this.elasticService          = elasticService;
            this.userDataAccess          = userDataAccess;
            this.orderDataAccess         = orderDataAccess;
            this.downloadHelper          = downloadHelper;
            this.kontrollstellenInformer = kontrollstellenInformer;

            // Workaround für Unit-Test
            GetUserAccessFunc = userId =>
            {
                userId = string.IsNullOrWhiteSpace(userId) ? ControllerHelper.GetCurrentUserId() : userId;
                var language = WebHelper.GetClientLanguage(Request);

                return(userAccessProvider.GetUserAccess(language, userId));
            };
        }