SyndicationLink SyndicationLink SyndicationLink SyndicationLink Constructors

Definition

Overloads

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)

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)

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

Creates a new instance of the SyndicationLink instance.

public:
 SyndicationLink();
public SyndicationLink ();
Public Sub New ()

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

protected:
 SyndicationLink(System::ServiceModel::Syndication::SyndicationLink ^ source);
protected SyndicationLink (System.ServiceModel.Syndication.SyndicationLink source);
new System.ServiceModel.Syndication.SyndicationLink : System.ServiceModel.Syndication.SyndicationLink -> System.ServiceModel.Syndication.SyndicationLink
Protected Sub New (source As SyndicationLink)

Parameters

source
SyndicationLink SyndicationLink SyndicationLink SyndicationLink

The SyndicationLink instance used to initialize the new instance.

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

public:
 SyndicationLink(Uri ^ uri);
public SyndicationLink (Uri uri);
new System.ServiceModel.Syndication.SyndicationLink : Uri -> System.ServiceModel.Syndication.SyndicationLink

Parameters

uri
Uri Uri Uri Uri

The URI to the linked resource.

Examples

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"));
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"))
feed.Links.Add(link)

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

public:
 SyndicationLink(Uri ^ uri, System::String ^ relationshipType, System::String ^ title, System::String ^ mediaType, long length);
public SyndicationLink (Uri uri, string relationshipType, string title, string mediaType, long length);
new System.ServiceModel.Syndication.SyndicationLink : Uri * string * string * string * int64 -> System.ServiceModel.Syndication.SyndicationLink

Parameters

uri
Uri Uri Uri Uri

The URI to the linked resource.

relationshipType
String String String String

The relationship type.

title
String String String String

The title of the link.

mediaType
String String String String

The media type of the link.

length
Int64 Int64 Int64 Int64

The length of the linked content.

Examples

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

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.

Applies to