// ------------------------------------------------------------------------------- // ------------------------------------------------------------------------------- /// <summary> /// adds an atom link /// </summary> /// <param name="href">link of this feed</param> /// <param name="rel">relationship (ie self)</param> /// <param name="mimetype">mime type (application/rss+xml)</param> /// <param name="title">title (channel title)</param> /// <param name="hreflang">language</param> /// <param name="length">length</param> // ------------------------------------------------------------------------------- // ------------------------------------------------------------------------------- public void AddAtomLink(string href, string rel, string mimetype, string title, string hreflang = "", int length = 0) { RssAtomLink lnk = new RssAtomLink(); lnk.href = href; lnk.rel = rel; lnk.type = mimetype; lnk.title = title; lnk.hreflang = hreflang; lnk.length = length; AddAtomLink(lnk); }
// ------------------------------------------------------------------------------- // ------------------------------------------------------------------------------- /// <summary> /// Loads the RssChannel object properties with the contents of the parent XElement /// </summary> /// <param name="el"></param> // ------------------------------------------------------------------------------- // ------------------------------------------------------------------------------- public new void LoadEl(XElement parEl) { if (parEl.Name.Namespace == XNamespace.None) { base.LoadEl(parEl); } else if (parEl.Name.Namespace == RSS.ATOM_NS) { switch (parEl.Name.LocalName) { case RssAtomLink.TAG_PARENT: RssAtomLink AtomLink = new RssAtomLink(); AtomLink.Load(parEl); AtomLinks.Add(AtomLink); break; } } else if (parEl.Name.Namespace == RSS.CREATIVE_COMMONS_NS) { switch (parEl.Name.LocalName) { case RssCreativeCommonsLicense.TAG_PARENT: CreativeCommonsLicense = new RssCreativeCommonsLicense(); CreativeCommonsLicense.Load(parEl); break; } } else if (parEl.Name.Namespace == RSS.MEDIA_NS || parEl.Name.Namespace == RSS.DUBLIN_CORE_TERMS_NS || parEl.Name.Namespace == RSS.GEORSS_NS || parEl.Name.Namespace == RSS.GML_NS) { mediaOptions.LoadEl(parEl); } }
// ------------------------------------------------------------------------------- // ------------------------------------------------------------------------------- /// <summary> /// Adds an atom link object to the feed /// </summary> /// <param name="lnk">Atom Link object</param> // ------------------------------------------------------------------------------- // ------------------------------------------------------------------------------- public void AddAtomLink(RssAtomLink lnk) { AtomLink = lnk; }
// ------------------------------------------------------------------------------- // ------------------------------------------------------------------------------- /// <summary> /// Adds an atom link object to the feed /// </summary> /// <param name="atomLink"></param> // ------------------------------------------------------------------------------- // ------------------------------------------------------------------------------- public void AddAtomLink(RssAtomLink atomLink) { AtomLinks.Add(atomLink); }