SyndicationLink Class

 

Represents a link within a syndication feed or item.

Namespace:   System.ServiceModel.Syndication
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

System.Object
  System.ServiceModel.Syndication.SyndicationLink

public class SyndicationLink

NameDescription
System_CAPS_pubmethodSyndicationLink()

Creates a new instance of the SyndicationLink instance.

System_CAPS_protmethodSyndicationLink(SyndicationLink)

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

System_CAPS_pubmethodSyndicationLink(Uri)

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

System_CAPS_pubmethodSyndicationLink(Uri, String, String, String, Int64)

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

NameDescription
System_CAPS_pubpropertyAttributeExtensions

Gets the attribute extensions of the link.

System_CAPS_pubpropertyBaseUri

Gets and sets the base URI of the syndication link.

System_CAPS_pubpropertyElementExtensions

Gets the element extensions for the SyndicationLink.

System_CAPS_pubpropertyLength

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

System_CAPS_pubpropertyMediaType

Gets and sets the media type of the linked resource.

System_CAPS_pubpropertyRelationshipType

Gets and sets the relationship type of the linked resource.

System_CAPS_pubpropertyTitle

Gets and sets the title of the linked resource.

System_CAPS_pubpropertyUri

Gets and sets the URI for the linked resource.

NameDescription
System_CAPS_pubmethodClone()

Creates a copy of the current SyndicationLink instance.

System_CAPS_pubmethodSystem_CAPS_staticCreateAlternateLink(Uri)

Creates a new SyndicationLink object with the specified Uri.

System_CAPS_pubmethodSystem_CAPS_staticCreateAlternateLink(Uri, String)

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

System_CAPS_pubmethodSystem_CAPS_staticCreateMediaEnclosureLink(Uri, String, Int64)

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

System_CAPS_pubmethodSystem_CAPS_staticCreateSelfLink(Uri)

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

System_CAPS_pubmethodSystem_CAPS_staticCreateSelfLink(Uri, String)

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

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetAbsoluteUri()

Gets the absolute URI for the SyndicationLink.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_protmethodTryParseAttribute(String, String, String, String)

Attempts to parse an attribute extension.

System_CAPS_protmethodTryParseElement(XmlReader, String)

Attempts to parse an element extension.

System_CAPS_protmethodWriteAttributeExtensions(XmlWriter, String)

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

System_CAPS_protmethodWriteElementExtensions(XmlWriter, String)

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

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.

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);

.NET Framework
Available since 3.5
Silverlight
Available since 2.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: