C# Class NSoft.NFramework.Nini.Config.XmlConfigSource

Inheritance: ConfigSourceBase
显示文件 Open project: debop/NFramework Class Usage Examples

Public Methods

Method Description
Load ( XmlReader reader ) : void
Load ( string path ) : void
Reload ( ) : void
Save ( ) : void
Save ( Stream stream ) : void
Save ( TextWriter writer ) : void
Save ( string path ) : void
ToString ( ) : string
XmlConfigSource ( ) : System
XmlConfigSource ( XmlReader reader ) : System
XmlConfigSource ( string path ) : System

Private Methods

Method Description
CreateKey ( XmlNode sectionNode, string key, string value ) : void

Creates a key node and adds it to the collection at the end.

GetKeyByName ( XmlNode sectionNode, string name ) : XmlNode

Returns a key node by name.

GetSectionByName ( string name ) : XmlNode

Returns a section node by name.

IsSavable ( ) : bool

Returns true if this instance is savable.

LoadKeys ( XmlNode node, ConfigBase config ) : void

Loads all keys for a config.

LoadSections ( XmlNode rootNode ) : void

Loads all configuration sections.

MergeConfigsIntoDocument ( ) : void

Merges all of the configs from the config collection into the XmlDocument.

MergeDocumentIntoConfigs ( ) : void

Merges the XmlDocument into the Configs when the document is reloaded.

PerformLoad ( XmlDocument document ) : void

Loads all sections and keys.

RemoveConfigKeys ( IConfig config ) : void

Removes all XML keys that were removed as config keys.

RemoveConfigs ( ) : void

Removes all configs that are not in the newly loaded XmlDocument.

RemoveKeys ( string sectionName ) : void

Removes all XML keys that were removed as config keys.

RemoveSections ( ) : void

Removes all XML sections that were removed as configs.

SectionNode ( string name ) : XmlNode

Returns a new section node.

SetKey ( XmlNode sectionNode, string key, string value ) : void

Sets an XML key. If it does not exist then it is created.

Method Details

Load() public method

public Load ( XmlReader reader ) : void
reader XmlReader
return void

Load() public method

public Load ( string path ) : void
path string
return void

Reload() public method

public Reload ( ) : void
return void

Save() public method

public Save ( ) : void
return void

Save() public method

public Save ( Stream stream ) : void
stream Stream
return void

Save() public method

public Save ( TextWriter writer ) : void
writer System.IO.TextWriter
return void

Save() public method

public Save ( string path ) : void
path string
return void

ToString() public method

public ToString ( ) : string
return string

XmlConfigSource() public method

public XmlConfigSource ( ) : System
return System

XmlConfigSource() public method

public XmlConfigSource ( XmlReader reader ) : System
reader XmlReader
return System

XmlConfigSource() public method

public XmlConfigSource ( string path ) : System
path string
return System