SyndicationFeed.AttributeExtensions プロパティ

定義

属性の拡張のコレクションを取得します。

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)

プロパティ値

Dictionary<XmlQualifiedName,String>

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

次のコードは、属性拡張を配信フィードに書き込む方法を示しています。

SyndicationFeed feed = new SyndicationFeed();

//Attribute extensions are stored in a dictionary indexed by XmlQualifiedName
feed.AttributeExtensions.Add(new XmlQualifiedName("myAttribute", ""), "someValue");
Dim feed As New SyndicationFeed()

'Attribute extensions are stored in a dictionary indexed by XmlQualifiedName
feed.AttributeExtensions.Add(New XmlQualifiedName("myAttribute", ""), "someValue")

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

<feed xml:lang="en-us" CustomAttribute="Value" xmlns="http://www.w3.org/2005/Atom">

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

<channel CustomAttribute="Value">

注釈

属性の拡張は、Atom 1.0 または RSS 2.0 のどちらの仕様でも定義されていない有効な XML 属性です。 Atom 1.0 にシリアル化すると、コレクション内の各カスタム属性が要素に <atom> 書き込まれます。 RSS 2.0 にシリアル化すると、各カスタム属性が要素に <channel> 書き込まれます。 属性拡張を追加する例については、 緩やかに型指定された拡張機能の サンプルを参照してください。

適用対象