Exemplo n.º 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);
    }
Exemplo n.º 2
0
    public DeleteAllModel(GetAllVideosService getAllVideosService, GetVideoService getVideoService, DeleteVideoService deleteVideoService, IRepository <ArchiveVideo> repository)
    {
        _getAllVideosService = getAllVideosService;
        _getVideoService     = getVideoService;

        _deleteVideoService = deleteVideoService;
        _repository         = repository;
    }
Exemplo n.º 3
0
 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;
 }
Exemplo n.º 4
0
    public GetAllVideosTest()
    {
        var httpService = HttpServiceBuilder.Build();

        _getAllVideosService = GetAllVideosServiceBuilder.Build(httpService);
    }