This documentation is archived and is not being maintained.

SyndicationPerson Class

Represents an author or contributor of syndication content.

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

public class SyndicationPerson

SyndicationPerson objects can be added to the authors and contributors collections on SyndicationFeed and SyndicationItem objects.

When serialized to Atom 1.0, the SyndicationPerson is written out as an <author> or <contributor> element.

When serialized to RSS 2.0, a SyndicationPerson instance is written out as a <managingEditor>, <a10:author>, or <a10:contributor> element. How a SyndicationPerson is serialized depends on the number of SyndicationPerson objects added to a SyndicationFeed or SyndicationItem, which collection the SyndicationPerson instances are added to, and the value of the SerializeExtensionAsAtom parameter to the Rss20ItemFormatter(SyndicationItem, Boolean) constructor. If only one SyndicationPerson is added to the Authors (or Authors) collection, the SyndicationPerson is serialized to a <managingEditor> element. If more than one SyndicationPerson is added to the Authors (or Authors) collection and SerializeExtensionsAsAtom is set to true, all of the SyndicationPerson objects are serialized to <a10:author> elements. If SerializeExtensionsAsAtom is set to false, the SyndicationPerson instances is not serialized. Any SyndicationPerson instances added to the Contributors (or Contributors) collection are only serialized if SerializeExtensionsAsAtom is set to true, in which case they are serialized to <a10:contributor> elements.

The following code shows how to add a SyndicationPerson to the authors collection of a SyndicationFeed instance.

SyndicationFeed feed = new SyndicationFeed("Feed Title", "Feed Description", new Uri("http://Feed/Alternate/Link"), "FeedID", DateTime.Now);
SyndicationPerson sp = new SyndicationPerson("", "Jesper Aaberg", "http://Jesper/Aaberg");

The following XML shows how a SyndicationPerson is serialized to Atom 1.0.

  <name>Jesper Aaberg</name>
  <name>Lene Aalling</name>

The following XML shows how a SyndicationPerson is serialized to RSS 2.0.

  <a10:name>Lene Aalling</a10:name>
  <a10:name>Jesper Aaberg</a10:name>


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5