SyndicationItem.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 인스턴스의 SyndicationItem 컬렉션에 링크를 추가하는 방법을 보여 줍니다.

SyndicationItem item = new SyndicationItem("Item Title", "Item Content", new Uri("http://Item/Alternate/Link"));
item.Links.Add(new SyndicationLink(new Uri("http://server/link"), "alternate", "Link Title", "text/html", 1000));
Dim item As New SyndicationItem("Item Title", "Item Content", New Uri("http:' Item/Alternate/Link"))
item.Links.Add(New SyndicationLink(New Uri("http:' server/link"), "alternate", "Link Title", "text/html", 1000))

다음 XML에서는 이 속성이 Atom 1.0으로 serialize되는 방법을 보여 있습니다.

<link rel="alternate" href="http://someserver/MyItem" />
<link rel="alternate" type="text/html" title="Alternate Link" length="1000" href="http://alternate/Link" />
<entry p2:itemAttrib="ItemAttribValue" xmlns:p2="http://FeedServer/tags">
  <title type="text">My Item</title>

  <summary type="text">this is a summary for my item</summary>

  <author>
    <name>Jesper Aaberg</name>
    <uri>http://contoso/jesper</uri>
    <email>jesper@contoso.com</email>
  </author>

다음 XML에서는 이 속성이 RSS 2.0으로 serialize되는 방법을 보여 줍니다.

<link>http://someserver/MyItem</link>
<link>http://alternate/Link</link>

설명

Atom 1.0 <link> 으로 serialize되면 컬렉션의 각 SyndicationLink 요소에 대해 요소가 기록됩니다. RSS 2.0 <a10:link> 으로 직렬화되면 컬렉션의 각 SyndicationLink 요소에 대해 요소가 기록됩니다.

적용 대상