Exemple #1
0
    public UploaderService(ConfigInfo configInfo, HttpService httpService,
                           UploadVideoService uploadVideoService,
                           GetAllVideosService getAllVideosService,
                           GetStatusAnimatedThumbnailService getStatusAnimatedThumbnailService,
                           GetAnimatedThumbnailService getAnimatedThumbnailService,
                           AddAnimatedThumbnailsToVideoService addAnimatedThumbnailsToVideoService,
                           UploadSubtitleToVideoService uploadSubtitleToVideoService,
                           DeleteVideoService deleteVideoService,
                           GetVideoService getVideoService,
                           ILogger <UploaderService> logger)
    {
        _configInfo = configInfo;
        httpService.SetAuthorization(_configInfo.Token);
        _uploadVideoService  = uploadVideoService;
        _getAllVideosService = getAllVideosService;
        _addAnimatedThumbnailsToVideoService = addAnimatedThumbnailsToVideoService;
        _uploadSubtitleToVideoService        = uploadSubtitleToVideoService;
        _getAnimatedThumbnailService         = getAnimatedThumbnailService;
        _getStatusAnimatedThumbnailService   = getStatusAnimatedThumbnailService;
        _getVideoService    = getVideoService;
        _deleteVideoService = deleteVideoService;
        _logger             = logger;
        var clientHttp = new System.Net.Http.HttpClient();

        clientHttp.BaseAddress = new Uri(_configInfo.ApiLink);
        clientHttp.DefaultRequestHeaders.Add(API_KEY_NAME, _configInfo.ApiKey);

        var videoInfoHttpService = new HttpService(clientHttp);

        _addVideoInfo          = new AddVideoInfo(videoInfoHttpService);
        _updateVideoThumbnails = new UpdateVideoThumbnails(videoInfoHttpService);
        _deleteVideo           = new DeleteVideo(videoInfoHttpService);
    }
    public DeleteAllModel(GetAllVideosService getAllVideosService, GetVideoService getVideoService, DeleteVideoService deleteVideoService, IRepository <ArchiveVideo> repository)
    {
        _getAllVideosService = getAllVideosService;
        _getVideoService     = getVideoService;

        _deleteVideoService = deleteVideoService;
        _repository         = repository;
    }
 public VideosService(IAppLogger <VideosService> logger, IRepository <ArchiveVideo> repositoryArchiveVideo,
                      CreateAnimatedThumbnailsService createAnimatedThumbnailsService, GetAllAnimatedThumbnailService getAllAnimatedThumbnailService,
                      DeleteVideoService deleteVideoService, GetVideoService getVideoService, GetAllVideosService getAllVideosService)
 {
     _logger = logger;
     _repositoryArchiveVideo          = repositoryArchiveVideo;
     _createAnimatedThumbnailsService = createAnimatedThumbnailsService;
     _getAllAnimatedThumbnailService  = getAllAnimatedThumbnailService;
     _deleteVideoService  = deleteVideoService;
     _getVideoService     = getVideoService;
     _getAllVideosService = getAllVideosService;
 }
    public GetAllVideosTest()
    {
        var httpService = HttpServiceBuilder.Build();

        _getAllVideosService = GetAllVideosServiceBuilder.Build(httpService);
    }