private VideoFeed(string type, string sessionMediaType, string mediaType, string mediaFileExtension) { if (string.IsNullOrEmpty(type)) { throw new ArgumentException("Parameter type is required"); } if (string.IsNullOrEmpty(sessionMediaType)) { throw new ArgumentException("Parameter sessionMediaType is required"); } if (string.IsNullOrEmpty(mediaType)) { throw new ArgumentException("Parameter mediaType is required"); } if (string.IsNullOrEmpty(mediaFileExtension)) { throw new ArgumentException("Parameter mediaFileExtension is required"); } Type = type; SessionMediaType = sessionMediaType; MediaType = mediaType; MediaFileExtension = mediaFileExtension; if (VideoFeeds == null) { VideoFeeds = new List <VideoFeed>(); } VideoFeeds.Add(this); }
// Gets the list of devices and prints them to the console. void Start() { if (videoFeedsObject == null) { //Debug.LogError(gameObject.name + ": No Video Feeds Object was set!"); } else { //Debug.Log("Video Feeds Object was set to " + videoFeedsObject.name); if (!videoFeedsObject.GetComponent <VideoFeeds>()) { //Debug.Log(videoFeedsObject.name + " does not contain the VideoFeeds script! " + videoFeedsObject.GetComponent<VideoFeeds>()); } else { videoFeeds = videoFeedsObject.GetComponent <VideoFeeds>(); // Sets a shortcut for videoFeedsObject's VideoFeed script videoFeedsCount = videoFeeds.GetVideoFeedsCount(); // Debug.Log("VideoFeedsCount is " + videoFeedsCount); } } canvas = GetComponent <Renderer>(); }
//update public static async Task <List <VideoFeeds> > UpdateVideo(VideoFeeds video) { using (VideoRepository rep = new VideoRepository()) { var response = await rep.UpdateVideo(video); return(response); } }
public async Task <IActionResult> videos(int?type, int?page, int?rt) { int tp = 0; // Tags Type: // ........... 0: Most Viewed // ........... 1: Top Rated // ........... 2: Recently Added if (type != null) { tp = (int)type; } int pagenumber = 1; if (page != null) { pagenumber = (int)page; } string sXml = ""; int responsetype = 0; // 0: google, 1: bing if (rt != null) { responsetype = (int)rt; } switch (responsetype) { case 0: sXml = await VideoFeeds.generateGoogleSitemap(_context, new VideoEntity() { type = (MediaType)tp, pagenumber = pagenumber, pagesize = 50000, order = "video.created_at desc" }); break; case 1: sXml = await VideoFeeds.GenerateBingSitemap(_context, new VideoEntity() { type = (MediaType)tp, pagenumber = pagenumber, pagesize = 50000, order = "video.created_at desc" }); break; } return(this.Content(sXml, "text/xml")); }
public async Task <IActionResult> rss() { string sXml = await VideoFeeds.generateRSS(_context, new VideoEntity() { type = MediaType.Videos, pagenumber = 1, ispublic = true, order = "video.created_at desc", pagesize = 10 }); return(this.Content(sXml, "text/xml")); }
public async Task <List <VideoFeeds> > UpdateVideo(VideoFeeds video) { var obj = await base.PutAsync <VideoFeeds, List <VideoFeeds> >(video, "UpdateVideo", "Video"); return(obj); }
public async Task <List <VideoFeeds> > CreateVideo(VideoFeeds Video) { var obj = await base.PostAsync <VideoFeeds, List <VideoFeeds> >(Video, "AddVideo", "Video"); return(obj); }