Szerkesztés

Megosztás a következőn keresztül:


SyndicationPerson.Uri Property

Definition

Gets or sets the URI of the SyndicationPerson.

public:
 property System::String ^ Uri { System::String ^ get(); void set(System::String ^ value); };
public string Uri { get; set; }
member this.Uri : string with get, set
Public Property Uri As String

Property Value

The URI of the person's Web site.

Examples

The following code shows how to set the URI for a SyndicationPerson instance.

SyndicationPerson sp = new SyndicationPerson();
sp.Uri = "http://Jesper/Aaberg";
Dim sp As New SyndicationPerson()
sp.Uri = "http://Jesper/Aaberg"

The following XML shows how the Name is serialized for 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 the Name is serialized for 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>

Remarks

When serialized to Atom 1.0, the Uri property is written as a <uri> element. The <uri> element appears within an <author> or <contributor> element, which depends upon which collection (authors or contributors) the SyndicationPerson is added to.

When serialized to RSS 2.0, the Uri property is written as an <a10:uri> element. The <a10:uri> element appears within a <managingEditor>, <a10:author>, or <a10:contributor> element. If only one SyndicationPerson is added to the authors collection, the <a10:uri> element is written within the <managingEditor> element. If more than one SyndicationPerson is added to the authors collection, the <a10:uri> element is written within the <a10:author> element. If the SyndicationPerson is added to the contributors collection, the <a10:uri> element is written within the <a10:contributor> element.

Applies to