SyndicationPerson.AttributeExtensions プロパティ

定義

SyndicationPerson の属性の拡張を取得します。

public:
 property System::Collections::Generic::Dictionary<System::Xml::XmlQualifiedName ^, System::String ^> ^ AttributeExtensions { System::Collections::Generic::Dictionary<System::Xml::XmlQualifiedName ^, System::String ^> ^ get(); };
public System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName,string> AttributeExtensions { get; }
member this.AttributeExtensions : System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, string>
Public ReadOnly Property AttributeExtensions As Dictionary(Of XmlQualifiedName, String)

プロパティ値

属性の拡張のコレクションを含むディクショナリ。

属性拡張を SyndicationPerson インスタンスに追加する方法を次のコードに示します。

SyndicationPerson sp = new SyndicationPerson("jesper@contoso.com", "Jesper Aaberg", "http://Jesper/Aaberg");
sp.AttributeExtensions.Add(new XmlQualifiedName("myAttribute", ""), "someValue");
Dim sp As New SyndicationPerson("jesper@contoso.com", "Jesper Aaberg", "http://Jesper/Aaberg")
sp.AttributeExtensions.Add(New XmlQualifiedName("myAttribute", ""), "someValue")

AttributeExtensions コレクションを Atom 1.0 にシリアル化する方法を次の XML に示します。

<author customAttribute="value">
  <name>Syed Abas</name>
  <uri>http://Syed/Abas</uri>
  <email>Syed.Abas@contoso.com</email>
</author>

AttributeExtensions コレクションを RSS 2.0 にシリアル化する方法を次の XML に示します。

<a10:author customAttribute="value">
  <a10:name>Syed Abas</a10:name>
  <a10:uri>http://Syed/Abas</a10:uri>
  <a10:email>Syed.Abas@contoso.com</a10:email>
</a10:author>

注釈

配信オブジェクト モデルを使用して、カスタム属性を SyndicationPerson インスタンスに追加できます。 任意の有効な XML 属性と値を追加できます。

Atom 1.0 にシリアル化する場合、すべてのカスタム属性と値は <author> 要素または <contributor> 要素の属性として書き込まれます。 RSS 2.0 にシリアル化する場合、すべてのカスタム属性と値は <managingEditor> 要素、<a10:contributor> 要素、または <a10:author> 要素の属性として書き込まれます。

適用対象