SyndicationItem.Contributors Egenskap

Definition

Hämtar syndikeringsobjektets deltagare.

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

Egenskapsvärde

En samling SyndicationPerson objekt som representerar syndikeringsobjektets deltagare.

Exempel

Följande kod visar hur du lägger till en deltagare i en SyndicationItem.

SyndicationItem item = new SyndicationItem("Item Title", "Item Content", new Uri("http://Item/Alternate/Link"));
item.Contributors.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.Contributors.Add(New SyndicationPerson("jesper@contoso.com", "Jesper Aaberg", "http:' contoso/jesper"))

Följande XML visar hur den här egenskapen serialiseras till Atom 1.0.

<contributor>
  <name>Lene Aaling</name>
  <uri>http://lene/aaling</uri>
  <email>lene@contoso.com</email>
</contributor>

Följande XML visar hur den här egenskapen serialiseras till RSS 2.0.

<a10:contributor>
  <a10:name>Jesper Aaberg</a10:name>
  <a10:uri>http://Jesper/Aaberg</a10:uri>
  <a10:email>Jesper@company.com</a10:email>
</a10:contributor>

Kommentarer

När du serialiseras till Atom 1.0 skapas ett element för var och <contributor> en SyndicationPerson i Contributors samlingen.

När serialiseras till RSS 2.0 skapas ett element för var och <a10:contributor> en SyndicationPerson i Contributors samlingen.

Gäller för