Export (0) Print
Expand All

SyndicationFeed.Contributors Property

Gets a collection of the contributors to the feed.

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 represents the contributors to the feed.

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

When serialized to RSS 2.0, each SyndicationPerson in the collection is written to an <a10:contributor> element.

The following code shows how to add a contributor to the Contributors collection of a SyndicationFeed.

SyndicationFeed feed = new SyndicationFeed("Feed Title", "Feed Description", new Uri("http://Feed/Alternate/Link"), "FeedID", DateTime.Now);
feed.Contributors.Add(new SyndicationPerson("jesper@contoso.com", "Jesper Aaberg", "http://contoso/jesper"));

The following XML shows how the Contributors collection is serialized to Atom 1.0.

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

The following XML shows how the Contributors collection is serialized to RSS 2.0.

<a10:contributor>
  <a10:name>Lene Aalling</a10:name>
  <a10:uri>http://contoso/Aalling</a10:uri>
  <a10:email>Lene.Aalling@contoso.com</a10:email>
</a10:contributor>

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft