SyndicationLink Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the SyndicationLink class.
Overloads
SyndicationLink() |
Creates a new instance of the SyndicationLink instance. |
SyndicationLink(SyndicationLink) |
Initializes a new instance of the SyndicationLink class with the specified instance. |
SyndicationLink(Uri) |
Initializes a new instance of the SyndicationLink class with the specified Uri. |
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. |
SyndicationLink()
- Source:
- SyndicationLink.cs
- Source:
- SyndicationLink.cs
- Source:
- SyndicationLink.cs
Creates a new instance of the SyndicationLink instance.
public:
SyndicationLink();
public SyndicationLink ();
Public Sub New ()
Applies to
SyndicationLink(SyndicationLink)
- Source:
- SyndicationLink.cs
- Source:
- SyndicationLink.cs
- Source:
- SyndicationLink.cs
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
The SyndicationLink instance used to initialize the new instance.
Applies to
SyndicationLink(Uri)
- Source:
- SyndicationLink.cs
- Source:
- SyndicationLink.cs
- Source:
- SyndicationLink.cs
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
Public Sub New (uri As Uri)
Parameters
- 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)
Applies to
SyndicationLink(Uri, String, String, String, Int64)
- Source:
- SyndicationLink.cs
- Source:
- SyndicationLink.cs
- Source:
- SyndicationLink.cs
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
Public Sub New (uri As Uri, relationshipType As String, title As String, mediaType As String, length As Long)
Parameters
- uri
- Uri
The URI to the linked resource.
- relationshipType
- String
The relationship type.
- title
- String
The title of the link.
- mediaType
- String
The media type of the link.
- length
- 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
.NET