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

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

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

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

<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 にシリアル化すると、コレクションに 1 つだけ SyndicationPerson 存在する場合は、要素に <managingEditor> 書き込まれます。 それ以外の場合、それぞれが SyndicationPerson 要素に <a10:author> 書き込まれます。

適用対象