SyndicationFeed.Authors Eigenschaft

Definition

Ruft eine Auflistung von Feed-Autoren ab.

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)

Eigenschaftswert

Collection<SyndicationPerson>

Eine Sammlung von SyndicationPerson-Objekten, die für die Feed-Autoren stehen.

Beispiele

Im folgenden Code wird gezeigt, wie der Authors-Auflistung eines SyndicationFeed ein Autor hinzugefügt wird.

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

Das folgende XML-Beispiel zeigt die Serialisierung der Authors-Sammlung zu Atom 1.0.

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

Das folgende XML-Beispiel zeigt die Serialisierung der Authors-Sammlung zu RSS 2.0.

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

Hinweise

Wenn sie in Atom 1.0 serialisiert werden, wird jede SyndicationPerson in der Auflistung in ein <author> Element geschrieben. Wenn in RSS 2.0 serialisiert wird, wenn nur eine einzelne SyndicationPerson in der Auflistung vorhanden ist, wird sie in ein <managingEditor> Element geschrieben. Andernfalls wird jeder SyndicationPerson in ein <a10:author> Element geschrieben.

Gilt für