NameValueFileSectionHandler.Create(Object, Object, XmlNode) 方法

定义

创建新的配置处理程序,并根据指定的参数将其添加到节处理程序集合中。

public:
 virtual System::Object ^ Create(System::Object ^ parent, System::Object ^ configContext, System::Xml::XmlNode ^ section);
public object Create(object parent, object configContext, System.Xml.XmlNode section);
abstract member Create : obj * obj * System.Xml.XmlNode -> obj
override this.Create : obj * obj * System.Xml.XmlNode -> obj
Public Function Create (parent As Object, configContext As Object, section As XmlNode) As Object

参数

parent
Object

父对象。

configContext
Object

配置上下文对象。

section
XmlNode

节 XML 节点。

返回

配置对象。

实现

例外

在存在属性file中指定的section文件,但无法加载。

-或-

name 属性 section 与属性中指定的 file 文件的根元素不匹配。

注解

对象 parent 参数充当相应父配置部分中的配置设置。 对象 configContext 参数是配置节处理程序计算配置值的虚拟路径。 通常,此参数是保留的,并且是 null。 参数 section 包含 XmlNode 要处理的配置信息。 该 section 参数提供对配置节的 XML 内容的直接访问。

适用于