SyndicationFeed.Authors 속성

정의

피드 작성자 컬렉션을 가져옵니다.

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

속성 값

Collection<SyndicationPerson>

피드 작성자를 나타내는 SyndicationPerson 개체 컬렉션입니다.

예제

다음 코드에서는 AuthorsSyndicationFeed 컬렉션에 작성자를 추가하는 방법을 보여 줍니다.

SyndicationFeed feed = new SyndicationFeed("Feed Title", "Feed Description", new Uri("http://Feed/Alternate/Link"), "FeedID", DateTime.Now);
feed.Authors.Add(new SyndicationPerson("jesper@contoso.com", "Jesper Aaberg", "http://contoso/jesper"));
Dim feed As New SyndicationFeed("Feed Title", "Feed Description", New Uri("http:'Feed/Alternate/Link"), "FeedID", DateTime.Now)
feed.Authors.Add(New SyndicationPerson("jesper@contoso.com", "Jesper Aaberg", "http:'contoso/jesper"))

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

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

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

<a10:author>
  <a10:name>Lene Aalling</a10:name>
  <a10:uri>http://contoso/Aalling</a10:uri>
  <a10:email>Lene.Aalling@contoso.com</a10:email>
</a10:author>

설명

Atom 1.0으로 직렬화되면 컬렉션의 각 SyndicationPerson 항목이 요소에 <author> 기록됩니다. RSS 2.0으로 직렬화된 경우 컬렉션에 단일 SyndicationPerson 항목만 있으면 요소에 <managingEditor> 기록됩니다. 그렇지 않으면 각 SyndicationPerson 요소가 요소에 <a10:author> 기록됩니다.

적용 대상