SyndicationPerson.Name プロパティ

定義

SyndicationPerson の名前を取得または設定します。

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

プロパティ値

String

ユーザーの名前。

SyndicationPerson の名前を設定する方法を次のコードに示します。

SyndicationPerson sp = new SyndicationPerson();
sp.Name = "Jesper Aaberg";
Dim sp As New SyndicationPerson()
sp.Name = "Jesper Aaberg"

Name を Atom 1.0 にシリアル化する方法を次の XML に示します。

<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>

Name を RSS 2.0 にシリアル化する方法を次の XML に示します。

<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>

注釈

Atom 1.0 にシリアル化する場合、Name プロパティは <name> 要素として書き込まれます。 <name> 要素は、<author> 要素または <contributor> 要素内に記述できます。これは、SyndicationPerson が追加されるコレクション (作成者または投稿者) によって異なります。

RSS 2.0 にシリアル化する場合、Name プロパティは <a10:name> 要素として書き込まれます。 <a10:name> 要素は、<managingEditor> 要素、<a10:author> 要素、または <a10:contributor> 要素内に記述できます。 1 つの SyndicationPerson のみを作成者コレクションに追加する場合、<a10:name> 要素は <managingEditor> 要素内に書き込まれます。 複数の SyndicationPerson を作成者コレクションに追加する場合は、<a10:name> 要素が <a10:author> 要素内に書き込まれます。 SyndicationPerson を投稿者コレクションに追加する場合は、<a10:name> 要素が <a10:contributor> 要素内に書き込まれます。

適用対象