Esempio n. 1
0
 public VideoController()
 {
     var videorepo = new VideoRepository();
     _videoService = new VideoService(videorepo);
     var productschedrapo = new ProductScheduleRepository();
     _repositoryschedule = new ProductScheduleService(productschedrapo);
 }
Esempio n. 2
0
 public VideoController(IVideoService videoService, IVideoCatService videoCatService)
 {
     this.VideoService = videoService;
     this.VideoCatService = videoCatService;
     this.AddDisposableObject(videoService);
     this.AddDisposableObject(videoCatService);
 }
Esempio n. 3
0
 public VideoController(IVideoCommentService comment, IVideoService video, IReportService report, IConfigInfoService configInfoService)
 {
     _comment = comment;
     _video = video;
     _report = report;
     _configInfoService = configInfoService;
 }
        public RedirectToRouteResult Submit(string videoUrl)
        {
            videoService = VideoServiceFactory.GetVideoService(videoUrl);
            videoInfo = videoService.GetVideoInfo(videoUrl);
            TempData["videoInfo"] = videoInfo;

            return RedirectToAction("VideoForm");
        }
 public PersonalNotesController(
     ICategoryService categoryService,
     INoteService noteService,
     IVideoService videoService)
 {
     this.categoryService = categoryService;
     this.noteService = noteService;
     this.videoService = videoService;
 }
Esempio n. 6
0
 public ControlTestsMoq()
 {
     var serviceMoc = new Mock<IVideoService>();
     serviceMoc.Setup(x => x.GetVideo(40816886, 200, "c193e28abe97b2f74b53e4a1bfcb77ee7c8ec8167f0c52a98781eae410ec373b603740e81aacb2cc35d7e",0))
                .Returns(
                 "{\"response\":[6,{\"vid\":171540519,\"owner_id\":40816886,\"title\":\"\\\"Unsung Hero\\\" (Official HD) : TVC Thai Life Insurance\",\"description\":\"\",\"duration\":185,\"link\":\"video40816886_171540519\",\"date\":1450170645,\"views\":3,\"image\":\"http:\\/\\/cs543403.vk.me\\/u2884035\\/video\\/m_fe51d43f.jpg\",\"image_medium\":\"http:\\/\\/cs543403.vk.me\\/u2884035\\/video\\/l_95aeb1b4.jpg\",\"comments\":0,\"player\":\"http:\\/\\/vk.com\\/video_ext.php?oid=40816886&id=171540519&hash=36c10509b6353f06\"},{\"vid\":167087585,\"owner_id\":40816886,\"title\":\"Девочка со спичками (2006)\",\"description\":\"Короткометражный мультипликационный фильм по мотивам сказки Ганса Христиана Андерсена «Девочка со спичками». Мультфильм номинировался на премию «Оскар» в 2007 среди короткометражных мультфильмов.\",\"duration\":383,\"link\":\"video40816886_167087585\",\"date\":1389290233,\"views\":1,\"image\":\"http:\\/\\/cs12464.vk.me\\/u14397688\\/video\\/m_81b625a9.jpg\",\"image_medium\":\"http:\\/\\/cs12464.vk.me\\/u14397688\\/video\\/l_9e95da11.jpg\",\"comments\":0,\"player\":\"http:\\/\\/vk.com\\/video_ext.php?oid=40816886&id=167087585&hash=6daded16161a8689\"},{\"vid\":165381603,\"owner_id\":40816886,\"title\":\"Imagine Dragons - It's Time - (Peter Hollens &amp; Tyler Ward Cover)\",\"description\":\"\",\"duration\":259,\"link\":\"video40816886_165381603\",\"date\":1372222424,\"views\":2,\"image\":\"http:\\/\\/cs507517.vk.me\\/u196194245\\/video\\/m_cfd34c19.jpg\",\"image_medium\":\"http:\\/\\/cs507517.vk.me\\/u196194245\\/video\\/l_da316fa4.jpg\",\"comments\":0,\"player\":\"http:\\/\\/vk.com\\/video_ext.php?oid=40816886&id=165381603&hash=330a248b3e1ece3d\"},{\"vid\":165381586,\"owner_id\":40816886,\"title\":\"We Are Young - fun. - Mike Tompkins\",\"description\":\"\",\"duration\":291,\"link\":\"video40816886_165381586\",\"date\":1372221988,\"views\":3,\"image\":\"http:\\/\\/cs506510.vk.me\\/u7199434\\/video\\/m_c8ae708e.jpg\",\"image_medium\":\"http:\\/\\/cs506510.vk.me\\/u7199434\\/video\\/l_f1dc39b0.jpg\",\"comments\":0,\"player\":\"http:\\/\\/vk.com\\/video_ext.php?oid=40816886&id=165381586&hash=bd6cf121e8575a43\"},{\"vid\":165381576,\"owner_id\":40816886,\"title\":\"Skyrim Theme Lyrics Video - A cappella - Peter Hollens\",\"description\":\"ВОИСТЕНУ!\",\"duration\":233,\"link\":\"video40816886_165381576\",\"date\":1372221803,\"views\":1,\"image\":\"http:\\/\\/cs518422.vk.me\\/u16931603\\/video\\/m_aff496b7.jpg\",\"image_medium\":\"http:\\/\\/cs518422.vk.me\\/u16931603\\/video\\/l_22b81985.jpg\",\"comments\":0,\"player\":\"http:\\/\\/vk.com\\/video_ext.php?oid=40816886&id=165381576&hash=3f83ae0ef23c4e7a\"},{\"vid\":163812135,\"owner_id\":40816886,\"title\":\"Жестокий розыгрыш в лифте\",\"description\":\"\",\"duration\":353,\"link\":\"video40816886_163812135\",\"date\":1354290571,\"views\":3,\"image\":\"http:\\/\\/cs6037.vk.me\\/u40816886\\/video\\/m_6cd215ae.jpg\",\"image_medium\":\"http:\\/\\/cs6037.vk.me\\/u40816886\\/video\\/l_3bb91498.jpg\",\"comments\":0,\"player\":\"http:\\/\\/www.youtube.com\\/embed\\/eP3HVLQftyc\"}]}"
                 );
     service = serviceMoc.Object;
 }
Esempio n. 7
0
 public ApiPublicationController(IOrchardServices orchardServices, IVideoService videoService, IIssueService issueService, ICategoryService categoryService, IImageService imageService)
 {
     _videoService = videoService;
     _issueService = issueService;
     _categoryService = categoryService;
     _imageService = imageService;
     Services = orchardServices;
     T = NullLocalizer.Instance;
 }
Esempio n. 8
0
 public TestController(IManageUsersService manageUsersBll, IArticleService articleService, IMusicService musicService, IVideoService videoService, IGameService gameService, IConfigInfoService configInfoService, IArticleImagesService articleImagesService)
 {
     _manageUsersBll = manageUsersBll;
     _articleService = articleService;
     _musicService = musicService;
     _videoService = videoService;
     _gameService = gameService;
     _configInfoService = configInfoService;
     _articleImagesService = articleImagesService;
 }
Esempio n. 9
0
 public VideoController(
     IHostingEnvironment env,
     IVideoService videoService,
     IConfiguration configuration,
     IMapper mapper)
 {
     environment    = env;
     _videoService  = videoService;
     _configuration = configuration;
     _mapper        = mapper;
 }
 public ManagementController(ILoggerProvider loggerProvider,
                             IPaintingService paintingService,
                             IVideoService videoService,
                             ICategoryService categoryService,
                             IArticleService articleService) : base(loggerProvider)
 {
     _paintingService = paintingService;
     _videoService    = videoService;
     _categoryService = categoryService;
     _articleService  = articleService;
 }
Esempio n. 11
0
        public VideoListViewModel()
        {
            ActualPage   = new Page();
            videoService = new AwEmpireApiVideoService();
            VideoTagList = new List <Tag>();

            DurationList = new List <string> {
                VideoLength.Short.ToString(), VideoLength.Medium.ToString(), VideoLength.Long.ToString()
            };
            LoadVideos();
        }
Esempio n. 12
0
        public HomePageViewModel(
            IVideoService videoService,
            IDialogService dialogService,
            IYoutubeLauncherService youtubeLauncherService)
        {
            _videoService           = videoService;
            _dialogService          = dialogService;
            _youtubeLauncherService = youtubeLauncherService;

            Videos           = new ObservableRangeCollection <VideoItem>();
            OpenVideoCommand = new Command <VideoItem>(async v => await OnOpenVideo(v));
        }
        public Directories()
        {
            directoryService = new SimpleDirectoryService(new SimpleConnectionCreater());
            imageService     = new SimpleImageService(new SimpleConnectionCreater());
            videoService     = new SimpleVideoService(new SimpleConnectionCreater());
            musicService     = new SimpleMusicService(new SimpleConnectionCreater());

            myDirectories = new ObservableCollection <Directory>(directoryService.GetAll());
            InitializeComponent();
            this.directories.ItemsSource = myDirectories;
            CreateFileMonitors();
        }
Esempio n. 14
0
        public MainForm(ILogger <MainForm> logger, IMapper mapper, IDataAccessorService dataService, IVideoService videoService)
        {
            _logger       = logger ?? throw new ArgumentNullException(nameof(logger));
            _mapper       = mapper ?? throw new ArgumentNullException(nameof(mapper));
            _dataService  = dataService ?? throw new ArgumentNullException(nameof(dataService));
            _videoService = videoService ?? throw new ArgumentNullException(nameof(videoService));

            InitializeComponent();

            Text = $"Video Manager - {GetType().Assembly.GetName().Version}";
            _logger.LogInformation($"{Text} started!");
        }
        /// <param name="httpClient">The provided HttpClient object needs to have set the user agent string to mimic a desktop browser</param>
        public YtExplodeVideoService(
            HttpClient httpClient,
            ISettings settings,
            ITmdbApiService tmdbApiService,
            IPlayVideo videoPlayer
            ) : base(settings, tmdbApiService, videoPlayer)
        {
            _fallback = new VanillaYtVideoService(settings, tmdbApiService, _videoPlayer);

            _youtubeClient  = httpClient == null ? new YoutubeClient() : new YoutubeClient(httpClient);
            _streamSelector = new YtVideoStreamSelector(settings);
        }
Esempio n. 16
0
 public UserController(IUserService userService, UserManager <AppUser> user, IFollowChannelService follow,
                       IVideoService video, IReportVideoService report, ICategoryService category,
                       IUserApiCient userApi)
 {
     _userService     = userService;
     _usermanager     = user;
     _followChanel    = follow;
     _videoService    = video;
     _reportService   = report;
     _categoryService = category;
     _userApiClient   = userApi;
 }
Esempio n. 17
0
 public PictureController(IPictureService pictureService, IUserContext userContext, IFileService fileService, IVideoService videoService, ISettingService settingService, IPermissionService permissionService, IUrlHelper urlHelper, ISMSService smsService, IUserService userService)
 {
     this._pictureService    = pictureService;
     this._userContext       = userContext;
     this._fileService       = fileService;
     this._videoService      = videoService;
     this._settingService    = settingService;
     this._permissionService = permissionService;
     this._urlHelper         = urlHelper;
     this._smsService        = smsService;
     this._userService       = userService;
 }
Esempio n. 18
0
 public HomeController(IConfiguration configuration, IMemoryCache cache, ICategoryService categoryService,
                       INewsService newsService, IVideoService videoService, IBannerService bannerService, IBranchContactService branchContactService,
                       IMenuService menuService, ISettingService settingService, ISocialNetworkService socialNetworkService, ILanguageService languageService)
     : base(configuration, cache, branchContactService, menuService, settingService, socialNetworkService, languageService)
 {
     _configuration   = configuration;
     _newsService     = newsService;
     _cache           = cache;
     _videoService    = videoService;
     _menuService     = menuService;
     _bannerService   = bannerService;
     _categoryService = categoryService;
 }
Esempio n. 19
0
 public HomeController()
 {
     _settingService            = EngineContext.Current.Resolve <ISettingService>();
     _workContext               = EngineContext.Current.Resolve <IWorkContext>();
     _cacheManager              = EngineContext.Current.Resolve <ICacheManager>();
     _articleRepository         = EngineContext.Current.Resolve <IBaseRepository <Article> >();
     _articleLanguageRepository = EngineContext.Current.Resolve <IBaseRepository <ArticleLanguage> >();
     _resourceService           = EngineContext.Current.Resolve <IResourceService>();
     _articleService            = EngineContext.Current.Resolve <IArticleService>();
     _artistsService            = EngineContext.Current.Resolve <IArtistsService>();
     _videoService              = EngineContext.Current.Resolve <IVideoService>();
     _mediaService              = EngineContext.Current.Resolve <IMediaService>();
 }
Esempio n. 20
0
 public VideoController(
     IHostingEnvironment hostingEnvironment,
     IVideoService videoService,
     IMapper mapper,
     IOptions <AppSettings> appSettings,
     ILogger <VideoController> logger)
 {
     _hostingEnvironment = hostingEnvironment;
     _videoService       = videoService;
     _mapper             = mapper;
     _appSettings        = appSettings.Value;
     _logger             = logger;
 }
Esempio n. 21
0
        public AccountService(
            IDeletableEntityRepository <ApplicationUser> userRepository,
            IVideoService videoService,
            ICommentSerivce commentSerivce,
            IRateService rateService

            )
        {
            this.videoService   = videoService;
            this.userRepository = userRepository;
            this.commentSerivce = commentSerivce;
            this.rateService    = rateService;
        }
Esempio n. 22
0
        public async Task <ActionResult <IEnumerable <Video> > > GetAll([FromServices] IVideoService VideoService)
        {
            try
            {
                var videos = await VideoService.GetAll();

                return(Ok(videos));
            }
            catch
            {
                return(BadRequest(new { message = Messages.NAO_FOI_POSSIVEL_BUSCAR_OS_VIDEOS }));
            }
        }
Esempio n. 23
0
 public IssueService(IOrchardServices orchardServices, 
     IShapeFactory shapeFactory, 
     ISiteService siteService,
     IRepository<ArticleCategoryRecord> articleCategoryRepository,
     IVideoService videoService, IImageService imageService)
 {
     _orchardServices = orchardServices;
     _shapeFactory = shapeFactory;
     _siteService = siteService;
     _articleCategoryRepository = articleCategoryRepository;
     _videoService = videoService;
     _imageService = imageService;
 }
 public HomeController(IUserService userService,
                       SignInManager <AppUser> signInManager, UserManager <AppUser> usermanager,
                       IVideoService service, IReportVideoService report, ICategoryService category,
                       IUserApiCient userApiClient)
 {
     _userService     = userService;
     _signInManager   = signInManager;
     _userManager     = usermanager;
     _videoService    = service;
     _reportService   = report;
     _categoryService = category;
     _userApiClient   = userApiClient;
 }
Esempio n. 25
0
 public MovieDetailsService(
     ISettings settings,
     ITmdbApiService tmdbApiService,
     IMovieDetailModelConfigurator movieDetailModelConfigurator,
     IPersonDetailModelConfigurator personDetailModelConfigurator,
     IVideoService videoService)
 {
     _settings       = settings;
     _tmdbApiService = tmdbApiService;
     _movieDetailModelConfigurator  = movieDetailModelConfigurator;
     _personDetailModelConfigurator = personDetailModelConfigurator;
     _videoService = videoService;
 }
Esempio n. 26
0
 public EmployeeController(IUserService userService, IPictureService pictureService, IUserContext userContext, ISliderService sliderService, ISettingService settingService, ISMSService smsService, IVideoService videoService, ICommentService commentService, IReplyService replyService, IBlogService blogService)
 {
     this._userService    = userService;
     this._pictureService = pictureService;
     this._userContext    = userContext;
     this._sliderService  = sliderService;
     this._settingService = settingService;
     this._smsService     = smsService;
     this._videoService   = videoService;
     this._commentService = commentService;
     this._replyService   = replyService;
     this._blogService    = blogService;
 }
Esempio n. 27
0
        public async Task Invoke(HttpContext httpContext, IVideoService videoService)
        {
            if (!httpContext.Request.Path.StartsWithSegments(new PathString("/videostream")))
            {
                await this.next(httpContext);

                return;
            }

            string     id        = httpContext.Request.Query["file"];
            IVideoFile videoFile = videoService.GetVideoFile(id);

            if (videoFile == null)
            {
                httpContext.Response.StatusCode = 404;
                return;
            }

            string header = httpContext.Request.Headers["Range"];
            long   begin, end;

            if (this.TryRangeParse(header, videoFile, out begin, out end))
            {
                end = Math.Min(begin + maxTransfer, end);

                if (begin >= videoFile.Size || end > videoFile.Size)
                {
                    httpContext.Response.StatusCode = 416;
                    httpContext.Response.Headers.Add("Content-Range", $"bytes */{videoFile.Size}");
                    return;
                }

                httpContext.Response.StatusCode = 206;
                string rangeOut = $"bytes {begin}-{end}/{videoFile.Size}";
                httpContext.Response.ContentType = videoFile.ContentType;

                httpContext.Response.Headers.Add("Accept-Ranges", "bytes");
                httpContext.Response.Headers.Add("Content-Range", new Microsoft.Extensions.Primitives.StringValues(rangeOut));
                httpContext.Response.Headers.Add("Cache-Control", "no-cache");

                await videoFile.CopyTo(httpContext.Response.Body, begin, end);
            }
            else
            {
                httpContext.Response.ContentType = videoFile.ContentType;
                httpContext.Response.Headers.Add("Accept-Ranges", "bytes");
                httpContext.Response.Headers.Add("Cache-Control", "no-cache");

                await videoFile.CopyTo(httpContext.Response.Body);
            }
        }
        private void RefreshListBox()
        {
            IVideoService service = CurrentService;

            if (service.Auth.IsLoggedIn)
            {
                _videoRequestComboBox.Visible = true;
                if (_videoRequestComboBox.SelectedIndex == -1)
                {
                    _videoRequestComboBox.SelectedIndex = 0;
                }

                _listBoxVideos.Visible     = true;
                _videoLoginControl.Visible = false;

                _listBoxVideos.Items.Clear();
                _listBoxVideos.QueryStatusText = Res.Get(StringId.Plugin_Video_Soapbox_Retrieve_Msg);
                _listBoxVideos.Update();

                int videosAvailable;
                try
                {
                    IVideo[] videos = service.GetVideos(_videoRequestComboBox.SelectedRequestType, 10000,
                                                        _videoPagingControl.NumberOfVideosPerPage,
                                                        _videoPagingControl.CurrentPage,
                                                        out videosAvailable);

                    _videoPagingControl.NumberOfVideos = videosAvailable;
                    _listBoxVideos.DisplayVideos(videos);
                    if (_listBoxVideos.Items.Count > 0)
                    {
                        _listBoxVideos.SelectedIndex = 0;
                    }
                }
                catch (Exception e)
                {
                    Trace.Write("Failed getting videos: " + e.Message);
                    _listBoxVideos.DisplayGetVideosError();
                    _listBoxVideos.Update();
                }
            }
            else
            {
                _videoRequestComboBox.Visible  = false;
                _listBoxVideos.Visible         = false;
                _videoLoginControl.Visible     = true;
                _listBoxVideos.QueryStatusText = "";
                _videoPagingControl.Reset();
                _videoLoginControl.Clear();
            }
        }
Esempio n. 29
0
 public PermissionController(IUserService userService, IPictureService pictureService, IUserContext userContext, ISliderService sliderService, ISettingService settingService, IPermissionService permissionService, IVideoService videoService, ICommentService commentService, IReplyService replyService, IBlogService blogService, IRoleService roleService)
 {
     this._userService       = userService;
     this._pictureService    = pictureService;
     this._userContext       = userContext;
     this._sliderService     = sliderService;
     this._settingService    = settingService;
     this._permissionService = permissionService;
     this._videoService      = videoService;
     this._commentService    = commentService;
     this._replyService      = replyService;
     this._blogService       = blogService;
     this._roleService       = roleService;
 }
Esempio n. 30
0
 public VideoController(
     ApiSettings settings,
     ILogger <VideoController> logger,
     ITransactionCoordinator transactionCoordinator,
     IVideoService videoService,
     IApiVideoServerModelMapper videoModelMapper
     )
     : base(settings, logger, transactionCoordinator)
 {
     this.VideoService     = videoService;
     this.VideoModelMapper = videoModelMapper;
     this.BulkInsertLimit  = 250;
     this.MaxLimit         = 1000;
     this.DefaultLimit     = 250;
 }
Esempio n. 31
0
 public AlbumService(IAlbumRepository albumRepository,
                     IResourceService <SharedResource> sharedResourceService,
                     IResourceService <GhmWebsiteResource> websiteResourceService, IPhotoRepository photoRepository,
                     IAlbumTranslationRepository albumTranslationRepository, IVideoRepository videoRepository, IVideoService videoService,
                     IVideoTranslationRepository videoTranslationRepository)
 {
     _albumRepository                 = albumRepository;
     _sharedResourceService           = sharedResourceService;
     _websiteResourceService          = websiteResourceService;
     _photoRepository                 = photoRepository;
     this._albumTranslationRepository = albumTranslationRepository;
     _videoRepository                 = videoRepository;
     _videoService = videoService;
     _videoTranslationRepository = videoTranslationRepository;
 }
Esempio n. 32
0
 public BaseViewModel()
 {
     patientService             = new PatientService();
     mdtService                 = new MDTService();
     dentalProceduresService    = new DentalProceduresService();
     procedureCellService       = new ProcedureCellService();
     proceduresTableService     = new ProceduresTableService();
     dentistAppointmentsService = new DentistAppointmentService();
     doctorService              = new DoctorService();
     activityService            = new ActivityService();
     reminderService            = new ReminderService();
     videoService               = new VideoService();
     diseaseService             = new DiseaseService();
     diagnoseService            = new DiagnoseService();
 }
Esempio n. 33
0
 public NewsController(IUserService userService, IPictureService pictureService, IUserContext userContext, ISliderService sliderService, ISettingService settingService, ISMSService smsService, IVideoService videoService, ICommentService commentService, IReplyService replyService, INewsService newsService, IAuthenticationService authenticationService, IRoleService roleService)
 {
     this._userService           = userService;
     this._pictureService        = pictureService;
     this._userContext           = userContext;
     this._sliderService         = sliderService;
     this._settingService        = settingService;
     this._smsService            = smsService;
     this._videoService          = videoService;
     this._commentService        = commentService;
     this._replyService          = replyService;
     this._newsService           = newsService;
     this._authenticationService = authenticationService;
     this._roleService           = roleService;
 }
Esempio n. 34
0
        public VideoAppService(
            IRepository <Video> videoRepo,
            IObjectMapper objectMapper,
            IAbpSession abpSession,
            IResourceDirService resourceDirManager,
            IVideoService videoService
            )

        {
            this._videoRepo          = videoRepo;
            this._objectMapper       = objectMapper;
            this._abpSession         = abpSession;
            this._resourceDirManager = resourceDirManager;
            this._videoService       = videoService;
        }
Esempio n. 35
0
 public BiliBiliClient(
     TokenPackage tokenPackage,
     IAccountService accountService,
     IChannelService channelService,
     ITopicService topicService,
     IVideoService videoService,
     IAnimeService animeService)
 {
     BiliTool._accessToken = tokenPackage.AccessToken;
     Account = accountService;
     Channel = channelService;
     Topic   = topicService;
     Video   = videoService;
     Anime   = animeService;
 }
Esempio n. 36
0
 public BlogController(IUserService userService, IPictureService pictureService, IUserContext userContext, ISliderService sliderService, ISettingService settingService, IVideoService videoService, ICommentService commentService, IReplyService replyService, IBlogService blogService, IPermissionService permissionService, IUrlHelper urlHelper, IUrlService urlService, ISMSService smsService)
 {
     _userService       = userService;
     _pictureService    = pictureService;
     _userContext       = userContext;
     _sliderService     = sliderService;
     _settingService    = settingService;
     _videoService      = videoService;
     _commentService    = commentService;
     _replyService      = replyService;
     _blogService       = blogService;
     _permissionService = permissionService;
     _urlHelper         = urlHelper;
     _urlService        = urlService;
     _smsService        = smsService;
 }
Esempio n. 37
0
 public VideosController(
     DataContext context,
     IVideoService vserv,
     IUserService userv,
     ILogger <VideosController> logger,
     NoEmbedService noembed,
     IMapper mapper,
     IOptions <AppSettings> settings)
 {
     noembedService = noembed;
     _logger        = logger;
     _userService   = userv;
     _mapper        = mapper;
     _videoService  = vserv;
     _settings      = settings.Value;
 }
Esempio n. 38
0
        public VideoViewValidator(IVideoService service)
        {
            CascadeMode = CascadeMode.StopOnFirstFailure;

            RuleSet("AddVideo", () => {
                RuleFor(c => c.Name).NotEmpty().MinimumLength(2).MaximumLength(32).WithMessage("Video name is required.");
                RuleFor(c => c.Url).NotEmpty().WithMessage("Video url is required.");
                RuleFor(c => c.Order).GreaterThan(0).WithMessage("Video order must be greater than 0.");
            });

            RuleSet("UpdateVideo", () => {
                RuleFor(c => c.Name).NotEmpty().MinimumLength(2).MaximumLength(32).WithMessage("Video name is required.");
                RuleFor(c => c.Url).NotEmpty().WithMessage("Video url is required.");
                RuleFor(c => c.Order).GreaterThan(0).WithMessage("Video order must be greater than 0.");
            });
        }
Esempio n. 39
0
        public ActionResult Index()
        {
            IEnumerable <VideoViewModel> model;

            using (IVideoService videoService = ServiceCreator.CreateVideoService(Connection))
            {
                IEnumerable <VideoDTO> videosDto = videoService.GetAllVideos();
                var config = new MapperConfiguration(cfg =>
                {
                    cfg.CreateMap <VideoDTO, VideoViewModel>();
                });
                var mapper = config.CreateMapper();
                model = mapper.Map <IEnumerable <VideoDTO>, IEnumerable <VideoViewModel> >(videosDto);
            }
            return(View(model));
        }
Esempio n. 40
0
 public VideoUploadSurfaceController(IEventPublisher eventPublisher, IVideoService videoService)
 {
     _videoService = videoService;
      _eventPublisher = eventPublisher;
 }
Esempio n. 41
0
 public VideoController(IVideoService musicBll, IVideoCommentService videoCommentService)
 {
     _videoBll = musicBll;
     _videoCommentService = videoCommentService;
 }
 public SearchController(ISearchService searchService, INoteService noteService,IVideoService videoService)
 {
     this.searchService = searchService;
     this.noteService = noteService;
     this.videoService = videoService;
 }
Esempio n. 43
0
        public VideosController( IVideoService videoService)
        {
            Check.If(videoService).IsNotNull();

            _videoService = videoService;
        }
Esempio n. 44
0
 public VideoPickerController(IVideoService videoService)
 {
     _videoService = videoService;
 }
Esempio n. 45
0
 public AdminController(IPortfolioService portfolioService, IImageService imageService, IVideoService videoService)
 {
     _portfolioService = portfolioService;
     _imageService = imageService;
     _videoService = videoService;
 }
Esempio n. 46
0
        public static VideosController GetInitialisedVideosController(IVideoService videoService)
        {
            var controller = new VideosController(videoService)
            {
                Request = new HttpRequestMessage { RequestUri = new Uri(Url) },
                Configuration = new HttpConfiguration()
            };

            controller.Configuration.MapHttpAttributeRoutes();
            controller.Configuration.EnsureInitialized();

            return controller;
        }
        public void RegisterServices(IVideoService[] services)
        {
            foreach (IVideoService service in services)
                _sidebarService.SetEntry(service, service.Image, service.ServiceName);

            _sidebarService.SelectedIndexChanged += _sidebarService_SelectedIndexChanged;
            _videoRequestComboBox.SelectedRequestTypeChanged += _videoRequestComboBox_SelectedRequestTypeChanged;
            _videoPagingControl.RefreshRequested += _videoPagingControl_RefreshRequested;
            _videoLoginStatusControl.LoginStatusChanged += _videoLoginStatusControl_LoginStatusChanged;
            _listBoxVideos.DoubleClick += _listBoxVideos_DoubleClick;
        }
Esempio n. 48
0
 public Control(IVideoService service)
 {
     DownloadVideo = new DownloadVideo(service);
 }
Esempio n. 49
0
 public VideoController(IVideoService _videoService)
 {
     this.videoService = _videoService;
 }
Esempio n. 50
0
 public VideoUploadsController(IVideoService videoUploadService)
 {
     _videoUploadService = videoUploadService;
 }
Esempio n. 51
0
 public VideoController(IVideoService musicBll)
 {
     _videoBll = musicBll;
 }
Esempio n. 52
0
 public DownloadVideo(IVideoService service)
 {
     this.service = service;
 }