SyndicationLink.ElementExtensions 属性
定义
获取 SyndicationLink 的元素扩展。Gets the element extensions for the SyndicationLink.
public:
property System::ServiceModel::Syndication::SyndicationElementExtensionCollection ^ ElementExtensions { System::ServiceModel::Syndication::SyndicationElementExtensionCollection ^ get(); };
public System.ServiceModel.Syndication.SyndicationElementExtensionCollection ElementExtensions { get; }
member this.ElementExtensions : System.ServiceModel.Syndication.SyndicationElementExtensionCollection
Public ReadOnly Property ElementExtensions As SyndicationElementExtensionCollection
属性值
一个包含 SyndicationElementExtensionCollection 的元素扩展的 SyndicationLink。A SyndicationElementExtensionCollection that contains the element extensions for the SyndicationLink.
示例
下面的代码说明如何向联合链接添加元素扩展。The following code shows how to add an element extension to a syndication link.
SyndicationLink link = new SyndicationLink();
link.ElementExtensions.Add("simpleString", "", "hello, world!");
Dim link As New SyndicationLink()
link.ElementExtensions.Add("simpleString", "", "hello, world!")
注解
元素扩展是 Atom 1.0 或 RSS 2.0 规范中未指定的有效 XML 元素。Element extensions are valid XML elements that are not specified in either the Atom 1.0 or RSS 2.0 specifications. 可以添加任何有效的 XML 元素作为扩展名,只要该元素的命名空间与外层命名空间不同。You can add any valid XML element as an extension, provided its namespace is different from the enclosing namespace.