|
Imports System.Xml
Namespace Rewriting
Public Class XMLConfigurationManager
#Region " Properties "
Private _configurationPath As String
Public Property ConfigurationPath() As String
Get
Return _configurationPath
End Get
Set(ByVal value As String)
_configurationPath = value
End Set
End Property
#End Region
#Region " Constructor "
Public Sub New(ByVal configurationDocumentPath As String)
ConfigurationPath = configurationDocumentPath
End Sub
#End Region
#Region " Public Methods "
Friend Function GetConfiguration() As XmlNode
'Ensure that the configuration path exists
If Not IO.File.Exists(ConfigurationPath) Then
Throw New Exception("Could not obtain configuration information")
End If
'Load the configuration settings
Dim settings As New XmlDocument
settings.Load(ConfigurationPath)
Return settings.ChildNodes(1)
End Function
#End Region
End Class
End Namespace
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.