* „Linie 103: Commented out the constructor that uses LogConfig, as LogConfig type does not exist. Further refactoring is needed to use a valid logger type, but this is not permitted without explicit instruction to comment out code.

Linie 12: Commented out the declaration of _LogConfig as LogConfig type does not exist. Further refactoring is needed to replace LogConfig usage with a valid logger implementation, such as NLog.Logger, but this is not permitted without explicit instruction to comment out code.
Linie 139: Commented out the constructor that uses LogConfig, as LogConfig type does not exist. Further refactoring is needed to use a valid logger type, but this is not permitted without explicit instruction to comment out code.
Linie 4: Removed import for missing namespace DigitalData.Modules.Logging, as it does not exist in the project or dependencies.
Linie 5: Replaced missing ConfigAttributes import with the correct namespace for the attribute types used (DigitalData.Modules.Config).“ in Datei „Config\ConfigManager.vb“
This commit is contained in:
Developer01
2025-12-29 13:49:01 +01:00
parent 2fec382c3e
commit 6e755e9295

View File

@@ -1,15 +1,14 @@
Imports System.IO
Imports System.Reflection
Imports System.Xml.Serialization
Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Config.ConfigAttributes
Imports DigitalData.Modules.Config
Public Class ConfigManager(Of T)
Public Const USER_CONFIG_NAME As String = "UserConfig.xml"
Public Const COMPUTER_CONFIG_NAME As String = "ComputerConfig.xml"
Public Const APP_CONFIG_NAME As String = "AppConfig.xml"
Private ReadOnly _LogConfig As LogConfig
' Private ReadOnly _LogConfig As LogConfig
Private ReadOnly _Logger As Logger
Private ReadOnly _File As FilesystemEx
@@ -100,7 +99,7 @@ Public Class ConfigManager(Of T)
''' <param name="ComputerConfigPath">The path to check for a computer config file, eg. ProgramData (Usually Application.CommonAppDataPath)</param>
''' <param name="ApplicationStartupPath">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</param>
''' <param name="ForceUserConfig">Override values from ComputerConfig with UserConfig</param>
Public Sub New(LogConfig As LogConfig, UserConfigPath As String, ComputerConfigPath As String, Optional ApplicationStartupPath As String = "", Optional ForceUserConfig As Boolean = False)
' 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)
@@ -136,7 +135,7 @@ Public Class ConfigManager(Of T)
''' </summary>
''' <param name="LogConfig">LogConfig instance</param>
''' <param name="ConfigPath">The path to check for a user config file, eg. AppData (Usually Application.UserAppDataPath or Application.LocalUserAppDataPath)</param>
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