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