SyndicationLink SyndicationLink SyndicationLink SyndicationLink Class

Definition

Represents a link within a syndication feed or item.

public ref class SyndicationLink
public class SyndicationLink
type SyndicationLink = class
Public Class SyndicationLink
Inheritance
SyndicationLinkSyndicationLinkSyndicationLinkSyndicationLink

Examples

The following example shows how to use the SyndicationLink class.

SyndicationFeed feed = new SyndicationFeed("Feed Title", "Feed Description", new Uri("http://Feed/Alternate/Link"), "FeedID", DateTime.Now);

SyndicationLink link = new SyndicationLink(new Uri("http://server/link"), "alternate", "Link Title", "text/html", 1000);
feed.Links.Add(link);
Dim feed As SyndicationFeed = New SyndicationFeed("Feed Title", "Feed Description", New Uri("http://Feed/Alternate/Link"), "FeedID", DateTime.Now)

Dim link As SyndicationLink = New SyndicationLink(New Uri("http://server/link"), "alternate", "Link Title", "text/html", 1000)
feed.Links.Add(link)

Remarks

SyndicationLink can be added to a SyndicationFeed or SyndicationItem. When serialized to Atom 1.0 a SyndicationLink is written out as a <link> element, with the SyndicationLink properties written out as attributes of the <link> element. When serialized to RSS 2.0, the first SyndicationLink with a relationship value of 'alternate' is written out as a <link> element. Any additional links are written out as a <a10:link> elements.

Constructors

SyndicationLink() SyndicationLink() SyndicationLink() SyndicationLink()

Creates a new instance of the SyndicationLink instance.

SyndicationLink(SyndicationLink) SyndicationLink(SyndicationLink) SyndicationLink(SyndicationLink) SyndicationLink(SyndicationLink)

Initializes a new instance of the SyndicationLink class with the specified instance.

SyndicationLink(Uri) SyndicationLink(Uri) SyndicationLink(Uri) SyndicationLink(Uri)

Initializes a new instance of the SyndicationLink class with the specified Uri.

SyndicationLink(Uri, String, String, String, Int64) SyndicationLink(Uri, String, String, String, Int64) SyndicationLink(Uri, String, String, String, Int64) SyndicationLink(Uri, String, String, String, Int64)

Initializes a new instance of the SyndicationLink class with the specified Uri, relation type, title, media type, and length.

Properties

AttributeExtensions AttributeExtensions AttributeExtensions AttributeExtensions

Gets the attribute extensions of the link.

BaseUri BaseUri BaseUri BaseUri

Gets or sets the base URI of the syndication link.

ElementExtensions ElementExtensions ElementExtensions ElementExtensions

Gets the element extensions for the SyndicationLink.

Length Length Length Length

Gets or sets the length of the linked resource in bytes.

MediaType MediaType MediaType MediaType

Gets or sets the media type of the linked resource.

RelationshipType RelationshipType RelationshipType RelationshipType

Gets or sets the relationship type of the linked resource.

Title Title Title Title

Gets or sets the title of the linked resource.

Uri Uri Uri Uri

Gets or sets the URI for the linked resource.

Methods

Clone() Clone() Clone() Clone()

Creates a copy of the current SyndicationLink instance.

CreateAlternateLink(Uri) CreateAlternateLink(Uri) CreateAlternateLink(Uri) CreateAlternateLink(Uri)

Creates a new SyndicationLink object with the specified Uri.

CreateAlternateLink(Uri, String) CreateAlternateLink(Uri, String) CreateAlternateLink(Uri, String) CreateAlternateLink(Uri, String)

Creates a new SyndicationLink object with the specified Uri and media type.

CreateMediaEnclosureLink(Uri, String, Int64) CreateMediaEnclosureLink(Uri, String, Int64) CreateMediaEnclosureLink(Uri, String, Int64) CreateMediaEnclosureLink(Uri, String, Int64)

Creates a media enclosure link with the specified URI, media type, and length.

CreateSelfLink(Uri) CreateSelfLink(Uri) CreateSelfLink(Uri) CreateSelfLink(Uri)

Creates a new SyndicationLink with the specified URI and relationship type set to self.

CreateSelfLink(Uri, String) CreateSelfLink(Uri, String) CreateSelfLink(Uri, String) CreateSelfLink(Uri, String)

Creates a new SyndicationLink with the specified URI, media type, and relationship type set to self.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetAbsoluteUri() GetAbsoluteUri() GetAbsoluteUri() GetAbsoluteUri()

Gets the absolute URI for the SyndicationLink.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)
TryParseAttribute(String, String, String, String) TryParseAttribute(String, String, String, String) TryParseAttribute(String, String, String, String) TryParseAttribute(String, String, String, String)

Attempts to parse an attribute extension.

TryParseElement(XmlReader, String) TryParseElement(XmlReader, String) TryParseElement(XmlReader, String) TryParseElement(XmlReader, String)

Attempts to parse an element extension.

WriteAttributeExtensions(XmlWriter, String) WriteAttributeExtensions(XmlWriter, String) WriteAttributeExtensions(XmlWriter, String) WriteAttributeExtensions(XmlWriter, String)

Writes the attribute extensions to the specified XmlWriter using the specified syndication version.

WriteElementExtensions(XmlWriter, String) WriteElementExtensions(XmlWriter, String) WriteElementExtensions(XmlWriter, String) WriteElementExtensions(XmlWriter, String)

Writes the element extensions to the specified XmlWriter using the specified syndication version.

Applies to