From 2a99128352fd4b9917afe4eb9c2215cc94014c37 Mon Sep 17 00:00:00 2001 From: Developer01 Date: Mon, 29 Dec 2025 13:50:06 +0100 Subject: [PATCH] =?UTF-8?q?*=20=E2=80=9ELinie=20102:=20Uncomment=20the=20c?= =?UTF-8?q?onstructor=20declaration=20so=20the=20following=20code=20is=20v?= =?UTF-8?q?alid=20and=20inside=20the=20constructor,=20resolving=20the=20BC?= =?UTF-8?q?30188=20error.=20Linie=20103:=20The=20error=20BC30188=20('Decla?= =?UTF-8?q?ration=20expected')=20is=20caused=20by=20code=20at=20line=20103?= =?UTF-8?q?=20that=20is=20not=20inside=20a=20method=20or=20constructor.=20?= =?UTF-8?q?The=20code=20from=20line=20103=20to=20131=20is=20not=20inside?= =?UTF-8?q?=20an=20active=20constructor=20because=20the=20constructor=20is?= =?UTF-8?q?=20commented=20out=20at=20line=20102.=20To=20fix=20this,=20unco?= =?UTF-8?q?mment=20the=20constructor=20declaration=20at=20line=20102=20so?= =?UTF-8?q?=20the=20code=20block=20is=20valid.=20Linie=20138:=20Uncomment?= =?UTF-8?q?=20the=20second=20constructor=20declaration=20so=20the=20code?= =?UTF-8?q?=20at=20line=20139=20is=20valid=20and=20inside=20the=20construc?= =?UTF-8?q?tor,=20resolving=20the=20BC30188=20error=20for=20this=20overloa?= =?UTF-8?q?d.=E2=80=9C=20in=20Datei=20=E2=80=9EConfig\ConfigManager.vb?= =?UTF-8?q?=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Config/ConfigManager.vb | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/Config/ConfigManager.vb b/Config/ConfigManager.vb index 3d3251a3..c93a3a88 100644 --- a/Config/ConfigManager.vb +++ b/Config/ConfigManager.vb @@ -99,43 +99,14 @@ Public Class ConfigManager(Of T) ''' The path to check for a computer config file, eg. ProgramData (Usually Application.CommonAppDataPath) ''' The path to check for a third config file. This is useful when running the Application in an environment where AppData/ProgramData directories are not available ''' Override values from ComputerConfig with UserConfig - ' Public Sub New(LogConfig As LogConfig, UserConfigPath As String, ComputerConfigPath As String, Optional ApplicationStartupPath As String = "", Optional ForceUserConfig As Boolean = False) - _LogConfig = LogConfig - _Logger = LogConfig.GetLogger() - _File = New FilesystemEx(_LogConfig) - - _Blueprint = Activator.CreateInstance(Of T) - _BlueprintType = _Blueprint.GetType - _Serializer = New XmlSerializer(_BlueprintType) - - _UserDirectory = _File.CreateDirectory(UserConfigPath) - _UserConfigPath = Path.Combine(_UserDirectory, USER_CONFIG_NAME) - - If ComputerConfigPath <> String.Empty Then - If IO.File.Exists(ComputerConfigPath) Then - _ComputerDirectory = _File.CreateDirectory(ComputerConfigPath, False) - Else - _ComputerDirectory = ComputerConfigPath - End If - _ComputerConfigPath = Path.Combine(_ComputerDirectory, COMPUTER_CONFIG_NAME) - End If - - If ApplicationStartupPath <> String.Empty Then - _AppConfigPath = Path.Combine(ApplicationStartupPath, APP_CONFIG_NAME) - - End If - - _WriteAllValuesToUserConfig = ForceUserConfig - - _Config = LoadConfig() - End Sub + Public Sub New(LogConfig As LogConfig, UserConfigPath As String, ComputerConfigPath As String, Optional ApplicationStartupPath As String = "", Optional ForceUserConfig As Boolean = False) ''' ''' Creates a new ConfigManager with a single (user)config path ''' ''' LogConfig instance ''' The path to check for a user config file, eg. AppData (Usually Application.UserAppDataPath or Application.LocalUserAppDataPath) - ' Public Sub New(LogConfig As LogConfig, ConfigPath As String) + Public Sub New(LogConfig As LogConfig, ConfigPath As String) MyClass.New(LogConfig, ConfigPath, String.Empty, String.Empty, ForceUserConfig:=True) End Sub