This topic has not yet been rated - Rate this topic

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

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

Namespace:  System.ServiceModel.Syndication
Assembly:  System.ServiceModel (in System.ServiceModel.dll)
public SyndicationLink(
	Uri uri,
	string relationshipType,
	string title,
	string mediaType,
	long length
)

Parameters

uri
Type: System.Uri
The URI to the linked resource.
relationshipType
Type: System.String
The relationship type.
title
Type: System.String
The title of the link.
mediaType
Type: System.String
The media type of the link.
length
Type: System.Int64
The length of the linked content.

Well-known relationship types include:

  • alternate - The link identifies an alternate version of the resource described by the containing Feed or Item.

  • related - The link identifies a resource related to the containing Feed or Item.

  • self - The link identifies a resource equivalent to the containing Feed or Item.

  • enclosure - The link identifies a related resource that is potentially large in size and might require special handling. This link relation is often used when podcasts or audio files are distributed in a Feed.

  • via - The link identifies a resource that is the source of the information provided in the containing Feed or Item.

The following example shows how to call this constructor.


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

Supported in: 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ