SyndicationFeed.Links プロパティ

定義

フィードに関連付けられたリンクを取得します。

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)

プロパティ値

SyndicationLink オブジェクトのコレクション。

Links インスタンスの 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))

Links コレクションを Atom 1.0 にシリアル化する方法を次の XML に示します。

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

Links コレクションを RSS 2.0 にシリアル化する方法を次の XML に示します。

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

注釈

Atom 1.0 にシリアル化すると、 Links コレクションは多数の <link> 要素に書き込まれます。

RSS 2.0 にシリアル化すると、 Links コレクションは多数の <a10:link> 要素に書き込まれます。

適用対象