SyndicationFeed.Links Propiedad

Definición

Obtiene los vínculos asociados a la fuente.

public:
 property System::Collections::ObjectModel::Collection<System::ServiceModel::Syndication::SyndicationLink ^> ^ Links { System::Collections::ObjectModel::Collection<System::ServiceModel::Syndication::SyndicationLink ^> ^ get(); };
public System.Collections.ObjectModel.Collection<System.ServiceModel.Syndication.SyndicationLink> Links { get; }
member this.Links : System.Collections.ObjectModel.Collection<System.ServiceModel.Syndication.SyndicationLink>
Public ReadOnly Property Links As Collection(Of SyndicationLink)

Valor de propiedad

Una colección de objetos SyndicationLink.

Ejemplos

El código siguiente muestra cómo agregar un vínculo a la colección Links de una instancia SyndicationFeed.

SyndicationFeed feed = new SyndicationFeed("Feed Title", "Feed Description", new Uri("http://Feed/Alternate/Link"), "FeedID", DateTime.Now);
feed.Links.Add(new SyndicationLink(new Uri("http://server/link"), "alternate", "Link Title", "text/html", 1000));
Dim feed As New SyndicationFeed("Feed Title", "Feed Description", New Uri("http:'Feed/Alternate/Link"), "FeedID", DateTime.Now)
feed.Links.Add(New SyndicationLink(New Uri("http:'server/link"), "alternate", "Link Title", "text/html", 1000))

El siguiente XML muestra cómo se serializa la colección Links a Atom 1.0.

<link rel="alternate" type="text/html" title="Link Title" length="1000" href="http://contoso/link" />

El siguiente XML muestra cómo se serializa la colección Links a RSS 2.0.

<link rel="alternate" type="text/html" title="Link Title" length="1000" href="http://contoso/link" />

Comentarios

Cuando se serializa en Atom 1.0, la Links colección se escribe en varios <link> elementos.

Cuando se serializa en RSS 2.0, la Links colección se escribe en varios <a10:link> elementos.

Se aplica a