clean up config
This commit is contained in:
@@ -76,6 +76,7 @@
|
|||||||
<Compile Include="ConfigAttributes.vb" />
|
<Compile Include="ConfigAttributes.vb" />
|
||||||
<Compile Include="ConfigManager.vb" />
|
<Compile Include="ConfigManager.vb" />
|
||||||
<Compile Include="ConfigSample.vb" />
|
<Compile Include="ConfigSample.vb" />
|
||||||
|
<Compile Include="ConfigUtils.vb" />
|
||||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||||
<Compile Include="My Project\Application.Designer.vb">
|
<Compile Include="My Project\Application.Designer.vb">
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
|
|||||||
@@ -12,10 +12,11 @@
|
|||||||
Public Class ConnectionStringTestAttribute
|
Public Class ConnectionStringTestAttribute
|
||||||
Inherits Attribute
|
Inherits Attribute
|
||||||
End Class
|
End Class
|
||||||
Public Class ConnectionStringAppServer
|
|
||||||
Inherits Attribute
|
''' <summary>
|
||||||
End Class
|
''' The app server connection string. Will not be saved to userconfig.
|
||||||
Public Class AppServerConfig
|
''' </summary>
|
||||||
|
Public Class ConnectionStringAppServerAttribute
|
||||||
Inherits Attribute
|
Inherits Attribute
|
||||||
End Class
|
End Class
|
||||||
''' <summary>
|
''' <summary>
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ Public Class ConfigManager(Of T)
|
|||||||
Private ReadOnly _AppConfigDirectory As String
|
Private ReadOnly _AppConfigDirectory As String
|
||||||
Private ReadOnly _AppConfigPath As String
|
Private ReadOnly _AppConfigPath As String
|
||||||
|
|
||||||
|
|
||||||
Private ReadOnly _TestMode As Boolean = False
|
Private ReadOnly _TestMode As Boolean = False
|
||||||
|
|
||||||
Private ReadOnly _Blueprint As T
|
Private ReadOnly _Blueprint As T
|
||||||
@@ -29,7 +28,7 @@ Public Class ConfigManager(Of T)
|
|||||||
|
|
||||||
Private ReadOnly _ExcludedAttributes = New List(Of Type) From {
|
Private ReadOnly _ExcludedAttributes = New List(Of Type) From {
|
||||||
GetType(ConnectionStringAttribute),
|
GetType(ConnectionStringAttribute),
|
||||||
GetType(ConnectionStringAppServer),
|
GetType(ConnectionStringAppServerAttribute),
|
||||||
GetType(ConnectionStringTestAttribute),
|
GetType(ConnectionStringTestAttribute),
|
||||||
GetType(GlobalSettingAttribute)
|
GetType(GlobalSettingAttribute)
|
||||||
}
|
}
|
||||||
@@ -66,7 +65,7 @@ Public Class ConfigManager(Of T)
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' Path to the current computer config. Maybe the same as `UserConfigPath`
|
''' Path to the current computer config.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
''' <returns></returns>
|
''' <returns></returns>
|
||||||
Public ReadOnly Property ComputerConfigPath As String
|
Public ReadOnly Property ComputerConfigPath As String
|
||||||
@@ -74,6 +73,11 @@ Public Class ConfigManager(Of T)
|
|||||||
Return _ComputerConfigPath
|
Return _ComputerConfigPath
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Path to the current Application config.
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
Public ReadOnly Property AppConfigPath As String
|
Public ReadOnly Property AppConfigPath As String
|
||||||
Get
|
Get
|
||||||
Return _AppConfigPath
|
Return _AppConfigPath
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ Public Class ConfigSample
|
|||||||
|
|
||||||
<ConnectionStringTest>
|
<ConnectionStringTest>
|
||||||
Public Property ConnectionStringTest As String
|
Public Property ConnectionStringTest As String
|
||||||
|
|
||||||
<ConnectionStringAppServer>
|
<ConnectionStringAppServer>
|
||||||
Public Property ConnectionStringAppServer As String
|
Public Property ConnectionStringAppServer As String
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user