SyndicationItem.Contributors Property

Definition

Gets the contributors of the syndication item.

public System.Collections.ObjectModel.Collection<System.ServiceModel.Syndication.SyndicationPerson> Contributors { get; }

Property Value

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

Examples

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>

Remarks

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.

Applies to

Toode Versioonid
.NET 6 (package-provided), 7 (package-provided), 8 (package-provided), 9 (package-provided)
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)