Share via


SyndicationLink Class

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Represents a link within a syndication feed or item.

Inheritance Hierarchy

System.Object
  System.ServiceModel.Syndication.SyndicationLink

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

Syntax

'Declaration
Public Class SyndicationLink
public class SyndicationLink

The SyndicationLink type exposes the following members.

Constructors

  Name Description
Public method SyndicationLink() Creates a new instance of the SyndicationLink instance.
Protected method SyndicationLink(SyndicationLink) Initializes a new instance of the SyndicationLink class with the specified instance.
Public method SyndicationLink(Uri) Initializes a new instance of the SyndicationLink class with the specified Uri.
Public method 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.

Top

Properties

  Name Description
Public property AttributeExtensions Gets the attribute extensions of the link.
Public property BaseUri Gets or sets the base URI of the syndication link.
Public property ElementExtensions Gets the element extensions for the SyndicationLink.
Public property Length Gets or sets the length of the linked resource in bytes.
Public property MediaType Gets or sets the media type of the linked resource.
Public property RelationshipType Gets or sets the relationship type of the linked resource.
Public property Title Gets or sets the title of the linked resource.
Public property Uri Gets or sets the URI for the linked resource.

Top

Methods

  Name Description
Public method Clone Creates a copy of the current SyndicationLink instance.
Public methodStatic member CreateAlternateLink(Uri) Creates a new SyndicationLink object with the specified Uri.
Public methodStatic member CreateAlternateLink(Uri, String) Creates a new SyndicationLink object with the specified Uri and media type.
Public methodStatic member CreateMediaEnclosureLink Creates a media enclosure link with the specified URI, media type, and length.
Public methodStatic member CreateSelfLink(Uri) Creates a new SyndicationLink with the specified URI and relationship type set to self.
Public methodStatic member CreateSelfLink(Uri, String) Creates a new SyndicationLink with the specified URI, media type, and relationship type set to self.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public method GetAbsoluteUri Gets the absolute URI for the SyndicationLink.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Protected method TryParseAttribute Attempts to parse an attribute extension.
Protected method TryParseElement Attempts to parse an element extension.
Protected method WriteAttributeExtensions Writes the attribute extensions to the specified XmlWriter using the specified syndication version.
Protected method WriteElementExtensions Writes the element extensions to the specified XmlWriter using the specified syndication version.

Top

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 is written out as a <link> element. Any additional links are written out as <a10:link> elements.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Thread Safety

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