C# 클래스 ZForge.Configuration.XMLConfigSetting

Represents a Configuration Node in the XML file
상속: IConfigSetting
파일 보기 프로젝트 열기: zhuangyy/Motion 1 사용 예제들

공개 메소드들

메소드 설명
Children ( ) : IList

An IList compatible object describing each and every child node

Read only property

Clean ( ) : void

Removes any empty nodes from the tree, that is it removes a node, if it hasn't got any children, or neither of its children have got a value.

Copy ( XMLConfigSetting x ) : void

GetChildCount ( bool unique ) : int

Gets the number of children of the specific node

GetChildrenNames ( bool unique ) : IList

Gets the names of children of the specific node

GetNamedChildren ( String name ) : IList

Get all children with the same name, specified in the name parameter

GetNamedChildrenCount ( String name ) : int

Gets the number of childs with the specified name

Remove ( ) : void

Remove the specific node from the tree

RemoveChildren ( ) : void

Remove all children of the node, but keep the node itself

Validate ( ) : bool

Check if the node conforms with the config xml restrictions 1. No nodes with two children of the same name 2. Only alphanumerical names

XMLConfigSetting ( XmlNode node ) : System

Creates an instance of the class

this ( string path ) : IConfigSetting

Get a specific child node

비공개 메소드들

메소드 설명
XMLConfigSetting ( ) : System

This class cannot be constructed directly. You will need to give a node to describe

메소드 상세

Children() 공개 메소드

An IList compatible object describing each and every child node
Read only property
public Children ( ) : IList
리턴 IList

Clean() 공개 메소드

Removes any empty nodes from the tree, that is it removes a node, if it hasn't got any children, or neither of its children have got a value.
public Clean ( ) : void
리턴 void

Copy() 공개 메소드

public Copy ( XMLConfigSetting x ) : void
x XMLConfigSetting
리턴 void

GetChildCount() 공개 메소드

Gets the number of children of the specific node
public GetChildCount ( bool unique ) : int
unique bool /// If true, get only the number of children with distinct names. /// So if it has two nodes with "foo" name, and three nodes /// named "bar", the return value will be 2. In the same case, if unique /// was false, the return value would have been 2 + 3 = 5 ///
리턴 int

GetChildrenNames() 공개 메소드

Gets the names of children of the specific node
public GetChildrenNames ( bool unique ) : IList
unique bool /// If true, get only distinct names. /// So if it has two nodes with "foo" name, and three nodes /// named "bar", the return value will be {"bar","foo"} . /// In the same case, if unique was false, the return value /// would have been {"bar","bar","bar","foo","foo"} ///
리턴 IList

GetNamedChildren() 공개 메소드

Get all children with the same name, specified in the name parameter
public GetNamedChildren ( String name ) : IList
name String /// An alphanumerical string, containing the name of the child nodes to return ///
리턴 IList

GetNamedChildrenCount() 공개 메소드

Gets the number of childs with the specified name
public GetNamedChildrenCount ( String name ) : int
name String /// An alphanumerical string with the name of the nodes to look for ///
리턴 int

Remove() 공개 메소드

Remove the specific node from the tree
public Remove ( ) : void
리턴 void

RemoveChildren() 공개 메소드

Remove all children of the node, but keep the node itself
public RemoveChildren ( ) : void
리턴 void

Validate() 공개 메소드

Check if the node conforms with the config xml restrictions 1. No nodes with two children of the same name 2. Only alphanumerical names
public Validate ( ) : bool
리턴 bool

XMLConfigSetting() 공개 메소드

Creates an instance of the class
public XMLConfigSetting ( XmlNode node ) : System
node System.Xml.XmlNode /// the XmlNode to describe ///
리턴 System

this() 공개 메소드

Get a specific child node
public this ( string path ) : IConfigSetting
path string /// The path to the specific node. Can be either only a name, or a full path separated by '/' or '\' ///
리턴 IConfigSetting