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)

속성 값

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

다음 XML에서는 Links 컬렉션이 Atom 1.0으로 serialize되는 방법을 보여 줍니다.

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

다음 XML에서는 Links 컬렉션이 RSS 2.0으로 serialize되는 방법을 보여 줍니다.

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

설명

Atom 1.0 Links 으로 serialize되면 컬렉션이 여러 <link> 요소에 기록됩니다.

RSS 2.0 Links 으로 직렬화하면 컬렉션이 여러 <a10:link> 요소에 기록됩니다.

적용 대상