Class XMLConfiguration
Provides implementation of configuration based on a classic XML content
Implements
System.ICloneable
Inherited Members
Configuration.RunMacro(IConfigSectionNode, String, String, IConfigSectionNode, IMacroRunner, Object)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Azos.Conf
Assembly: Azos.dll
Syntax
[Serializable]
public class XMLConfiguration : FileConfiguration, ICloneable
Constructors
XMLConfiguration()
Creates an instance of a new configuration not bound to any XML file
Declaration
public XMLConfiguration()
XMLConfiguration(String)
Creates an instance of the new configuration and reads contents from an XML file
Declaration
public XMLConfiguration(string filename)
Parameters
Type | Name | Description |
---|---|---|
System.String | filename |
Methods
AdjustNodeName(String)
Declaration
protected override string AdjustNodeName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Returns
Type | Description |
---|---|
System.String |
Overrides
CreateFromXML(String, Boolean)
Creates an instance of configuration initialized from XML content passed as string
Declaration
public static XMLConfiguration CreateFromXML(string content, bool strictNames = true)
Parameters
Type | Name | Description |
---|---|---|
System.String | content | |
System.Boolean | strictNames |
Returns
Type | Description |
---|---|
XMLConfiguration |
Refresh()
Declaration
public override void Refresh()
Overrides
Save()
Declaration
public override void Save()
Overrides
SaveAs(String)
Saves configuration into a file
Declaration
public override void SaveAs(string filename)
Parameters
Type | Name | Description |
---|---|---|
System.String | filename |
Overrides
SaveAs(String, String)
Saves configuration to a file with optional link to XSL file
Declaration
public void SaveAs(string filename, string xsl)
Parameters
Type | Name | Description |
---|---|---|
System.String | filename | |
System.String | xsl |
SaveToString(String)
Saves XML configuration with optional link to XSL file, into string and returns it
Declaration
public string SaveToString(string xsl = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | xsl |
Returns
Type | Description |
---|---|
System.String |
SaveToXmlDoc(String, String)
Saves XML configuration into stream
Declaration
public XmlDocument SaveToXmlDoc(string xsl = null, string encoding = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | xsl | |
System.String | encoding |
Returns
Type | Description |
---|---|
System.Xml.XmlDocument |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
System.Object.ToString()
Implements
System.ICloneable