// ------------------------------------------------------------------------------- // ------------------------------------------------------------------------------- /// <summary> /// Adds a media keyword to the item /// </summary> /// <param name="keyword">key word</param> // ------------------------------------------------------------------------------- // ------------------------------------------------------------------------------- public void AddMediaKeyword(string keyword) { if (MediaKeywords == null) { MediaKeywords = new RssMediaKeywords(); } MediaKeywords.Add(keyword); }
// ------------------------------------------------------------------------------- // ------------------------------------------------------------------------------- /// <summary> /// Adds a media keyword object /// </summary> /// <param name="obj"></param> // ------------------------------------------------------------------------------- // ------------------------------------------------------------------------------- public void AddMediaKeywords(RssMediaKeywords obj) { mediaOptions.AddMediaKeywords(obj); }
// ------------------------------------------------------------------------------- // ------------------------------------------------------------------------------- /// <summary> /// Adds a media keyword object /// </summary> /// <param name="obj">RssMediaKeywords object</param> // ------------------------------------------------------------------------------- // ------------------------------------------------------------------------------- public void AddMediaKeywords(RssMediaKeywords obj) { MediaKeywords = obj; }
// ------------------------------------------------------------------------------- // ------------------------------------------------------------------------------- /// <summary> /// This loads property of the RssMediaExtension object with the contents of the /// XElement /// </summary> /// <param name="el">Parent XElement</param> // ------------------------------------------------------------------------------- // ------------------------------------------------------------------------------- public void LoadEl(XElement el) { // process this switch only if element is in the media namespace if (el.Name.Namespace == RSS.MEDIA_NS) { switch (el.Name.LocalName) { case RssMediaRating.TAG_PARENT: RssMediaRating rating = new RssMediaRating(); rating.Load(el); MediaRatings.Add(rating); break; case RssMediaTitle.TAG_PARENT: MediaTitle = new RssMediaTitle(); MediaTitle.Load(el); break; case RssMediaDescription.TAG_PARENT: MediaDescription = new RssMediaDescription(); MediaDescription.Load(el); break; case RssMediaKeywords.TAG_PARENT: MediaKeywords = new RssMediaKeywords(); MediaKeywords.Load(el); break; case RssMediaThumbnail.TAG_PARENT: RssMediaThumbnail thumb = new RssMediaThumbnail(this); thumb.Load(el); MediaThumbnails.Add(thumb); break; case RssMediaCategory.TAG_PARENT: RssMediaCategory MediaCategory = new RssMediaCategory(); MediaCategory.Load(el); MediaCategories.Add(MediaCategory); break; case RssMediaHash.TAG_PARENT: RssMediaHash hash = new RssMediaHash(); hash.Load(el); MediaHashes.Add(hash); break; case RssMediaPlayer.TAG_PARENT: MediaPlayer = new RssMediaPlayer(); MediaPlayer.Load(el); break; case RssMediaCredit.TAG_PARENT: RssMediaCredit credit = new RssMediaCredit(); credit.Load(el); MediaCredits.Add(credit); break; case RssMediaCopyright.TAG_PARENT: MediaCopyright = new RssMediaCopyright(); MediaCopyright.Load(el); break; case RssMediaText.TAG_PARENT: RssMediaText txt = new RssMediaText(); txt.Load(el); MediaTexts.Add(txt); break; case RssMediaRestriction.TAG_PARENT: RssMediaRestriction restriction = new RssMediaRestriction(); restriction.Load(el); MediaRestrictions.Add(restriction); break; case RssMediaCommunity.TAG_PARENT: MediaCommunity = new RssMediaCommunity(); MediaCommunity.Load(el); break; case RssMediaComments.TAG_PARENT: MediaComments = new RssMediaComments(); MediaComments.Load(el); break; case RssMediaEmbed.TAG_PARENT: MediaEmbed = new RssMediaEmbed(); MediaEmbed.Load(el); break; case RssMediaResponses.TAG_PARENT: MediaResponses = new RssMediaResponses(); MediaResponses.Load(el); break; case RssMediaBacklinks.TAG_PARENT: MediaBacklinks = new RssMediaBacklinks(); MediaBacklinks.Load(el); break; case RssMediaStatus.TAG_PARENT: MediaStatus = new RssMediaStatus(); MediaStatus.Load(el); break; case RssMediaPrice.TAG_PARENT: RssMediaPrice price = new RssMediaPrice(); price.Load(el); MediaPrices.Add(price); break; case RssMediaLicense.TAG_PARENT: MediaLicense = new RssMediaLicense(); MediaLicense.Load(el); break; case RssMediaSubtitle.TAG_PARENT: RssMediaSubtitle subtitle = new RssMediaSubtitle(); subtitle.Load(el); MediaSubtitles.Add(subtitle); break; case RssMediaPeerLink.TAG_PARENT: MediaPeerLink = new RssMediaPeerLink(); MediaPeerLink.Load(el); break; case RssMediaRights.TAG_PARENT: MediaRights = new RssMediaRights(); MediaRights.Load(el); break; case RssMediaScenes.TAG_PARENT: MediaScenes = new RssMediaScenes(); MediaScenes.Load(el); break; case RssMediaLocation.TAG_PARENT: RssMediaLocation mediaLocation = new RssMediaLocation(); mediaLocation.Load(el); MediaLocations.Add(mediaLocation); break; } } // Dublin core terms namespace else if (el.Name.Namespace == RSS.DUBLIN_CORE_TERMS_NS) { switch (el.Name.LocalName) { case RssDublinCoreValid.TAG_PARENT: MediaValid = new RssDublinCoreValid(); MediaValid.Load(el); break; } } else if (el.Name.Namespace == RSS.GEORSS_NS) { } else if (el.Name.Namespace == RSS.GML_NS) { } }