Share via


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 節點。

傳回

組態物件。

實作

例外狀況

sectionfile 屬性中所指定的檔案存在,但無法將它載入。

-或-

sectionname 屬性與 file 屬性中所指定檔案的根項目不相符。

備註

parent對象參數可作為對應父組態區段中的組態設定。 configContext物件參數是組態區段處理程序計算組態值的虛擬路徑。 通常這個參數會被保留,且為 null。 參數 section 是 , XmlNode 其中包含要處理的組態資訊。 參數 section 可讓您直接存取組態區段的 XML 內容。

適用於