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)

プロパティ値

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

次のコードは、シンジケーション フィードに属性拡張機能を追加する方法を示しています。

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

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

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

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

<channel CustomAttribute="Value">

注釈

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

適用対象