// -------------------------------------------------------------------------------
        // -------------------------------------------------------------------------------
        /// <summary>
        /// Adds a creator to the item
        /// </summary>
        /// <param name="item_creator"></param>
        // -------------------------------------------------------------------------------
        // -------------------------------------------------------------------------------
        public void AddCreator(string item_creator)
        {
            RssDublinCoreCreator obj = new RssDublinCoreCreator();

            obj.creator = item_creator;
            AddCreator(obj);
        }
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
 /// <summary>
 /// Adds a creator to the item
 /// </summary>
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
 public void AddCreator(RssDublinCoreCreator dcCreator)
 {
     creators.Add(dcCreator);
 }
Esempio n. 3
0
        // -------------------------------------------------------------------------------
        // -------------------------------------------------------------------------------
        /// <summary>
        /// Loads the RssItem object from the XElement
        /// </summary>
        /// <param name="el">Current Element</param>
        private new void LoadEl(XElement el)
        {
            // if the el is a core element, load from the base
            if (el.Name.Namespace == XNamespace.None)
            {
                base.LoadEl(el);
            }

            // if the el is in the media namespace or the dublin core terms namespace, load what we know.
            else if (el.Name.Namespace == RSS.MEDIA_NS || el.Name.Namespace == RSS.DUBLIN_CORE_TERMS_NS)
            {
                switch (el.Name.LocalName)
                {
                case RssMediaGroup.TAG_PARENT:
                    RssMediaGroup mediaGroup = new RssMediaGroup(this);
                    mediaGroup.Load(el);
                    mediaGroups.Add(mediaGroup);
                    break;


                case RssMediaContent.TAG_PARENT:
                    RssMediaContent mediaContent = new RssMediaContent(this);
                    mediaContent.Load(el);
                    mediaContentItems.Add(mediaContent);
                    break;


                default:
                    mediaOptions.LoadEl(el);
                    break;
                }
            }

            // if the element is in the DublinCoreNS, load what we know
            else if (el.Name.Namespace == RSS.DUBLIN_CORE_NS)
            {
                switch (el.Name.LocalName)
                {
                case RssDublinCoreCreator.TAG_PARENT:
                    RssDublinCoreCreator creator = new RssDublinCoreCreator();
                    creator.Load(el);
                    creators.Add(creator);
                    break;
                }
            }

            // is the element in the Content Namespace, if so, process it
            else if (el.Name.Namespace == RSS.CONTENT_NS)
            {
                switch (el.Name.LocalName)
                {
                case RssContentEncoded.TAG_PARENT:
                    ContentEncoded = new RssContentEncoded();
                    ContentEncoded.Load(el);
                    break;
                }
            }

            else if (el.Name.Namespace == RSS.SLASH_NS)
            {
                switch (el.Name.LocalName)
                {
                case RssSlashComments.TAG_PARENT:
                    SlashComments = new RssSlashComments();
                    SlashComments.Load(el);
                    break;
                }
            }

            else if (el.Name.Namespace == RSS.CREATIVE_COMMONS_NS)
            {
                switch (el.Name.LocalName)
                {
                case RssCreativeCommonsLicense.TAG_PARENT:
                    CreativeCommonsLicense = new RssCreativeCommonsLicense();
                    CreativeCommonsLicense.Load(el);
                    break;
                }
            }
        }