SyndicationItem.Contributors Property

 

Gets the contributors of the syndication item.

Namespace:   System.ServiceModel.Syndication
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public Collection<SyndicationPerson> Contributors { get; }

Property Value

Type: System.Collections.ObjectModel.Collection<SyndicationPerson>

A collection of SyndicationPerson objects that represent the contributors of the syndication item.

When serialized to Atom 1.0, a <contributor> element is created for each SyndicationPerson in the Contributors collection.

When serialized to RSS 2.0, a <a10:contributor> element is created for each SyndicationPerson in the Contributors collection.

The following code shows how to add a contributor to a 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"));

The following XML shows how this property is serialized to Atom 1.0.

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

The following XML shows how this property is serialized to 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>

.NET Framework
Available since 3.5
Silverlight
Available since 2.0
Return to top
Show: