Export (0) Print
Expand All

SyndicationPerson Class

Represents an author or contributor of syndication content.

System::Object
  System.ServiceModel.Syndication::SyndicationPerson

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

public ref class SyndicationPerson

The SyndicationPerson type exposes the following members.

  NameDescription
Public methodSyndicationPerson()Initializes a new SyndicationPerson instance.
Public methodSyndicationPerson(String)Initializes a new SyndicationPerson instance with the specified e-mail address.
Protected methodSyndicationPerson(SyndicationPerson)Initializes a new instance of the SyndicationPerson class with the specified instance.
Public methodSyndicationPerson(String, String, String)Initializes a new SyndicationPerson instance with the specified e-mail address, name, and Uniform Resource Identifier (URI).
Top

  NameDescription
Public propertyAttributeExtensionsGets the attribute extensions for the SyndicationPerson.
Public propertyElementExtensionsGets the element extensions for the SyndicationPerson.
Public propertyEmailGets and sets the e-mail address of the SyndicationPerson.
Public propertyNameGets and sets the name of the SyndicationPerson.
Public propertyUriGets and sets the URI of the SyndicationPerson.
Top

  NameDescription
Public methodCloneCreates a copy of the existing SyndicationPerson instance.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Protected methodTryParseAttributeAttempts to parse an attribute extension.
Protected methodTryParseElementAttempts to parse an element extension.
Protected methodWriteAttributeExtensionsWrites the attribute extensions to the specified XmlWriter using the specified syndication version.
Protected methodWriteElementExtensionsWrites the element extensions to the specified XmlWriter using the specified syndication version.
Top

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.

No code example is currently available or this language may not be supported.

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

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

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

<a10:author>
  <a10:name>Lene Aalling</a10:name>
  <a10:uri>http://Lene/Aalling</a10:uri>
  <a10:email>Lene.Aalling@contoso.com</a10:email>
</a10:author>
  <a10:contributor>
  <a10:name>Jesper Aaberg</a10:name>
  <a10:uri>http://Jesper/Aaberg</a10:uri>
  <a10:email>Jesper.Aaberg@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

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

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