C# 클래스 Tools.XmlConfigMerge.ConfigFileManager

파일 보기 프로젝트 열기: CompassPHS/scurrynet 1 사용 예제들

공개 메소드들

메소드 설명
ConfigFileManager ( string masterConfigPath ) : System
ConfigFileManager ( string masterConfigPath, string mergeFromConfigPath ) : System
ConfigFileManager ( string masterConfigPath, string mergeFromConfigPath, bool makeMergeFromConfigPathTheSavePath ) : System

FromLastInstallConfigPathExists ( ) : bool
GetAllKeyValuePairs ( ) : Hashtable
GetKeyValue ( string key ) : string
GetXPathValue ( string xPath ) : string
ReplaceXPathValues ( string xPath, string replaceWith ) : string[]
ReplaceXPathValues ( string xPath, string replaceWith, Regex regexPattern ) : string[]

Search and replace on one or more specified values as specified by a single xpath expressino

Save ( ) : void
Save ( string saveAsName ) : void
SetKeyValue ( string key, string value ) : void
UpdateExistingElementsAndAttribs ( XmlDocument fromXdoc, XmlDocument toXdoc ) : void

Merge element and attribute values from one xml doc to another.

Multiple same-named peer elements, are merged in the ordinal order they appear.

비공개 메소드들

메소드 설명
ClearSpecifiedFileAttributes ( string path, FileAttributes fileAttributes ) : void
GetKeyValueNode ( string key ) : XmlNode
GetTextElement ( XmlNode node ) : XmlNode
SelectSingleNodeMatchingNamespaceURI ( XmlNode node, XmlNode nodeName ) : XmlNode
SelectSingleNodeMatchingNamespaceURI ( XmlNode node, XmlNode nodeName, XmlAttribute keyAttrib ) : XmlNode
SelectSingleNodeMatchingNamespaceURI ( XmlNode node, XmlNode nodeName, XmlAttribute keyAttrib, int iSameElement ) : XmlNode
SelectSingleNodeMatchingNamespaceURI ( XmlNode node, XmlNode nodeName, int iSameElement ) : XmlNode
UpdateExistingElementsAndAttribsRecurse ( XmlNodeList fromNodes, XmlNode toParentNode ) : void

메소드 상세

ConfigFileManager() 공개 메소드

public ConfigFileManager ( string masterConfigPath ) : System
masterConfigPath string
리턴 System

ConfigFileManager() 공개 메소드

public ConfigFileManager ( string masterConfigPath, string mergeFromConfigPath ) : System
masterConfigPath string
mergeFromConfigPath string
리턴 System

ConfigFileManager() 공개 메소드

if mergeFromConfigPath is specified but does not exist, and makeMergeFromConfigPathTheSavePath is false
public ConfigFileManager ( string masterConfigPath, string mergeFromConfigPath, bool makeMergeFromConfigPathTheSavePath ) : System
masterConfigPath string
mergeFromConfigPath string
makeMergeFromConfigPathTheSavePath bool
리턴 System

FromLastInstallConfigPathExists() 공개 메소드

public FromLastInstallConfigPathExists ( ) : bool
리턴 bool

GetAllKeyValuePairs() 공개 메소드

public GetAllKeyValuePairs ( ) : Hashtable
리턴 System.Collections.Hashtable

GetKeyValue() 공개 메소드

public GetKeyValue ( string key ) : string
key string
리턴 string

GetXPathValue() 공개 메소드

public GetXPathValue ( string xPath ) : string
xPath string
리턴 string

ReplaceXPathValues() 공개 메소드

public ReplaceXPathValues ( string xPath, string replaceWith ) : string[]
xPath string
replaceWith string
리턴 string[]

ReplaceXPathValues() 공개 메소드

Search and replace on one or more specified values as specified by a single xpath expressino
When no nodes match xpath-expression and no regexPattern is specified (is null), /// and can't auto-create the node (is not an appSettings expression).
public ReplaceXPathValues ( string xPath, string replaceWith, Regex regexPattern ) : string[]
xPath string
replaceWith string
regexPattern System.Text.RegularExpressions.Regex Optionally specify a regex pattern to search within the found values. /// If a single () group is found within this expression, only this portion is replaced.
리턴 string[]

Save() 공개 메소드

public Save ( ) : void
리턴 void

Save() 공개 메소드

public Save ( string saveAsName ) : void
saveAsName string
리턴 void

SetKeyValue() 공개 메소드

public SetKeyValue ( string key, string value ) : void
key string
value string
리턴 void

UpdateExistingElementsAndAttribs() 공개 정적인 메소드

Merge element and attribute values from one xml doc to another.
Multiple same-named peer elements, are merged in the ordinal order they appear.
public static UpdateExistingElementsAndAttribs ( XmlDocument fromXdoc, XmlDocument toXdoc ) : void
fromXdoc System.Xml.XmlDocument
toXdoc System.Xml.XmlDocument
리턴 void