From 2f4b8afd67bcafd7214f2799c7db0c274cfa9827 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 17 Dec 2020 13:39:52 +0100 Subject: [PATCH] clean up config --- Modules.Config/Config.vbproj | 1 + Modules.Config/ConfigAttributes.vb | 9 +++++---- Modules.Config/ConfigManager.vb | 10 +++++++--- Modules.Config/ConfigSample.vb | 1 + 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Modules.Config/Config.vbproj b/Modules.Config/Config.vbproj index caf35968..ea3b0e6c 100644 --- a/Modules.Config/Config.vbproj +++ b/Modules.Config/Config.vbproj @@ -76,6 +76,7 @@ + True diff --git a/Modules.Config/ConfigAttributes.vb b/Modules.Config/ConfigAttributes.vb index 09f5d278..290fb702 100644 --- a/Modules.Config/ConfigAttributes.vb +++ b/Modules.Config/ConfigAttributes.vb @@ -12,10 +12,11 @@ Public Class ConnectionStringTestAttribute Inherits Attribute End Class - Public Class ConnectionStringAppServer - Inherits Attribute - End Class - Public Class AppServerConfig + + ''' + ''' The app server connection string. Will not be saved to userconfig. + ''' + Public Class ConnectionStringAppServerAttribute Inherits Attribute End Class ''' diff --git a/Modules.Config/ConfigManager.vb b/Modules.Config/ConfigManager.vb index cfe7b639..4b4a5549 100644 --- a/Modules.Config/ConfigManager.vb +++ b/Modules.Config/ConfigManager.vb @@ -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 ''' - ''' Path to the current computer config. Maybe the same as `UserConfigPath` + ''' Path to the current computer config. ''' ''' Public ReadOnly Property ComputerConfigPath As String @@ -74,6 +73,11 @@ Public Class ConfigManager(Of T) Return _ComputerConfigPath End Get End Property + + ''' + ''' Path to the current Application config. + ''' + ''' Public ReadOnly Property AppConfigPath As String Get Return _AppConfigPath diff --git a/Modules.Config/ConfigSample.vb b/Modules.Config/ConfigSample.vb index 2dbc0e27..2af55591 100644 --- a/Modules.Config/ConfigSample.vb +++ b/Modules.Config/ConfigSample.vb @@ -7,6 +7,7 @@ Public Class ConfigSample Public Property ConnectionStringTest As String + Public Property ConnectionStringAppServer As String