Freigeben über


SyndicationItem.Authors Eigenschaft

Definition

Ruft die Autoren des Veröffentlichungselements 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

Eine Auflistung von SyndicationPerson Objekten, die die Autoren des Veröffentlichungselements darstellen.

Beispiele

Der folgende Code zeigt, wie Sie der Authors Auflistung einer .SyndicationItem

SyndicationItem item = new SyndicationItem("Item Title", "Item Content", new Uri("http://Item/Alternate/Link"));
item.Authors.Add(new SyndicationPerson("jesper@contoso.com", "Jesper Aaberg", "http://contoso/jesper"));
Dim item As New SyndicationItem("Item Title", "Item Content", New Uri("http:' Item/Alternate/Link"))
item.Authors.Add(New SyndicationPerson("jesper@contoso.com", "Jesper Aaberg", "http:' contoso/jesper"))

Der folgende XML-Code zeigt, wie der vorstehende SyndicationItem code in Atom 1.0 serialisiert wird.

<entry>
  <id>Item ID</id>
  <title type="text">My Item</title>
  <updated>2007-03-16T23:00:59Z</updated>
  <author>
    <name>Lene Aaling</name>
    <uri>http://contoso/Lene</uri>
    <email>lene@contoso.com</email>
  </author>
  <link rel="alternate" href="http://someserver/MyItem" />
  <link rel="alternate" type="text/html" title="Alternate Link" length="1000" href="http://otherserver/Item" />
  <content type="text">This is some content</content>
</entry>

Der folgende XML-Code zeigt, wie der vorherige SyndicationItem code in RSS 2.0 serialisiert wird.

<item>
  <guid isPermaLink="false">Item ID</guid>
  <link>http://someserver/MyItem</link>
  <author>someone@mycompany.com</author>
  <title>My Item</title>
  <description>This is some content</description>
  <a10:link rel="alternate" type="text/html" title="Alternate Link" length="1000" href="http://otherserver/Item" />
  <a10:updated>2007-03-16T23:00:59Z</a10:updated>
</item>

Hinweise

Beim Serialisieren auf Atom 1.0 wird für jedes SyndicationPerson Element in der Authors Auflistung ein <author> Element geschrieben.

Beim Serialisieren auf RSS 2.0. Ein <managingEditor> Element wird geschrieben, wenn die Authors Auflistung nur über ein SyndicationPersonElement verfügt, andernfalls wird für jedes SyndicationPerson Element in der Authors Auflistung ein <a10:author> Element geschrieben.

Gilt für: