Compare commits

..

2 Commits

Author SHA1 Message Date
Developer01
e9427b35be ViewDocument before GDPicture Update 2025-09-17 14:05:04 +02:00
Developer01
51798a28f5 ViewDocument xrechnung 2025-09-17 10:38:54 +02:00
108 changed files with 2631 additions and 128953 deletions

1
.gitignore vendored
View File

@@ -338,4 +338,3 @@ ASALocalRun/
# BeatPulse healthcheck temp database # BeatPulse healthcheck temp database
healthchecksdb healthchecksdb
/EDMIAPI/ErrorLog.txt

View File

@@ -45,10 +45,13 @@
<OptionInfer>On</OptionInfer> <OptionInfer>On</OptionInfer>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="DigitalData.Modules.Logging"> <Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath> <HintPath>..\packages\DigitalData.Modules.Logging.2.6.5\lib\net462\DigitalData.Modules.Logging.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
@@ -79,7 +82,6 @@
<ItemGroup> <ItemGroup>
<Compile Include="Base\BaseClass.vb" /> <Compile Include="Base\BaseClass.vb" />
<Compile Include="Base\BaseUtils.vb" /> <Compile Include="Base\BaseUtils.vb" />
<Compile Include="DocumentPathHandler.vb" />
<Compile Include="ECM\ECM.vb" /> <Compile Include="ECM\ECM.vb" />
<Compile Include="Encryption\Compression.vb" /> <Compile Include="Encryption\Compression.vb" />
<Compile Include="Encryption\Encryption.vb" /> <Compile Include="Encryption\Encryption.vb" />
@@ -90,7 +92,6 @@
<Compile Include="FileWatcher\FileWatcherFilters.vb" /> <Compile Include="FileWatcher\FileWatcherFilters.vb" />
<Compile Include="FileWatcher\FileWatcherProperties.vb" /> <Compile Include="FileWatcher\FileWatcherProperties.vb" />
<Compile Include="IDB\Constants.vb" /> <Compile Include="IDB\Constants.vb" />
<Compile Include="Map_Drive.vb" />
<Compile Include="MimeEx.vb" /> <Compile Include="MimeEx.vb" />
<Compile Include="StringFunctions.vb" /> <Compile Include="StringFunctions.vb" />
<Compile Include="WindowsEx.vb" /> <Compile Include="WindowsEx.vb" />
@@ -137,20 +138,12 @@
<CustomToolNamespace>My</CustomToolNamespace> <CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput> <LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None> </None>
<None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="README.txt" /> <Content Include="README.txt" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup />
<PackageReference Include="NLog">
<Version>5.0.5</Version>
</PackageReference>
<PackageReference Include="NuGet.CommandLine">
<Version>6.13.2</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent> <PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>

View File

@@ -1,392 +0,0 @@
Imports System.IO
Imports DigitalData.Modules.Logging
''' <summary>
''' Zentrale Klasse für Dokumentenpfad-Verwaltung mit optionalem Laufwerks-Mapping und Temp-Kopie
''' </summary>
Public Class DocumentPathHandler
Private ReadOnly _Logger As Logger
Private ReadOnly _LogConfig As LogConfig
Private _mappedDrive As String = ""
Private _clsmapDrive As Map_Drive
Public Sub New(LogConfig As LogConfig)
_LogConfig = LogConfig
_Logger = LogConfig.GetLogger()
_clsmapDrive = New Map_Drive(LogConfig)
End Sub
Private Function EnsureTempFolder(ByRef tempFolder As String, ByRef errorMessage As String) As Boolean
Try
_Logger.Debug($"📂 Überprüfe Temp-Ordner: [{tempFolder}]")
If String.IsNullOrWhiteSpace(tempFolder) Then
_Logger.Debug("⚠️ Temp-Ordner nicht konfiguriert, verwende TEMP_DOCUMENT_FOLDER aus AppSettings")
tempFolder = TEMP_DOCUMENT_FOLDER
End If
' Fallback, falls global nichts konfiguriert ist
If String.IsNullOrWhiteSpace(tempFolder) Then
tempFolder = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
"Digital Data",
"taskFLOW",
"DocumentViewer",
"Temp")
_Logger.Info($"⚠️ TEMP_DOCUMENT_FOLDER war leer - verwende Fallback: [{tempFolder}]")
TEMP_DOCUMENT_FOLDER = tempFolder
End If
If Not Directory.Exists(tempFolder) Then
Directory.CreateDirectory(tempFolder)
_Logger.Info($"📁 Temp-Ordner erstellt: [{tempFolder}]")
End If
If Not Directory.Exists(tempFolder) Then
errorMessage = $"Temp-Ordner konnte nicht erstellt werden: [{tempFolder}]"
Return False
End If
Return True
Catch ex As Exception
errorMessage = $"Fehler bei Temp-Ordner-Initialisierung: {ex.Message}"
_Logger.Error($"❌ {errorMessage}")
_Logger.Error(ex)
Return False
End Try
End Function
Public Sub CleanupTempFolder()
Try
If String.IsNullOrEmpty(TEMP_DOCUMENT_FOLDER) Then
_Logger.Debug("TEMP_DOCUMENT_FOLDER ist nicht gesetzt → Kein Cleanup erforderlich")
Return
End If
If Not System.IO.Directory.Exists(TEMP_DOCUMENT_FOLDER) Then
_Logger.Debug($"Temp-Ordner [{TEMP_DOCUMENT_FOLDER}] existiert nicht → Kein Cleanup erforderlich")
Return
End If
' Alle Dateien im Ordner ermitteln
Dim files As String() = System.IO.Directory.GetFiles(TEMP_DOCUMENT_FOLDER)
If files.Length = 0 Then
_Logger.Debug($"Temp-Ordner [{TEMP_DOCUMENT_FOLDER}] ist bereits leer")
Return
End If
' Alle Dateien löschen
Dim deletedCount As Integer = 0
Dim errorCount As Integer = 0
For Each filePath As String In files
Try
System.IO.File.Delete(filePath)
deletedCount += 1
_Logger.Debug($"Datei gelöscht: [{System.IO.Path.GetFileName(filePath)}]")
Catch fileEx As Exception
errorCount += 1
_Logger.Warn($"⚠️ Datei konnte nicht gelöscht werden: [{System.IO.Path.GetFileName(filePath)}] - {fileEx.Message}")
End Try
Next
If errorCount = 0 Then
_Logger.Debug($"✓ Temp-Ordner bereinigt: {deletedCount} Datei(en) gelöscht")
Else
_Logger.Warn($"⚠️ Temp-Ordner teilweise bereinigt: {deletedCount} gelöscht, {errorCount} Fehler")
End If
Catch ex As Exception
_Logger.Error($"❌ Fehler beim Bereinigen des Temp-Ordners: {ex.Message}")
_Logger.Error(ex)
End Try
End Sub
''' <summary>
''' Verarbeitet einen Dokumentenpfad: Optional Mapping, dann Temp-Kopie
''' </summary>
''' <param name="sourcePath">Quell-Pfad der Datei (UNC oder lokal)</param>
''' <param name="options">Optionen für die Verarbeitung</param>
''' <returns>DocumentPathResult mit finalem Pfad und Mapping-Info</returns>
Public Function ProcessDocumentPath(sourcePath As String, options As DocumentPathOptions) As DocumentPathResult
Dim result As New DocumentPathResult With {
.SourcePath = sourcePath,
.FinalPath = sourcePath,
.Success = False,
.WasMapped = False,
.WasCopiedToTemp = False
}
Try
' Validierung
If String.IsNullOrEmpty(sourcePath) Then
result.ErrorMessage = "Quell-Pfad ist leer"
_Logger.Error("❌ ProcessDocumentPath: Quell-Pfad ist leer")
Return result
End If
Dim workingPath As String = sourcePath
' ========== SCHRITT 1: OPTIONALES LAUFWERKS-MAPPING ==========
If options.EnableMapping AndAlso Not String.IsNullOrEmpty(options.WMSuffix) Then
Dim mappingResult = TryMapNetworkDrive(sourcePath, options)
If mappingResult.Success Then
workingPath = mappingResult.MappedPath
_mappedDrive = mappingResult.DriveLetter
result.WasMapped = True
result.MappedDrive = _mappedDrive
_Logger.Info($"✓ Laufwerk gemappt: {_mappedDrive}")
Else
_Logger.Warn("⚠️ Laufwerks-Mapping fehlgeschlagen - verwende Original-UNC-Pfad")
workingPath = sourcePath
End If
End If
' ========== SCHRITT 2: PRÜFEN OB DATEI EXISTIERT ==========
If Not File.Exists(workingPath) Then
result.ErrorMessage = $"Datei nicht gefunden: [{workingPath}]"
_Logger.Error($"❌ {result.ErrorMessage}")
' Cleanup bei Fehler
If result.WasMapped Then
UnmapDrive()
End If
Return result
End If
' ========== SCHRITT 3: OPTIONALE TEMP-KOPIE ==========
If options.CopyToTemp Then
_Logger.Debug($"📂 Starte Temp-Kopie für: [{workingPath}]")
Dim tempResult = CopyToTempFolder(workingPath, options.TempFolder)
If tempResult.Success Then
result.FinalPath = tempResult.TempPath
result.WasCopiedToTemp = True
result.TempPath = tempResult.TempPath
_Logger.Info($"✓ Datei in Temp kopiert: [{Path.GetFileName(tempResult.TempPath)}]")
' Laufwerk unmappen nach erfolgreicher Kopie
If result.WasMapped AndAlso options.UnmapAfterCopy Then
UnmapDrive()
result.WasMapped = False
End If
Else
_Logger.Warn($"⚠️ Temp-Kopie fehlgeschlagen: {tempResult.ErrorMessage}")
' WICHTIG: Nicht den gemappten Pfad behalten, wenn danach ungemappt wird.
' Fallback immer auf stabilen Originalpfad (UNC).
result.FinalPath = sourcePath
result.WasCopiedToTemp = False
result.TempPath = String.Empty
If result.WasMapped Then
UnmapDrive()
result.WasMapped = False
End If
End If
Else
result.FinalPath = workingPath
_Logger.Debug($"📄 Verwende Pfad ohne Temp-Kopie: [{workingPath}]")
End If
result.Success = True
Return result
Catch ex As Exception
result.ErrorMessage = $"Unerwarteter Fehler: {ex.Message}"
_Logger.Error($"❌ ProcessDocumentPath: {ex.Message}")
_Logger.Error(ex)
' Cleanup bei Exception
If result.WasMapped Then
UnmapDrive()
End If
Return result
End Try
End Function
''' <summary>
''' Versucht ein Netzlaufwerk zu mappen
''' </summary>
Private Function TryMapNetworkDrive(sourcePath As String, options As DocumentPathOptions) As MappingResult
Dim result As New MappingResult With {.Success = False}
Try
' Prüfen ob Pfad mit WMSUFFIX beginnt
If Not sourcePath.StartsWith(options.WMSuffix, StringComparison.OrdinalIgnoreCase) Then
_Logger.Debug($"📄 Pfad beginnt nicht mit WMSUFFIX - kein Mapping erforderlich")
Return result
End If
_Logger.Debug($"📂 WMSUFFIX erkannt - starte Laufwerks-Mapping")
' Laufwerk mappen
Dim mappedDrive As String = ""
If Not String.IsNullOrEmpty(options.SpecificDrive) AndAlso options.SpecificDrive.Length = 1 Then
' Spezifisches Laufwerk
If _clsmapDrive.MapSpecificDrive(options.SpecificDrive, options.DriveBlacklist, options.WMSuffix) Then
mappedDrive = options.SpecificDrive & ":"
End If
Else
' Automatisches Mapping
mappedDrive = _clsmapDrive.MapDriveAutomatic(options.DriveBlacklist, options.WMSuffix)
End If
If String.IsNullOrEmpty(mappedDrive) Then
_Logger.Warn("⚠️ Kein Laufwerk gemappt")
Return result
End If
' Pfad umschreiben
Dim relativePath As String = sourcePath.Substring(options.WMSuffix.Length)
If relativePath.StartsWith("\") Then
relativePath = relativePath.Substring(1)
End If
Dim mappedPath As String = mappedDrive.TrimEnd(":"c, "\"c) & ":\" & relativePath
_Logger.Debug($"📄 Original: [{sourcePath}]")
_Logger.Debug($"📄 Gemappt: [{mappedPath}]")
result.Success = True
result.DriveLetter = mappedDrive
result.MappedPath = mappedPath
Return result
Catch ex As Exception
_Logger.Error($"Fehler beim Mapping: {ex.Message}")
_Logger.Error(ex)
Return result
End Try
End Function
Private Function CopyToTempFolder(sourcePath As String, tempFolder As String) As TempCopyResult
Dim result As New TempCopyResult With {.Success = False}
Try
Dim configuredTempFolder As String = tempFolder
Dim globalTempFolder As String = TEMP_DOCUMENT_FOLDER
' Temp-Ordner validieren/initialisieren (kann tempFolder per ByRef setzen)
If Not EnsureTempFolder(tempFolder, result.ErrorMessage) Then
_Logger.Warn($"⚠️ {result.ErrorMessage}")
_Logger.Warn($"[TempCopy] InputTemp=[{If(String.IsNullOrWhiteSpace(configuredTempFolder), "<leer>", configuredTempFolder)}], GlobalTemp=[{If(String.IsNullOrWhiteSpace(globalTempFolder), "<leer>", globalTempFolder)}]")
Return result
End If
' NEU: Effektiven Zielordner immer transparent loggen
_Logger.Info($"[TempCopy] Effektiver Temp-Ordner: [{tempFolder}]")
_Logger.Debug($"[TempCopy] InputTemp=[{If(String.IsNullOrWhiteSpace(configuredTempFolder), "<leer>", configuredTempFolder)}], GlobalTemp=[{If(String.IsNullOrWhiteSpace(globalTempFolder), "<leer>", globalTempFolder)}]")
' Eindeutigen Dateinamen generieren
Dim originalFileName As String = Path.GetFileName(sourcePath)
Dim fileNameWithoutExt As String = Path.GetFileNameWithoutExtension(originalFileName)
Dim extension As String = Path.GetExtension(originalFileName)
Dim timestamp As String = DateTime.Now.ToString("yyyyMMdd_HHmmss_fff")
Dim uniqueFileName As String = $"{fileNameWithoutExt}_{timestamp}{extension}"
Dim targetPath As String = Path.Combine(tempFolder, uniqueFileName)
_Logger.Debug($"📄 Kopiere nach Temp:")
_Logger.Debug($" Von: [{sourcePath}]")
_Logger.Debug($" Nach: [{targetPath}]")
File.Copy(sourcePath, targetPath, overwrite:=True)
result.Success = True
result.TempPath = targetPath
result.TempFileName = uniqueFileName
Return result
Catch ex As Exception
result.ErrorMessage = $"Fehler beim Kopieren: {ex.Message}"
_Logger.Error($"❌ {result.ErrorMessage}")
_Logger.Error(ex)
Return result
End Try
End Function
''' <summary>
''' Trennt das gemappte Laufwerk
''' </summary>
Public Sub UnmapDrive()
If Not String.IsNullOrEmpty(_mappedDrive) Then
Try
If _clsmapDrive.DisconnectNetworkDrive(_mappedDrive, force:=True) Then
_Logger.Info($"🔌 Laufwerk {_mappedDrive} getrennt")
Else
_Logger.Warn($"⚠️ Warnung beim Trennen von {_mappedDrive}")
End If
Catch ex As Exception
_Logger.Debug($"Fehler beim Trennen von {_mappedDrive}: {ex.Message}")
Finally
_mappedDrive = ""
End Try
End If
End Sub
''' <summary>
''' Cleanup-Methode (z.B. beim Schließen des Forms)
''' </summary>
Public Sub Cleanup()
UnmapDrive()
End Sub
#Region "Nested Classes für Optionen und Ergebnisse"
''' <summary>
''' Optionen für die Dokumentenpfad-Verarbeitung
''' </summary>
Public Class DocumentPathOptions
''' <summary>Soll Laufwerks-Mapping versucht werden?</summary>
Public Property EnableMapping As Boolean = False
''' <summary>WMSUFFIX für Mapping-Erkennung (z.B. "\\windream\objects")</summary>
Public Property WMSuffix As String = ""
''' <summary>Spezifischer Laufwerksbuchstabe (z.B. "V") oder leer für automatisch</summary>
Public Property SpecificDrive As String = ""
''' <summary>Blacklist für Laufwerksbuchstaben (z.B. "Y,M,V")</summary>
Public Property DriveBlacklist As String = ""
''' <summary>Soll Datei in Temp kopiert werden?</summary>
Public Property CopyToTemp As Boolean = False
''' <summary>Temp-Ordner-Pfad</summary>
Public Property TempFolder As String = ""
''' <summary>Laufwerk nach erfolgreicher Temp-Kopie unmappen?</summary>
Public Property UnmapAfterCopy As Boolean = True
End Class
''' <summary>
''' Ergebnis der Dokumentenpfad-Verarbeitung
''' </summary>
Public Class DocumentPathResult
Public Property Success As Boolean
Public Property SourcePath As String
Public Property FinalPath As String
Public Property ErrorMessage As String
Public Property WasMapped As Boolean
Public Property MappedDrive As String
Public Property WasCopiedToTemp As Boolean
Public Property TempPath As String
End Class
Private Class MappingResult
Public Property Success As Boolean
Public Property DriveLetter As String
Public Property MappedPath As String
End Class
Private Class TempCopyResult
Public Property Success As Boolean
Public Property TempPath As String
Public Property TempFileName As String
Public Property ErrorMessage As String
End Class
#End Region
End Class

View File

@@ -1,559 +0,0 @@
Imports System.IO
Imports System.Runtime.InteropServices
Imports DigitalData.Modules.Logging
Public Class Map_Drive
Private ReadOnly _Logger As Logger
Private ReadOnly _LogConfig As LogConfig
#Region "Windows API Deklarationen"
<DllImport("mpr.dll", CharSet:=CharSet.Auto)>
Private Shared Function WNetAddConnection2(ByRef lpNetResource As NETRESOURCE,
ByVal lpPassword As String,
ByVal lpUsername As String,
ByVal dwFlags As Integer) As Integer
End Function
<DllImport("mpr.dll", CharSet:=CharSet.Auto)>
Private Shared Function WNetCancelConnection2(ByVal lpName As String,
ByVal dwFlags As Integer,
ByVal fForce As Boolean) As Integer
End Function
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Auto)>
Private Structure NETRESOURCE
Public dwScope As Integer
Public dwType As Integer
Public dwDisplayType As Integer
Public dwUsage As Integer
Public lpLocalName As String
Public lpRemoteName As String
Public lpComment As String
Public lpProvider As String
End Structure
Private Const RESOURCETYPE_DISK As Integer = 1
Private Const CONNECT_UPDATE_PROFILE As Integer = 1
Private Const ERROR_SUCCESS As Integer = 0
Private Const ERROR_ALREADY_ASSIGNED As Integer = 85
#End Region
Public Sub New(LogConfig As LogConfig)
_LogConfig = LogConfig
_Logger = LogConfig.GetLogger()
End Sub
''' <summary>
''' Struktur für Netzlaufwerk-Informationen
''' </summary>
Public Structure NetworkDriveInfo
Public DriveLetter As String
Public NetworkPath As String
Public DriveType As IO.DriveType
Public IsReady As Boolean
Public TotalSize As Long
Public FreeSpace As Long
End Structure
''' <summary>
''' Ermittelt den nächsten freien Laufwerksbuchstaben (alphabetisch absteigend von Z bis A)
''' </summary>
''' <param name="blacklist">Liste der nicht erlaubten Laufwerksbuchstaben (z.B. "Y,M,V")</param>
''' <returns>Nächster freier Laufwerksbuchstabe mit Doppelpunkt (z.B. "Z:") oder String.Empty wenn keiner frei</returns>
Public Function GetNextFreeDriveLetter(Optional blacklist As String = "") As String
Try
' Blacklist verarbeiten (Großbuchstaben ohne Doppelpunkte)
Dim blacklistArray As New List(Of Char)
If Not String.IsNullOrEmpty(blacklist) Then
For Each item In blacklist.Split(","c)
Dim letter = item.Trim().ToUpper().Replace(":", "")
If letter.Length = 1 AndAlso Char.IsLetter(letter(0)) Then
blacklistArray.Add(letter(0))
End If
Next
End If
' Alle aktuell verwendeten Laufwerksbuchstaben ermitteln
Dim usedDrives As New List(Of Char)
For Each drive As IO.DriveInfo In IO.DriveInfo.GetDrives()
Dim letter As Char = drive.Name(0)
usedDrives.Add(Char.ToUpper(letter))
Next
' Alphabetisch absteigend von Z bis A durchgehen
For i As Integer = Asc("Z"c) To Asc("A"c) Step -1
Dim currentLetter As Char = Chr(i)
' Prüfen ob Buchstabe verfügbar ist
If Not usedDrives.Contains(currentLetter) AndAlso Not blacklistArray.Contains(currentLetter) Then
_Logger.Debug($"Nächster freier Laufwerksbuchstabe gefunden: {currentLetter}:")
Return currentLetter & ":"
End If
Next
_Logger.Warn("Kein freier Laufwerksbuchstabe gefunden!")
Return String.Empty
Catch ex As Exception
_Logger.Error($"Fehler beim Ermitteln des nächsten freien Laufwerksbuchstabens: {ex.Message}")
_Logger.Error(ex)
Return String.Empty
End Try
End Function
''' <summary>
''' Prüft ob ein Laufwerksbuchstabe verfügbar ist (nicht verwendet und nicht in Blacklist)
''' </summary>
''' <param name="driveLetter">Zu prüfender Laufwerksbuchstabe</param>
''' <param name="blacklist">Liste der nicht erlaubten Laufwerksbuchstaben</param>
''' <returns>True wenn verfügbar, False wenn bereits verwendet oder in Blacklist</returns>
Public Function IsDriveLetterAvailable(driveLetter As String, Optional blacklist As String = "") As Boolean
Try
' Formatierung sicherstellen
driveLetter = driveLetter.Trim().ToUpper().Replace(":", "")
If driveLetter.Length <> 1 OrElse Not Char.IsLetter(driveLetter(0)) Then
_Logger.Warn($"Ungültiger Laufwerksbuchstabe: {driveLetter}")
Return False
End If
Dim letter As Char = driveLetter(0)
' Blacklist prüfen
If Not String.IsNullOrEmpty(blacklist) Then
For Each item In blacklist.Split(","c)
Dim blacklistedLetter = item.Trim().ToUpper().Replace(":", "")
If blacklistedLetter.Length = 1 AndAlso blacklistedLetter(0) = letter Then
_Logger.Debug($"Laufwerk {letter}: ist in der Blacklist")
Return False
End If
Next
End If
' Prüfen ob bereits verwendet
For Each drive As IO.DriveInfo In IO.DriveInfo.GetDrives()
If Char.ToUpper(drive.Name(0)) = letter Then
_Logger.Debug($"Laufwerk {letter}: ist bereits verwendet")
Return False
End If
Next
Return True
Catch ex As Exception
_Logger.Error($"Fehler beim Prüfen der Laufwerksverfügbarkeit: {ex.Message}")
_Logger.Error(ex)
Return False
End Try
End Function
''' <summary>
''' Mappt ein Netzlaufwerk mit automatischer Laufwerksbuchstabenwahl oder spezifischem Buchstaben
''' </summary>
''' <param name="driveLetter">Gewünschter Laufwerksbuchstabe (leer = automatisch den nächsten freien wählen)</param>
''' <param name="networkPath">UNC-Pfad des Netzwerkshares</param>
''' <param name="blacklist">Komma-getrennte Liste verbotener Laufwerksbuchstaben (z.B. "Y,M,V")</param>
''' <param name="userName">Optionaler Benutzername für Authentifizierung</param>
''' <param name="password">Optionales Passwort für Authentifizierung</param>
''' <param name="persistent">Soll das Mapping persistent sein?</param>
''' <returns>Verwendeter Laufwerksbuchstabe bei Erfolg, String.Empty bei Fehler</returns>
Public Function MapNetworkDrive(driveLetter As String,
networkPath As String,
Optional blacklist As String = "",
Optional userName As String = Nothing,
Optional password As String = Nothing,
Optional persistent As Boolean = True) As String
Try
Dim targetDriveLetter As String = ""
' Szenario 1: Kein Laufwerksbuchstabe angegeben -> Automatische Auswahl
If String.IsNullOrEmpty(driveLetter) Then
_Logger.Info("Kein Laufwerksbuchstabe angegeben - suche nächsten freien Buchstaben...")
targetDriveLetter = GetNextFreeDriveLetter(blacklist)
If String.IsNullOrEmpty(targetDriveLetter) Then
_Logger.Error("❌ Kein freier Laufwerksbuchstabe verfügbar!")
Return String.Empty
End If
_Logger.Info($"Automatisch gewählter Laufwerksbuchstabe: {targetDriveLetter}")
Else
' Szenario 2: Spezifischer Laufwerksbuchstabe angegeben
targetDriveLetter = driveLetter.Trim().ToUpper()
If Not targetDriveLetter.EndsWith(":") Then
targetDriveLetter &= ":"
End If
' ========== NEU: Prüfen ob Laufwerk verfügbar ist ==========
If Not IsDriveLetterAvailable(targetDriveLetter, blacklist) Then
_Logger.Warn($"⚠️ Laufwerk {targetDriveLetter} ist nicht verfügbar (bereits verwendet oder in Blacklist)")
' NICHT abbrechen - weiter versuchen (alte Logik beibehalten)
End If
' ========== ENDE NEU ==========
End If
' ========== NEU: Prüfung ob Laufwerk bereits existiert ==========
Dim driveExists As Boolean = False
Try
Dim driveInfo As New System.IO.DriveInfo(targetDriveLetter)
driveExists = driveInfo.IsReady
Catch
' Laufwerk existiert nicht - das ist OK
driveExists = False
End Try
' Nur trennen wenn Laufwerk wirklich existiert
If driveExists Then
_Logger.Debug($"ℹ️ Laufwerk {targetDriveLetter} existiert bereits - wird getrennt")
DisconnectNetworkDrive(targetDriveLetter, force:=True)
Else
_Logger.Debug($"✓ Laufwerk {targetDriveLetter} existiert noch nicht - kein Disconnect nötig")
End If
' ========== ENDE NEU ==========
' Laufwerk mappen (bestehende Logik)
If MapNetworkDriveInternal(targetDriveLetter, networkPath, userName, password, persistent) Then
_Logger.Info($"✓ Netzlaufwerk {targetDriveLetter} erfolgreich gemappt zu {networkPath}")
Return targetDriveLetter
Else
_Logger.Error($"❌ Fehler beim Mappen von {targetDriveLetter}")
Return String.Empty
End If
Catch ex As Exception
_Logger.Error($"❌ Fehler in MapNetworkDrive: {ex.Message}")
_Logger.Error(ex)
Return String.Empty
End Try
End Function
''' <summary>
''' Interne Methode zum tatsächlichen Mappen eines Netzlaufwerks
''' </summary>
Private Function MapNetworkDriveInternal(driveLetter As String,
networkPath As String,
userName As String,
password As String,
persistent As Boolean) As Boolean
Try
' Erst trennen falls vorhanden (ohne Fehler wenn nicht vorhanden)
DisconnectNetworkDrive(driveLetter, True)
' NETRESOURCE-Struktur vorbereiten
Dim netResource As New NETRESOURCE With {
.dwType = RESOURCETYPE_DISK,
.lpLocalName = driveLetter,
.lpRemoteName = networkPath
}
Dim flags As Integer = If(persistent, CONNECT_UPDATE_PROFILE, 0)
' WICHTIG: Credentials als Nothing übergeben = Verwende aktuelle Windows-Credentials
' Wenn der Share öffentlich oder mit aktuellen Credentials erreichbar ist, funktioniert es
Dim result As Integer = WNetAddConnection2(netResource, password, userName, flags)
Select Case result
Case ERROR_SUCCESS
_Logger.Debug($"✓ Laufwerk {driveLetter} erfolgreich gemappt")
Return True
Case 1326 ' ERROR_LOGON_FAILURE
_Logger.Error($"❌ Authentifizierungsfehler (1326): Anmeldung fehlgeschlagen für [{networkPath}]")
_Logger.Error($" → Der UNC-Pfad erfordert möglicherweise spezielle Credentials")
_Logger.Error($" → Oder der aktuelle Benutzer hat keine Berechtigung")
Return False
Case 53 ' ERROR_BAD_NETPATH
_Logger.Error($"❌ Netzwerkpfad nicht gefunden (53): [{networkPath}]")
Return False
Case 67 ' ERROR_BAD_NET_NAME
_Logger.Error($"❌ Netzwerkname ungültig (67): [{networkPath}]")
Return False
Case 85 ' ERROR_ALREADY_ASSIGNED
_Logger.Warn($"⚠️ Laufwerk {driveLetter} ist bereits zugewiesen (85)")
' Versuche es zu trennen und erneut zu verbinden
DisconnectNetworkDrive(driveLetter, force:=True)
System.Threading.Thread.Sleep(500) ' Kurze Pause
result = WNetAddConnection2(netResource, password, userName, flags)
If result = ERROR_SUCCESS Then
_Logger.Info($"✓ Laufwerk {driveLetter} nach erneutem Versuch erfolgreich gemappt")
Return True
Else
Return False
End If
Case Else
_Logger.Error($"❌ WNetAddConnection2 Error Code: {result}")
Return False
End Select
Catch ex As Exception
_Logger.Error($"Fehler in MapNetworkDriveInternal: {ex.Message}")
_Logger.Error(ex)
Return False
End Try
End Function
''' <summary>
''' Test-Funktion um UNC-Pfad-Zugriff zu prüfen
''' </summary>
Public Function TestUNCAccess(uncPath As String) As Boolean
Try
_Logger.Info($"🔍 Teste Zugriff auf UNC-Pfad: [{uncPath}]")
' Teste ob Pfad existiert und erreichbar ist
If System.IO.Directory.Exists(uncPath) Then
_Logger.Info($"✓ UNC-Pfad ist direkt erreichbar ohne Mapping")
' Teste Lese-Berechtigung
Try
Dim files = System.IO.Directory.GetFiles(uncPath)
_Logger.Info($"✓ Lese-Berechtigung vorhanden ({files.Length} Dateien gefunden)")
Return True
Catch permEx As UnauthorizedAccessException
_Logger.Error($"❌ Keine Lese-Berechtigung: {permEx.Message}")
Return False
End Try
Else
_Logger.Error($"❌ UNC-Pfad nicht erreichbar oder existiert nicht")
Return False
End If
Catch ex As Exception
_Logger.Error($"❌ Fehler beim Testen des UNC-Zugriffs: {ex.Message}")
_Logger.Error(ex)
Return False
End Try
End Function
''' <summary>
''' Trennt ein Netzlaufwerk mit Windows-API
''' </summary>
Public Function DisconnectNetworkDrive(driveLetter As String, Optional force As Boolean = True) As Boolean
Try
' Formatierung sicherstellen
driveLetter = driveLetter.Trim().ToUpper()
If Not driveLetter.EndsWith(":") Then
driveLetter &= ":"
End If
Dim driveExists As Boolean = False
Try
Dim driveInfo As New System.IO.DriveInfo(driveLetter)
driveExists = driveInfo.IsReady
Catch
driveExists = False
End Try
If Not driveExists Then
_Logger.Debug($"ℹ️ Laufwerk {driveLetter} existiert nicht - Disconnect übersprungen")
Return True ' Kein Fehler, da das gewünschte Ergebnis erreicht ist (Laufwerk ist nicht verbunden)
End If
Dim flags As Integer = CONNECT_UPDATE_PROFILE
Dim result As Integer = WNetCancelConnection2(driveLetter, flags, force)
If result = ERROR_SUCCESS Then
_Logger.Debug($"✓ Netzlaufwerk {driveLetter} erfolgreich getrennt")
Return True
ElseIf result = 2250 Then ' ERROR_NOT_CONNECTED
' Von WARN auf DEBUG herabgestuft, da es kein echter Fehler ist
_Logger.Debug($"ℹ️ Laufwerk {driveLetter} war nicht verbunden (Code 2250)")
Return True
ElseIf result = ERROR_ALREADY_ASSIGNED Then
_Logger.Debug($"ℹ️ Netzlaufwerk {driveLetter} war nicht verbunden")
Return True
Else
_Logger.Warn($"⚠️ Warnung beim Trennen von {driveLetter}: Error Code {result}")
Return False
End If
Catch ex As Exception
_Logger.Debug($"⚠️ Fehler beim Trennen von {driveLetter} (ignoriert): {ex.Message}")
Return False
End Try
End Function
''' <summary>
''' Ermittelt alle gemappten Netzlaufwerke
''' </summary>
Public Function GetMappedNetworkDrives() As List(Of NetworkDriveInfo)
Dim mappedDrives As New List(Of NetworkDriveInfo)
Try
For Each drive As IO.DriveInfo In IO.DriveInfo.GetDrives()
If drive.DriveType = IO.DriveType.Network Then
Dim driveInfo As New NetworkDriveInfo With {
.DriveLetter = drive.Name,
.NetworkPath = GetNetworkPath(drive.Name),
.DriveType = drive.DriveType,
.IsReady = drive.IsReady
}
If drive.IsReady Then
Try
driveInfo.TotalSize = drive.TotalSize
driveInfo.FreeSpace = drive.AvailableFreeSpace
Catch ex As Exception
_Logger.Debug($"Konnte Größeninformationen für {drive.Name} nicht ermitteln: {ex.Message}")
End Try
End If
mappedDrives.Add(driveInfo)
End If
Next
_Logger.Debug($"Insgesamt {mappedDrives.Count} Netzlaufwerk(e) gefunden")
Return mappedDrives
Catch ex As Exception
_Logger.Error($"Fehler beim Ermitteln der Netzlaufwerke: {ex.Message}")
_Logger.Error(ex)
Return mappedDrives
End Try
End Function
''' <summary>
''' Ermittelt den UNC-Pfad eines gemappten Laufwerks
''' </summary>
Public Function GetNetworkPath(driveLetter As String) As String
Try
driveLetter = driveLetter.Trim().ToUpper()
If Not driveLetter.EndsWith(":") Then
driveLetter &= ":"
End If
Dim network As Object = CreateObject("WScript.Network")
Dim enumDrives As Object = network.EnumNetworkDrives()
For i As Integer = 0 To enumDrives.Count - 1 Step 2
If enumDrives.Item(i).ToString.Equals(driveLetter, StringComparison.OrdinalIgnoreCase) Then
Return enumDrives.Item(i + 1).ToString()
End If
Next
Return String.Empty
Catch ex As Exception
_Logger.Debug($"Fehler beim Ermitteln des Netzwerkpfads für {driveLetter}: {ex.Message}")
Return String.Empty
End Try
End Function
''' <summary>
''' Prüft ob ein bestimmtes Laufwerk als Netzlaufwerk gemappt ist
''' </summary>
Public Shared Function IsDriveMapped(driveLetter As String) As Boolean
Try
driveLetter = driveLetter.Trim().ToUpper()
If Not driveLetter.EndsWith(":") Then
driveLetter &= ":"
End If
If Not driveLetter.EndsWith("\") Then
driveLetter &= "\"
End If
Dim driveInfo As New IO.DriveInfo(driveLetter)
Return driveInfo.DriveType = IO.DriveType.Network AndAlso driveInfo.IsReady
Catch ex As Exception
Return False
End Try
End Function
''' <summary>
''' Gibt eine formatierte Übersicht aller gemappten Netzlaufwerke zurück
''' </summary>
Public Function GetMappedDrivesInfo() As String
Dim result As New System.Text.StringBuilder()
Dim drives = GetMappedNetworkDrives()
If drives.Count = 0 Then
Return "Keine Netzlaufwerke gefunden."
End If
result.AppendLine($"Gemappte Netzlaufwerke ({drives.Count}):")
result.AppendLine(New String("-"c, 60))
For Each drive In drives
result.AppendLine($"Laufwerk: {drive.DriveLetter}")
result.AppendLine($" Pfad: {drive.NetworkPath}")
result.AppendLine($" Status: {If(drive.IsReady, "Verfügbar", "Nicht verfügbar")}")
If drive.IsReady AndAlso drive.TotalSize > 0 Then
Dim totalGB As Double = drive.TotalSize / (1024.0 ^ 3)
Dim freeGB As Double = drive.FreeSpace / (1024.0 ^ 3)
result.AppendLine($" Größe: {totalGB:N2} GB (Frei: {freeGB:N2} GB)")
End If
result.AppendLine()
Next
Return result.ToString()
End Function
''' <summary>
''' Mappt ein spezifisches Laufwerk (z.B. "V") mit Blacklist-Prüfung
''' </summary>
Public Function MapSpecificDrive(driveLetter As String, blacklist As String, networkPath As String) As Boolean
Try
' Formatierung sicherstellen
driveLetter = driveLetter.Trim().ToUpper().Replace(":", "")
If String.IsNullOrEmpty(driveLetter) OrElse driveLetter.Length <> 1 Then
_Logger.Warn($"⚠️ Ungültiger Laufwerksbuchstabe: [{driveLetter}]")
Return False
End If
Dim driveWithColon As String = driveLetter & ":"
' Prüfen ob Laufwerk verfügbar ist
If Not IsDriveLetterAvailable(driveWithColon, blacklist) Then
_Logger.Warn($"⚠️ Laufwerk {driveWithColon} ist nicht verfügbar (bereits verwendet oder in Blacklist)")
Return False
End If
' UNC-Pfad vorbereiten (ohne abschließenden Backslash)
Dim uncPath As String = networkPath.TrimEnd("\"c)
' Laufwerk mappen (OHNE Credentials, persistent=False für temporäres Mapping)
Dim result = MapNetworkDrive(driveWithColon, uncPath, blacklist, userName:=Nothing, password:=Nothing, persistent:=False)
If Not String.IsNullOrEmpty(result) Then
_Logger.Debug($"✓ Laufwerk {driveWithColon} erfolgreich gemappt zu [{uncPath}]")
Return True
Else
_Logger.Error($"❌ Fehler beim Mappen von {driveWithColon}")
Return False
End If
Catch ex As Exception
_Logger.Error($"Fehler in MapSpecificDrive: {ex.Message}")
_Logger.Error(ex)
Return False
End Try
End Function
''' <summary>
''' Mappt automatisch den nächsten freien Laufwerksbuchstaben (Z→A)
''' </summary>
Public Function MapDriveAutomatic(blacklist As String, networkPath As String) As String
Try
' UNC-Pfad vorbereiten (ohne abschließenden Backslash)
Dim uncPath As String = networkPath.TrimEnd("\"c)
_Logger.Debug($"🔍 Suche automatisch freien Laufwerksbuchstaben...")
_Logger.Debug($" Blacklist: [{blacklist}]")
_Logger.Debug($" Netzwerkpfad: [{uncPath}]")
' Automatisches Mapping (leer = automatische Auswahl, persistent=False)
Dim result = MapNetworkDrive("", uncPath, blacklist, userName:=Nothing, password:=Nothing, persistent:=False)
If Not String.IsNullOrEmpty(result) Then
_Logger.Debug($"✓ Automatisch gewähltes Laufwerk: {result}")
Return result
Else
_Logger.Error($"❌ Kein freier Laufwerksbuchstabe verfügbar")
Return String.Empty
End If
Catch ex As Exception
_Logger.Error($"Fehler in MapDriveAutomatic: {ex.Message}")
_Logger.Error(ex)
Return String.Empty
End Try
End Function
End Class

View File

@@ -2,7 +2,6 @@
Imports System.Web Imports System.Web
Public Module ModuleExtensions Public Module ModuleExtensions
Public TEMP_DOCUMENT_FOLDER As String = System.IO.Path.Combine(System.IO.Path.GetTempPath(), "Documents")
Const UnixEraStartTicks As Long = 621355968000000000 Const UnixEraStartTicks As Long = 621355968000000000
' ====================================================== ' ======================================================

View File

@@ -12,8 +12,8 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyDescription("basisfunktionalitäten für DigitalData Anwendungen")> <Assembly: AssemblyDescription("basisfunktionalitäten für DigitalData Anwendungen")>
<Assembly: AssemblyCompany("Digital Data GmbH")> <Assembly: AssemblyCompany("Digital Data GmbH")>
<Assembly: AssemblyProduct("Modules.")> <Assembly: AssemblyProduct("Modules.")>
<Assembly: AssemblyCopyright("Copyright © 2026")> <Assembly: AssemblyCopyright("Copyright © 2025")>
<Assembly: AssemblyTrademark("")> <Assembly: AssemblyTrademark("1.3.9.0")>
<Assembly: ComVisible(False)> <Assembly: ComVisible(False)>
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' indem Sie "*" wie unten gezeigt eingeben: ' indem Sie "*" wie unten gezeigt eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.0.0.0")> <Assembly: AssemblyVersion("1.3.9.0")>
<Assembly: AssemblyFileVersion("2.0.0.0")> <Assembly: AssemblyFileVersion("1.3.9.0")>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="NLog" version="5.0.5" targetFramework="net462" /> <package id="DigitalData.Modules.Logging" version="2.6.5" targetFramework="net462" />
<package id="NLog" version="5.0.5" targetFramework="net461" />
<package id="NuGet.CommandLine" version="6.13.2" targetFramework="net462" developmentDependency="true" /> <package id="NuGet.CommandLine" version="6.13.2" targetFramework="net462" developmentDependency="true" />
</packages> </packages>

View File

@@ -17,38 +17,6 @@
<assemblyIdentity name="FirebirdSql.Data.FirebirdClient" publicKeyToken="3750abcc3150b00c" culture="neutral" /> <assemblyIdentity name="FirebirdSql.Data.FirebirdClient" publicKeyToken="3750abcc3150b00c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.5.0.0" newVersion="7.5.0.0" /> <bindingRedirect oldVersion="0.0.0.0-7.5.0.0" newVersion="7.5.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.3.0" newVersion="6.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.3" newVersion="4.1.1.3" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.4.0" newVersion="4.2.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
</configuration> </configuration>

View File

@@ -47,8 +47,17 @@
<OptionInfer>On</OptionInfer> <OptionInfer>On</OptionInfer>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="DigitalData.Modules.Logging"> <Reference Include="DigitalData.Modules.Base, Version=1.3.8.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath> <HintPath>..\packages\DigitalData.Modules.Base.1.3.8\lib\net462\DigitalData.Modules.Base.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Database, Version=2.3.5.4, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DigitalData.Modules.Database.2.3.5.4\lib\net462\DigitalData.Modules.Database.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Encryption, Version=1.3.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DigitalData.Modules.Encryption.1.3.1\lib\net462\DigitalData.Modules.Encryption.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DigitalData.Modules.Logging.2.6.5\lib\net462\DigitalData.Modules.Logging.dll</HintPath>
</Reference> </Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath> <HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
@@ -62,102 +71,27 @@
<Reference Include="FirebirdSql.Data.FirebirdClient, Version=7.5.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c, processorArchitecture=MSIL"> <Reference Include="FirebirdSql.Data.FirebirdClient, Version=7.5.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c, processorArchitecture=MSIL">
<HintPath>..\packages\FirebirdSql.Data.FirebirdClient.7.5.0\lib\net452\FirebirdSql.Data.FirebirdClient.dll</HintPath> <HintPath>..\packages\FirebirdSql.Data.FirebirdClient.7.5.0\lib\net452\FirebirdSql.Data.FirebirdClient.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.10.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Extensions.Configuration.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Extensions.Configuration.Abstractions.8.0.0\lib\net462\Microsoft.Extensions.Configuration.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.DependencyInjection, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.10.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.10.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Http, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Extensions.Http.8.0.0\lib\net462\Microsoft.Extensions.Http.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Logging, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Extensions.Logging.8.0.0\lib\net462\Microsoft.Extensions.Logging.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.8.0.0\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Options, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Extensions.Options.8.0.0\lib\net462\Microsoft.Extensions.Options.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Primitives, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Extensions.Primitives.8.0.0\lib\net462\Microsoft.Extensions.Primitives.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath> <HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="ReC.Client, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ReC.Client.2.0.0-beta\lib\net462\ReC.Client.dll</HintPath>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.DataAnnotations" /> <Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Data.Odbc, Version=6.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Data.Odbc, Version=6.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.Odbc.6.0.1\lib\net461\System.Data.Odbc.dll</HintPath> <HintPath>..\packages\System.Data.Odbc.6.0.1\lib\net461\System.Data.Odbc.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Diagnostics.DiagnosticSource, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.8.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
</Reference>
<Reference Include="System.IO.Compression" /> <Reference Include="System.IO.Compression" />
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http, Version=4.1.1.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Net.Http.Json.8.0.0\lib\net462\System.Net.Http.Json.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.1.2\lib\net462\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization" /> <Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net461\System.Security.Cryptography.Algorithms.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
</Reference>
<Reference Include="System.ServiceModel" /> <Reference Include="System.ServiceModel" />
<Reference Include="System.Text.Encodings.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
</Reference>
<Reference Include="System.Text.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Json.8.0.0\lib\net462\System.Text.Json.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.6.3\lib\net462\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Transactions" /> <Reference Include="System.Transactions" />
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Import Include="Microsoft.VisualBasic" /> <Import Include="Microsoft.VisualBasic" />
@@ -215,14 +149,7 @@
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Base\Base.vbproj"> <Content Include="README.txt" />
<Project>{6ea0c51f-c2b1-4462-8198-3de0b32b74f8}</Project>
<Name>Base</Name>
</ProjectReference>
<ProjectReference Include="..\Database\Database.vbproj">
<Project>{eaf0ea75-5fa7-485d-89c7-b2d843b03a96}</Project>
<Name>Database</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup> <PropertyGroup>

View File

@@ -36,9 +36,8 @@ Public Class ConfigDbFunct
Dim oDatabase As MSSQLServer = New MSSQLServer(pLogConfig, oDecryptedConnectionString) Dim oDatabase As MSSQLServer = New MSSQLServer(pLogConfig, oDecryptedConnectionString)
Dim oSql As String = "SELECT LICENSE FROM TBDD_3RD_PARTY_MODULES WHERE NAME = '" + pProductName + "' AND ACTIVE = 1 AND VERSION = '" + pVersion + "'" Dim oSql As String = "SELECT LICENSE FROM TBDD_3RD_PARTY_MODULES WHERE NAME = '" + pProductName + "' AND ACTIVE = 1 AND VERSION = '" + pVersion + "'"
oLogger.Debug(String.Format("oSql in GetProductLicense: {0}", oSql))
Dim oLicenseString As String = oDatabase.GetScalarValue(oSql) Dim oLicenseString As String = oDatabase.GetScalarValue(oSql)
Return oLicenseString Return oLicenseString
Catch ex As Exception Catch ex As Exception

View File

@@ -235,11 +235,13 @@ Public Class ConfigManager(Of T)
Try Try
Dim oAppConfig = ReadFromFile(_AppConfigPath) Dim oAppConfig = ReadFromFile(_AppConfigPath)
CopyValues(oAppConfig, Config) CopyValues(oAppConfig, Config)
_Logger.Info("AppConfig exists and will be used. [{0}]", _AppConfigPath) _Logger.Info("AppConfig exists and will be used. [{0}]", _AppConfigPath)
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
_Logger.Warn("ApplicationConfig could not be loaded! Path: [{0}] Reason: {1}", _AppConfigPath, ex.Message) _Logger.Warn("ApplicationConfig could not be loaded!")
End Try End Try
_WriteAllValuesToUserConfig = False _WriteAllValuesToUserConfig = False
Else Else
_Logger.Debug("ApplicationConfig does not exist.") _Logger.Debug("ApplicationConfig does not exist.")

View File

@@ -12,8 +12,8 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyDescription("Stellt Module für die Konfiguration von Produkten bereit")> <Assembly: AssemblyDescription("Stellt Module für die Konfiguration von Produkten bereit")>
<Assembly: AssemblyCompany("Digital Data GmbH, Heuchelheim")> <Assembly: AssemblyCompany("Digital Data GmbH, Heuchelheim")>
<Assembly: AssemblyProduct("Modules.Config")> <Assembly: AssemblyProduct("Modules.Config")>
<Assembly: AssemblyCopyright("Copyright © 2026")> <Assembly: AssemblyCopyright("Copyright © 2025")>
<Assembly: AssemblyTrademark("1.5.0.0")> <Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)> <Assembly: ComVisible(False)>
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.5.0.0")> <Assembly: AssemblyVersion("1.3.0.0")>
<Assembly: AssemblyFileVersion("1.5.0.0")> <Assembly: AssemblyFileVersion("1.3.0.0")>

View File

@@ -15,7 +15,7 @@ Option Explicit On
Namespace My Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0"), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase Inherits Global.System.Configuration.ApplicationSettingsBase

5
Config/README.txt Normal file
View File

@@ -0,0 +1,5 @@
BASE MODULE
===========
This module is intended for often used constants and datastructures.
Therefor it is important that this module does not have any dependencies on other modules!!

View File

@@ -1,33 +1,12 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="DigitalData.Modules.Base" version="1.3.8" targetFramework="net462" />
<package id="DigitalData.Modules.Database" version="2.3.5.4" targetFramework="net462" />
<package id="DigitalData.Modules.Encryption" version="1.3.1" targetFramework="net462" />
<package id="DigitalData.Modules.Logging" version="2.6.5" targetFramework="net462" />
<package id="EntityFramework" version="6.4.4" targetFramework="net462" /> <package id="EntityFramework" version="6.4.4" targetFramework="net462" />
<package id="EntityFramework.Firebird" version="6.4.0" targetFramework="net462" /> <package id="EntityFramework.Firebird" version="6.4.0" targetFramework="net462" />
<package id="FirebirdSql.Data.FirebirdClient" version="7.5.0" targetFramework="net462" /> <package id="FirebirdSql.Data.FirebirdClient" version="7.5.0" targetFramework="net462" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="10.0.0" targetFramework="net462" />
<package id="Microsoft.Extensions.Configuration.Abstractions" version="8.0.0" targetFramework="net462" />
<package id="Microsoft.Extensions.DependencyInjection" version="10.0.0" targetFramework="net462" />
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="10.0.0" targetFramework="net462" />
<package id="Microsoft.Extensions.Http" version="8.0.0" targetFramework="net462" />
<package id="Microsoft.Extensions.Logging" version="8.0.0" targetFramework="net462" />
<package id="Microsoft.Extensions.Logging.Abstractions" version="8.0.0" targetFramework="net462" />
<package id="Microsoft.Extensions.Options" version="8.0.0" targetFramework="net462" />
<package id="Microsoft.Extensions.Primitives" version="8.0.0" targetFramework="net462" />
<package id="NLog" version="5.0.5" targetFramework="net461" /> <package id="NLog" version="5.0.5" targetFramework="net461" />
<package id="ReC.Client" version="2.0.0-beta" targetFramework="net462" />
<package id="System.Buffers" version="4.5.1" targetFramework="net462" />
<package id="System.Data.Odbc" version="6.0.1" targetFramework="net462" /> <package id="System.Data.Odbc" version="6.0.1" targetFramework="net462" />
<package id="System.Diagnostics.DiagnosticSource" version="8.0.0" targetFramework="net462" />
<package id="System.Memory" version="4.5.5" targetFramework="net462" />
<package id="System.Net.Http" version="4.3.4" targetFramework="net462" />
<package id="System.Net.Http.Json" version="8.0.0" targetFramework="net462" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net462" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.1.2" targetFramework="net462" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net462" />
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net462" />
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net462" />
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net462" />
<package id="System.Text.Encodings.Web" version="8.0.0" targetFramework="net462" />
<package id="System.Text.Json" version="8.0.0" targetFramework="net462" />
<package id="System.Threading.Tasks.Extensions" version="4.6.3" targetFramework="net462" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
</packages> </packages>

View File

@@ -1,6 +1,5 @@
Imports System.ComponentModel Imports System.ComponentModel
Imports System.Data.SqlClient Imports System.Data.SqlClient
Imports System.Threading
Imports DigitalData.Modules.Encryption Imports DigitalData.Modules.Encryption
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
@@ -178,7 +177,7 @@ Public Class MSSQLServer
End If End If
Try Try
Dim oTable As DataTable = GetDatatable($"SELECT * FROM TBDD_CONNECTION WITH (NOLOCK) WHERE GUID = {pConnectionId}") Dim oTable As DataTable = GetDatatable($"SELECT * FROM TBDD_CONNECTION WHERE GUID = {pConnectionId}")
If oTable.Rows.Count = 1 Then If oTable.Rows.Count = 1 Then
Dim oRow As DataRow = oTable.Rows(0) Dim oRow As DataRow = oTable.Rows(0)
Dim oProvider = oRow.Item("SQL_PROVIDER").ToString.ToUpper Dim oProvider = oRow.Item("SQL_PROVIDER").ToString.ToUpper
@@ -255,7 +254,6 @@ Public Class MSSQLServer
Return pConnection Return pConnection
Catch ex As Exception Catch ex As Exception
Logger.Error("Error while opening Connection!") Logger.Error("Error while opening Connection!")
Logger.Error(ex) Logger.Error(ex)
@@ -315,19 +313,6 @@ Public Class MSSQLServer
End Using End Using
End Function End Function
Public Function GetDatatableWithoutTransaction(pSqlCommand As String, Optional pTimeout As Integer = 120) As DataTable Implements IDatabase.GetDatatableWithoutTransaction
Using oSqlConnection = GetSQLConnection()
Return GetDatatableWithConnectionObject(pSqlCommand, oSqlConnection, TransactionMode.NoTransaction, Nothing, pTimeout)
End Using
End Function
Public Function GetDatatableWithoutTransaction(pSqlCommand As SqlCommand, Optional pTimeout As Integer = 120) As DataTable Implements IDatabase.GetDatatableWithoutTransaction
Using oSqlConnection = GetSQLConnection()
Return GetDatatableWithConnectionObject(pSqlCommand, oSqlConnection, TransactionMode.NoTransaction, Nothing, pTimeout)
End Using
End Function
''' <summary> ''' <summary>
''' Returns a datatable for a SQL Statement ''' Returns a datatable for a SQL Statement
''' </summary> ''' </summary>
@@ -355,10 +340,6 @@ Public Class MSSQLServer
Return Await Task.Run(Function() GetDatatable(pSqlCommandObject, pTimeout)) Return Await Task.Run(Function() GetDatatable(pSqlCommandObject, pTimeout))
End Function End Function
Public Async Function GetDatatableWithoutTransactionAsync(pSqlCommand As String, Optional pTimeout As Integer = Constants.DEFAULT_TIMEOUT) As Task(Of DataTable)
Return Await Task.Run(Function() GetDatatableWithoutTransaction(pSqlCommand, pTimeout))
End Function
Public Function GetDatatableWithConnection(pSqlCommand As String, pConnectionString As String, Optional Timeout As Integer = Constants.DEFAULT_TIMEOUT) As DataTable Public Function GetDatatableWithConnection(pSqlCommand As String, pConnectionString As String, Optional Timeout As Integer = Constants.DEFAULT_TIMEOUT) As DataTable
Using oConnection = GetConnection(pConnectionString) Using oConnection = GetConnection(pConnectionString)
Return GetDatatableWithConnectionObject(pSqlCommand, oConnection, pTimeout:=Timeout) Return GetDatatableWithConnectionObject(pSqlCommand, oConnection, pTimeout:=Timeout)
@@ -494,30 +475,14 @@ Public Class MSSQLServer
pSqlCommandObject.Connection = pSqlConnection pSqlCommandObject.Connection = pSqlConnection
pSqlCommandObject.Transaction = oTransaction pSqlCommandObject.Transaction = oTransaction
pSqlCommandObject.CommandTimeout = pTimeout pSqlCommandObject.CommandTimeout = pTimeout
' Sicherstellen, dass Nothing-Werte als DBNull übergeben werden
For Each oParam As SqlParameter In pSqlCommandObject.Parameters
If oParam.Value Is Nothing Then
Logger.Warn("ExecuteNonQueryWithConnectionObject: Parameter [{0}] was Nothing - converting to DBNull.Value", oParam.ParameterName)
oParam.Value = DBNull.Value
End If
Next
pSqlCommandObject.ExecuteNonQuery() pSqlCommandObject.ExecuteNonQuery()
Return True Return True
Catch ex As SqlException
Logger.Warn("ExecuteNonQueryWithConnectionObject: SQL Error while executing command: [{0}]", pSqlCommandObject.CommandText)
Logger.Warn("Parameters: [{0}]", GetParameterListAsString(pSqlCommandObject))
For Each sqlError As SqlError In ex.Errors
Logger.Error("SQL Error #{0} (Severity {1}, State {2}, Line {3}): {4}",
sqlError.Number, sqlError.Class, sqlError.State, sqlError.LineNumber, sqlError.Message)
Next
Return False
Catch ex As Exception Catch ex As Exception
Logger.Warn("Unexpected Error in ExecuteNonQueryWithConnectionObject while executing command: [{0}]", pSqlCommandObject.CommandText) Dim omsg = $"Unexpected Error in ExecuteNonQueryWithConnectionObject while executing command: [{pSqlCommandObject.CommandText}]"
Logger.Warn("Parameters: [{0}]", GetParameterListAsString(pSqlCommandObject)) Logger.Warn(omsg)
Logger.Error(ex) Logger.Error(ex)
Return False Return False
Finally Finally
MaybeCommitTransaction(oTransaction, pTransactionMode) MaybeCommitTransaction(oTransaction, pTransactionMode)
@@ -694,5 +659,4 @@ Public Class MSSQLServer
Return oParamString Return oParamString
End Function End Function
End Class End Class

View File

@@ -151,7 +151,7 @@ Public Class Oracle
End Try End Try
End Function End Function
Public Function GetDatatable(SqlCommand As System.Data.SqlClient.SqlCommand, Optional Timeout As Integer = 120) As DataTable Implements IDatabase.GetDatatable Public Function GetDatatable(SqlCommand As SqlClient.SqlCommand, Optional Timeout As Integer = 120) As DataTable Implements IDatabase.GetDatatable
Throw New NotImplementedException() Throw New NotImplementedException()
End Function End Function
@@ -251,11 +251,5 @@ Public Class Oracle
End Try End Try
End Function End Function
Public Function GetDatatableWithoutTransaction(SqlCommand As String, Optional Timeout As Integer = 120) As DataTable Implements IDatabase.GetDatatableWithoutTransaction
Throw New NotImplementedException()
End Function
Public Function GetDatatableWithoutTransaction(SqlCommand As SqlClient.SqlCommand, Optional Timeout As Integer = 120) As DataTable Implements IDatabase.GetDatatableWithoutTransaction
Throw New NotImplementedException()
End Function
End Class End Class

View File

@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<configSections> <configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.21.1, Culture=neutral, PublicKeyToken=89b483f429c47342" />
</configSections> </configSections>
<entityFramework> <entityFramework>
<defaultConnectionFactory type="EntityFramework.Firebird.FbConnectionFactory, EntityFramework.Firebird" /> <defaultConnectionFactory type="EntityFramework.Firebird.FbConnectionFactory, EntityFramework.Firebird" />
@@ -12,29 +11,13 @@
<provider invariantName="FirebirdSql.Data.FirebirdClient" type="EntityFramework.Firebird.FbProviderServices, EntityFramework.Firebird" /> <provider invariantName="FirebirdSql.Data.FirebirdClient" type="EntityFramework.Firebird.FbProviderServices, EntityFramework.Firebird" />
</providers> </providers>
</entityFramework> </entityFramework>
<runtime> <runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="FirebirdSql.Data.FirebirdClient" publicKeyToken="3750abcc3150b00c" culture="neutral" /> <assemblyIdentity name="FirebirdSql.Data.FirebirdClient" publicKeyToken="3750abcc3150b00c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.5.0.0" newVersion="7.5.0.0" /> <bindingRedirect oldVersion="0.0.0.0-7.5.0.0" newVersion="7.5.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
<startup> <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /></startup></configuration>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup>
<system.data>
<DbProviderFactories>
<remove invariant="Oracle.ManagedDataAccess.Client" />
<add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.21.1, Culture=neutral, PublicKeyToken=89b483f429c47342" />
</DbProviderFactories>
</system.data>
</configuration>

View File

@@ -47,9 +47,11 @@
<OptionInfer>On</OptionInfer> <OptionInfer>On</OptionInfer>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="DigitalData.Modules.Encryption, Version=1.3.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DigitalData.Modules.Encryption.1.3.1\lib\net462\DigitalData.Modules.Encryption.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <HintPath>..\packages\DigitalData.Modules.Logging.2.6.5\lib\net462\DigitalData.Modules.Logging.dll</HintPath>
<HintPath>..\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference> </Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath> <HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
@@ -63,55 +65,24 @@
<Reference Include="FirebirdSql.Data.FirebirdClient, Version=7.5.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c, processorArchitecture=MSIL"> <Reference Include="FirebirdSql.Data.FirebirdClient, Version=7.5.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c, processorArchitecture=MSIL">
<HintPath>..\packages\FirebirdSql.Data.FirebirdClient.7.5.0\lib\net452\FirebirdSql.Data.FirebirdClient.dll</HintPath> <HintPath>..\packages\FirebirdSql.Data.FirebirdClient.7.5.0\lib\net452\FirebirdSql.Data.FirebirdClient.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath> <HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="Oracle.ManagedDataAccess, Version=4.122.21.1, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=MSIL"> <Reference Include="Oracle.ManagedDataAccess">
<HintPath>..\packages\Oracle.ManagedDataAccess.21.15.0\lib\net462\Oracle.ManagedDataAccess.dll</HintPath> <HintPath>P:\Visual Studio Projekte\Bibliotheken\Oracle.ManagedDataAccess.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.DataAnnotations" /> <Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Data.Odbc, Version=6.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Data.Odbc, Version=6.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.Odbc.6.0.1\lib\net461\System.Data.Odbc.dll</HintPath> <HintPath>..\packages\System.Data.Odbc.6.0.1\lib\net461\System.Data.Odbc.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Formats.Asn1, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Formats.Asn1.8.0.0\lib\net462\System.Formats.Asn1.dll</HintPath>
</Reference>
<Reference Include="System.IO.Compression" /> <Reference Include="System.IO.Compression" />
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization" /> <Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" /> <Reference Include="System.ServiceModel" />
<Reference Include="System.Text.Encodings.Web, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Encodings.Web.6.0.0\lib\net461\System.Text.Encodings.Web.dll</HintPath>
</Reference>
<Reference Include="System.Text.Json, Version=6.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Json.6.0.1\lib\net461\System.Text.Json.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Transactions" /> <Reference Include="System.Transactions" />
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
@@ -178,20 +149,8 @@
<CustomToolNamespace>My</CustomToolNamespace> <CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput> <LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None> </None>
<None Include="Oracle.DataAccess.Common.Configuration.Section.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Oracle.ManagedDataAccess.Client.Configuration.Section.xsd">
<SubType>Designer</SubType>
</None>
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Encryption\Encryption.vbproj">
<Project>{8a8f20fc-c46e-41ac-bee7-218366cfff99}</Project>
<Name>Encryption</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <PropertyGroup>
@@ -199,11 +158,9 @@
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" /> <Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" /> <Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
<Error Condition="!Exists('..\packages\System.Text.Json.6.0.1\build\System.Text.Json.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Text.Json.6.0.1\build\System.Text.Json.targets'))" />
</Target> </Target>
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" /> <Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent> <PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<Import Project="..\packages\System.Text.Json.6.0.1\build\System.Text.Json.targets" Condition="Exists('..\packages\System.Text.Json.6.0.1\build\System.Text.Json.targets')" />
</Project> </Project>

View File

@@ -11,9 +11,6 @@ Public Interface IDatabase
Function GetDatatable(SqlCommand As String, Optional Timeout As Integer = Constants.DEFAULT_TIMEOUT) As DataTable Function GetDatatable(SqlCommand As String, Optional Timeout As Integer = Constants.DEFAULT_TIMEOUT) As DataTable
Function GetDatatable(SqlCommand As SqlCommand, Optional Timeout As Integer = Constants.DEFAULT_TIMEOUT) As DataTable Function GetDatatable(SqlCommand As SqlCommand, Optional Timeout As Integer = Constants.DEFAULT_TIMEOUT) As DataTable
Function GetDatatableWithoutTransaction(SqlCommand As String, Optional Timeout As Integer = Constants.DEFAULT_TIMEOUT) As DataTable
Function GetDatatableWithoutTransaction(SqlCommand As SqlCommand, Optional Timeout As Integer = Constants.DEFAULT_TIMEOUT) As DataTable
Function ExecuteNonQuery(SQLCommand As String, Timeout As Integer) As Boolean Function ExecuteNonQuery(SQLCommand As String, Timeout As Integer) As Boolean
Function ExecuteNonQuery(SQLCommand As String) As Boolean Function ExecuteNonQuery(SQLCommand As String) As Boolean

View File

@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyCompany("Digital Data")> <Assembly: AssemblyCompany("Digital Data")>
<Assembly: AssemblyProduct("Modules.Database")> <Assembly: AssemblyProduct("Modules.Database")>
<Assembly: AssemblyCopyright("Copyright © 2025")> <Assembly: AssemblyCopyright("Copyright © 2025")>
<Assembly: AssemblyTrademark("2.5.0.0")> <Assembly: AssemblyTrademark("2.3.6.0")>
<Assembly: ComVisible(False)> <Assembly: ComVisible(False)>
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.5.0.0")> <Assembly: AssemblyVersion("2.3.6.0")>
<Assembly: AssemblyFileVersion("2.4.0.0")> <Assembly: AssemblyFileVersion("2.3.6.0")>

View File

@@ -15,7 +15,7 @@ Option Explicit On
Namespace My Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0"), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase Inherits Global.System.Configuration.ApplicationSettingsBase

View File

@@ -1,138 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:simpleType name="parameterDirection">
<xs:restriction base="xs:string">
<xs:enumeration value="Output"/>
<xs:enumeration value="InputOutput"/>
<xs:enumeration value="ReturnValue"/>
<xs:enumeration value="Implicit"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="customBoolean">
<xs:restriction base="xs:string">
<xs:enumeration value="true"/>
<xs:enumeration value="false"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ONSParameters">
<xs:restriction base="xs:string">
<xs:enumeration value="nodeList"/>
<!--<xs:enumeration value="walletFile"/>
<xs:enumeration value="walletPassword"/>-->
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ONSModeValues">
<xs:restriction base="xs:string">
<xs:enumeration value="local"/>
<xs:enumeration value="remote"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="datatype">
<xs:restriction base="xs:string">
<xs:enumeration value="System.Binary"/>
<xs:enumeration value="System.Boolean"/>
<xs:enumeration value="System.Byte"/>
<xs:enumeration value="System.Byte[]"/>
<xs:enumeration value="System.Char"/>
<xs:enumeration value="System.DateTime"/>
<xs:enumeration value="System.DateTimeOffset"/>
<xs:enumeration value="System.Decimal"/>
<xs:enumeration value="System.Double"/>
<xs:enumeration value="System.Guid"/>
<xs:enumeration value="System.Int16"/>
<xs:enumeration value="System.Int32"/>
<xs:enumeration value="System.Int64"/>
<xs:enumeration value="System.SByte"/>
<xs:enumeration value="System.Single"/>
<xs:enumeration value="System.String"/>
<xs:enumeration value="System.TimeSpan"/>
<xs:enumeration value="System.UInt16"/>
<xs:enumeration value="System.UInt32"/>
<xs:enumeration value="System.UInt64"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="providerType">
<xs:restriction base="xs:string">
<xs:enumeration value="BFile"/>
<xs:enumeration value="BinaryFloat"/>
<xs:enumeration value="BinaryDouble"/>
<xs:enumeration value="Blob"/>
<xs:enumeration value="Byte"/>
<xs:enumeration value="Char"/>
<xs:enumeration value="Clob"/>
<xs:enumeration value="Date"/>
<xs:enumeration value="Decimal"/>
<xs:enumeration value="Double"/>
<xs:enumeration value="Int16"/>
<xs:enumeration value="Int32"/>
<xs:enumeration value="Int64"/>
<xs:enumeration value="IntervalDS"/>
<xs:enumeration value="IntervalYM"/>
<xs:enumeration value="Long"/>
<xs:enumeration value="LongRaw"/>
<xs:enumeration value="NChar"/>
<xs:enumeration value="NClob"/>
<xs:enumeration value="NVarchar2"/>
<xs:enumeration value="Object"/>
<xs:enumeration value="Raw"/>
<xs:enumeration value="Single"/>
<xs:enumeration value="TimeStamp"/>
<xs:enumeration value="TimeStampLTZ"/>
<xs:enumeration value="TimeStampTZ"/>
<xs:enumeration value="Varchar2"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="nativeDataType">
<xs:restriction base="xs:string">
<xs:enumeration value="BFile"/>
<xs:enumeration value="Binary_Float"/>
<xs:enumeration value="Binary_Double"/>
<xs:enumeration value="Blob"/>
<xs:enumeration value="Char"/>
<xs:enumeration value="Clob"/>
<xs:enumeration value="Date"/>
<xs:enumeration value="Number"/>
<xs:enumeration value="Interval Day To Second"/>
<xs:enumeration value="Interval Year To Month"/>
<xs:enumeration value="Long"/>
<xs:enumeration value="Long Raw"/>
<xs:enumeration value="NChar"/>
<xs:enumeration value="NClob"/>
<xs:enumeration value="NVarchar2"/>
<xs:enumeration value="Raw"/>
<xs:enumeration value="Rowid"/>
<xs:enumeration value="Timestamp"/>
<xs:enumeration value="Timestamp With Local Time Zone"/>
<xs:enumeration value="Timestamp With Time Zone"/>
<xs:enumeration value="URowid"/>
<xs:enumeration value="UserDefinedType"/>
<xs:enumeration value="Varchar2"/>
<xs:enumeration value="XmlType"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="providerDBType">
<xs:restriction base="xs:string">
<xs:enumeration value="AnsiString"/>
<xs:enumeration value="AnsiStringFixedLength"/>
<xs:enumeration value="Binary"/>
<xs:enumeration value="Byte"/>
<xs:enumeration value="Date"/>
<xs:enumeration value="DateTime"/>
<xs:enumeration value="DateTimeOffset"/>
<xs:enumeration value="Decimal"/>
<xs:enumeration value="Double"/>
<xs:enumeration value="Int16"/>
<xs:enumeration value="Int32"/>
<xs:enumeration value="Int64"/>
<xs:enumeration value="Object"/>
<xs:enumeration value="Single"/>
<xs:enumeration value="String"/>
<xs:enumeration value="StringFixedLength"/>
<xs:enumeration value="Time"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>

View File

@@ -1,221 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:include schemaLocation="Oracle.DataAccess.Common.Configuration.Section.xsd"/>
<xs:element name="oracle.manageddataaccess.client" >
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="version" type="odpmversiontype" minOccurs="0" />
</xs:choice>
</xs:complexType>
</xs:element>
<xs:complexType name="odpmversiontype">
<xs:complexContent>
<xs:extension base="odpmparameters">
<xs:attribute name="number" type="xs:string" use="required" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="odpmparameters">
<xs:all>
<xs:element minOccurs="0" name="settings">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="setting">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="value" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="udtMappings">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="udtMapping">
<xs:complexType>
<xs:attribute name="typeName" type="xs:string" use="required" />
<xs:attribute name="factoryName" type="xs:string" use="required" />
<xs:attribute name="dataSource" type="xs:string" use="required" />
<xs:attribute name="schemaName" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="LDAPsettings">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="LDAPsetting">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="value" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="distributedTransaction">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="setting">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="value" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="dataSources">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="dataSource">
<xs:complexType>
<xs:attribute name="alias" type="xs:string" use="required" />
<xs:attribute name="descriptor" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="connectionPools">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="connectionPool">
<xs:complexType>
<xs:attribute name="connectionString" type="xs:string" use="required" />
<xs:attribute name="poolName" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="edmMappings">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="edmMapping">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="add">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="precision" type="xs:int" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="dataType" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" maxOccurs="unbounded" name="edmNumberMapping">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="add">
<xs:complexType>
<xs:attribute name="NETType" type="xs:string" use="required" />
<xs:attribute name="MinPrecision" type="xs:int" use="required" />
<xs:attribute name="MaxPrecision" type="xs:int" use="required" />
<xs:attribute name="DBType" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="implicitRefCursor">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="storedProcedure">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="1" name="refCursor">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="1" name="bindInfo">
<xs:complexType>
<xs:attribute name="mode" type="parameterDirection" use="required" />
</xs:complexType>
</xs:element>
<xs:element maxOccurs="unbounded" minOccurs="0" name="metadata">
<xs:complexType>
<xs:attribute name="columnOrdinal" type="xs:int" use="required" />
<xs:attribute name="columnName" type="xs:string" use="required" />
<xs:attribute name="baseColumnName" type="xs:string" use="optional" />
<xs:attribute name="baseSchemaName" type="xs:string" use="optional" />
<xs:attribute name="baseTableName" type="xs:string" use="optional" />
<xs:attribute name="providerType" type="providerType" use="optional" />
<xs:attribute name="columnSize" type="xs:int" use="optional" />
<xs:attribute name="numericPrecision" type="xs:int" use="optional" />
<xs:attribute name="numericScale" type="xs:int" use="optional" />
<xs:attribute name="isUnique" type="customBoolean" use="optional" />
<xs:attribute name="isKey" type="customBoolean" use="optional" />
<xs:attribute name="isRowID" type="customBoolean" use="optional" />
<xs:attribute name="dataType" type="datatype" use="optional" />
<xs:attribute name="allowDBNull" type="customBoolean" use="optional" />
<xs:attribute name="isAliased" type="customBoolean" use="optional" />
<xs:attribute name="isByteSemantic" type="customBoolean" use="optional" />
<xs:attribute name="isExpression" type="customBoolean" use="optional" />
<xs:attribute name="isHidden" type="customBoolean" use="optional" />
<xs:attribute name="isReadOnly" type="customBoolean" use="optional" />
<xs:attribute name="isLong" type="customBoolean" use="optional" />
<xs:attribute name="udtTypeName" type="xs:string" use="optional" />
<xs:attribute name="nativeDataType" type="nativeDataType" use="optional" />
<xs:attribute name="providerDBType" type="providerDBType" use="optional" />
<xs:attribute name="objectName" type="xs:string" use="optional" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="optional" />
<xs:attribute name="position" type="xs:int" use="optional" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="schema" type="xs:string" use="optional" />
<xs:attribute name="name" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="onsConfig">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="settings">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="2" minOccurs="0" name="setting">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="value" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" maxOccurs="unbounded" name="ons">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="3" minOccurs="1" name="add">
<xs:complexType>
<xs:attribute name="name" type="ONSParameters" use="required" />
<xs:attribute name="value" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="database" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="configFile" type="xs:string" use="optional" />
<xs:attribute name="mode" type="ONSModeValues" use="required" />
</xs:complexType>
</xs:element>
</xs:all>
</xs:complexType>
</xs:schema>

View File

@@ -1,19 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="DigitalData.Modules.Encryption" version="1.3.1" targetFramework="net462" />
<package id="DigitalData.Modules.Logging" version="2.6.5" targetFramework="net462" />
<package id="EntityFramework" version="6.4.4" targetFramework="net461" /> <package id="EntityFramework" version="6.4.4" targetFramework="net461" />
<package id="EntityFramework.Firebird" version="6.4.0" targetFramework="net461" /> <package id="EntityFramework.Firebird" version="6.4.0" targetFramework="net461" />
<package id="FirebirdSql.Data.FirebirdClient" version="7.5.0" targetFramework="net461" /> <package id="FirebirdSql.Data.FirebirdClient" version="7.5.0" targetFramework="net461" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="6.0.0" targetFramework="net462" />
<package id="NLog" version="5.0.5" targetFramework="net461" /> <package id="NLog" version="5.0.5" targetFramework="net461" />
<package id="Oracle.ManagedDataAccess" version="21.15.0" targetFramework="net462" />
<package id="System.Buffers" version="4.5.1" targetFramework="net462" />
<package id="System.Data.Odbc" version="6.0.1" targetFramework="net461" /> <package id="System.Data.Odbc" version="6.0.1" targetFramework="net461" />
<package id="System.Formats.Asn1" version="8.0.0" targetFramework="net462" />
<package id="System.Memory" version="4.5.5" targetFramework="net462" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net462" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net462" />
<package id="System.Text.Encodings.Web" version="6.0.0" targetFramework="net462" />
<package id="System.Text.Json" version="6.0.1" targetFramework="net462" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net462" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
</packages> </packages>

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,4 @@
Imports System.ServiceModel Imports System.ServiceModel
Imports System.Threading
Imports System.Xml Imports System.Xml
Imports DigitalData.Modules.Base Imports DigitalData.Modules.Base
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
@@ -8,35 +7,16 @@ Imports DigitalData.Modules.Logging
Public Class Channel Public Class Channel
Inherits BaseClass Inherits BaseClass
Private Shared ReadOnly _FactoryLock As New Object()
Private Shared _SharedFactory As ChannelFactory(Of IEDMIServiceChannel) = Nothing
Private Shared _SharedFactoryEndpoint As String = String.Empty
Private ReadOnly ChannelFactory As ChannelFactory(Of IEDMIServiceChannel) Private ReadOnly ChannelFactory As ChannelFactory(Of IEDMIServiceChannel)
Public Event Reconnect As EventHandler Public Event Reconnect As EventHandler
Private Shared _ActiveConnections As Integer = 0
Public Shared ReadOnly Property ActiveConnections As Integer
Get
Return _ActiveConnections
End Get
End Property
Public Shared Function GetBinding(Optional AuthenticationMode As TcpClientCredentialType = TcpClientCredentialType.Windows) As NetTcpBinding Public Shared Function GetBinding(Optional AuthenticationMode As TcpClientCredentialType = TcpClientCredentialType.Windows) As NetTcpBinding
Dim oMaxConnections = Math.Max(500, Environment.ProcessorCount * 50)
Return New NetTcpBinding() With { Return New NetTcpBinding() With {
.MaxReceivedMessageSize = Constants.ChannelSettings.MAX_RECEIVED_MESSAGE_SIZE, .MaxReceivedMessageSize = Constants.ChannelSettings.MAX_RECEIVED_MESSAGE_SIZE,
.MaxBufferSize = Constants.ChannelSettings.MAX_BUFFER_SIZE, .MaxBufferSize = Constants.ChannelSettings.MAX_BUFFER_SIZE,
.MaxBufferPoolSize = Constants.ChannelSettings.MAX_BUFFER_POOL_SIZE, .MaxBufferPoolSize = Constants.ChannelSettings.MAX_BUFFER_POOL_SIZE,
.ListenBacklog = oMaxConnections,
.MaxConnections = oMaxConnections,
.TransferMode = TransferMode.Streamed, .TransferMode = TransferMode.Streamed,
.SendTimeout = TimeSpan.FromSeconds(60),
.ReceiveTimeout = TimeSpan.FromMinutes(10),
.OpenTimeout = TimeSpan.FromSeconds(60),
.CloseTimeout = TimeSpan.FromSeconds(30),
.Security = New NetTcpSecurity() With { .Security = New NetTcpSecurity() With {
.Mode = SecurityMode.Transport, .Mode = SecurityMode.Transport,
.Transport = New TcpTransportSecurity() With { .Transport = New TcpTransportSecurity() With {
@@ -52,107 +32,33 @@ Public Class Channel
Public Sub New(pLogConfig As LogConfig, pServerAddress As ServerAddressStruct) Public Sub New(pLogConfig As LogConfig, pServerAddress As ServerAddressStruct)
MyBase.New(pLogConfig) MyBase.New(pLogConfig)
ChannelFactory = GetOrCreateSharedFactory(pLogConfig, pServerAddress) ChannelFactory = GetChannelFactory(pServerAddress)
End Sub
''' <summary>
''' Gibt eine gemeinsame ChannelFactory zurück.
''' Ein Connection-Pool für alle Client-Instanzen desselben Endpoints.
''' </summary>
Private Shared Function GetOrCreateSharedFactory(pLogConfig As LogConfig, pServerAddress As ServerAddressStruct) As ChannelFactory(Of IEDMIServiceChannel)
Dim oEndpoint = $"net.tcp://{pServerAddress.Host}:{pServerAddress.Port}/DigitalData/Services/Main"
' ← Volatile.Read: garantiert aktuellen Wert auch ohne Lock
Dim oCurrentFactory = Volatile.Read(_SharedFactory)
If oCurrentFactory IsNot Nothing AndAlso
_SharedFactoryEndpoint = oEndpoint AndAlso
(oCurrentFactory.State = CommunicationState.Opened OrElse
oCurrentFactory.State = CommunicationState.Created) Then
Return oCurrentFactory
End If
SyncLock _FactoryLock
' Double-check nach Lock
If _SharedFactory IsNot Nothing AndAlso
_SharedFactoryEndpoint = oEndpoint AndAlso
(_SharedFactory.State = CommunicationState.Opened OrElse
_SharedFactory.State = CommunicationState.Created) Then
Return _SharedFactory
End If
If _SharedFactory IsNot Nothing Then
If _SharedFactory.State = CommunicationState.Faulted OrElse
_SharedFactory.State = CommunicationState.Closing Then
Try
_SharedFactory.Abort()
Catch
End Try
End If
_SharedFactory = Nothing
End If
Dim oLogger = pLogConfig.GetLogger()
Dim oBinding = GetBinding()
Dim oAddress = New EndpointAddress(oEndpoint)
oLogger.Debug("Creating shared ChannelFactory | Endpoint=[{0}] | MaxConnections=[{1}] | SendTimeout=[{2}] | OpenTimeout=[{3}]",
oEndpoint, oBinding.MaxConnections, oBinding.SendTimeout, oBinding.OpenTimeout)
_SharedFactory = New ChannelFactory(Of IEDMIServiceChannel)(oBinding, oAddress)
_SharedFactoryEndpoint = oEndpoint
Return _SharedFactory
End SyncLock
End Function
''' <summary>
''' Closes a channel gracefully, falls back to Abort on error
''' </summary>
Public Shared Sub CloseChannel(pChannel As IEDMIServiceChannel)
If pChannel Is Nothing Then Return
Try
If pChannel.State = CommunicationState.Opened Then
pChannel.Close()
ElseIf pChannel.State = CommunicationState.Faulted OrElse
pChannel.State = CommunicationState.Closing Then
pChannel.Abort()
End If
Catch ex As Exception
Try
pChannel.Abort()
Catch
End Try
End Try
End Sub End Sub
''' <summary> ''' <summary>
''' Creates a channel and adds a Faulted-Handler ''' Creates a channel and adds a Faulted-Handler
''' </summary> ''' </summary>
''' <returns>A channel object</returns>
Public Function GetChannel() As IEDMIServiceChannel Public Function GetChannel() As IEDMIServiceChannel
Try Try
Logger.Debug("Creating channel from shared factory.") Logger.Debug("Creating channel.")
Dim oChannel = ChannelFactory.CreateChannel() Dim oChannel = ChannelFactory.CreateChannel()
AddHandler oChannel.Opened, Sub() AddHandler oChannel.Faulted, Sub() RaiseEvent Reconnect(Me, Nothing)
Dim oCount = Interlocked.Increment(_ActiveConnections)
Logger.Debug("Channel opened. Active connections: [{0}]", oCount)
End Sub
AddHandler oChannel.Closed, Sub()
Dim oCount = Interlocked.Decrement(_ActiveConnections)
Logger.Debug("Channel closed. Active connections: [{0}]", oCount)
End Sub
AddHandler oChannel.Faulted, Sub()
Dim oCount = Interlocked.Decrement(_ActiveConnections)
Logger.Warn("⚠ Channel faulted. Active connections: [{0}]", oCount)
RaiseEvent Reconnect(Me, Nothing)
End Sub
Logger.Debug("Channel created. State=[{0}]", oChannel.State)
Return oChannel Return oChannel
Catch ex As Exception Catch ex As Exception
Logger.Error(ex) Logger.Error(ex)
Throw Throw ex
End Try End Try
End Function End Function
Private Function GetChannelFactory(pServerAddress As ServerAddressStruct) As ChannelFactory(Of IEDMIServiceChannel)
Dim oBinding = GetBinding()
Dim oAddress = New EndpointAddress($"net.tcp://{pServerAddress.Host}:{pServerAddress.Port}/DigitalData/Services/Main")
Dim oFactory = New ChannelFactory(Of IEDMIServiceChannel)(oBinding, oAddress)
Return oFactory
End Function
End Class End Class

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ReferenceGroup xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ID="1b516c6d-d2d0-4dfc-9557-3dd0593fa624" xmlns="urn:schemas-microsoft-com:xml-wcfservicemap"> <ReferenceGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ID="1b516c6d-d2d0-4dfc-9557-3dd0593fa624" xmlns="urn:schemas-microsoft-com:xml-wcfservicemap">
<ClientOptions> <ClientOptions>
<GenerateAsynchronousMethods>false</GenerateAsynchronousMethods> <GenerateAsynchronousMethods>false</GenerateAsynchronousMethods>
<GenerateTaskBasedAsynchronousMethod>true</GenerateTaskBasedAsynchronousMethod> <GenerateTaskBasedAsynchronousMethod>true</GenerateTaskBasedAsynchronousMethod>

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configurationSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:schemas-microsoft-com:xml-wcfconfigurationsnapshot"> <configurationSnapshot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:schemas-microsoft-com:xml-wcfconfigurationsnapshot">
<behaviors /> <behaviors />
<bindings> <bindings>
<binding digest="System.ServiceModel.Configuration.NetTcpBindingElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data name=&quot;NetTcpBinding_IEDMIService&quot; transferMode=&quot;Streamed&quot;&gt;&lt;security&gt;&lt;transport sslProtocols=&quot;None&quot; /&gt;&lt;/security&gt;&lt;/Data&gt;" bindingType="netTcpBinding" name="NetTcpBinding_IEDMIService" /> <binding digest="System.ServiceModel.Configuration.NetTcpBindingElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data name=&quot;NetTcpBinding_IEDMIService&quot; transferMode=&quot;Streamed&quot;&gt;&lt;security&gt;&lt;transport sslProtocols=&quot;None&quot; /&gt;&lt;/security&gt;&lt;/Data&gt;" bindingType="netTcpBinding" name="NetTcpBinding_IEDMIService" />

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<SavedWcfConfigurationInformation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="9.1" CheckSum="4uBt9Y5m0Ue4fIPG6eooT5TT5MJ97hiEcthL6+tUJHw="> <SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="LUfq4Z7qL259JRuSf1xmDS/kLlBkZTtgk2vJyQH0Jvo=">
<bindingConfigurations> <bindingConfigurations>
<bindingConfiguration bindingType="netTcpBinding" name="NetTcpBinding_IEDMIService"> <bindingConfiguration bindingType="netTcpBinding" name="NetTcpBinding_IEDMIService">
<properties> <properties>

View File

@@ -1,6 +1,4 @@
Imports System.Collections.Concurrent Imports DigitalData.Modules.Database
Imports System.Data.SqlClient
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.EDMI.API Imports DigitalData.Modules.EDMI.API
Imports DigitalData.Modules.EDMI.API.Constants Imports DigitalData.Modules.EDMI.API.Constants
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
@@ -12,70 +10,7 @@ Public Class DatabaseWithFallback
Private ReadOnly _ClientConfig As GlobalStateClientConfiguration Private ReadOnly _ClientConfig As GlobalStateClientConfiguration
Private ReadOnly _DatabaseECM As MSSQLServer Private ReadOnly _DatabaseECM As MSSQLServer
Private _DatabaseIDB As MSSQLServer Private _DatabaseIDB As MSSQLServer
''' <summary>
''' Lokaler Override-Cache für ExecuteAppServiceWrite-Änderungen.
''' Schlüssel: "TABELLENNAME|FILTERAUSDRUCK" → geänderter DataTable-Snapshot.
''' Wird beim nächsten Server-Refresh (Client.UpdateTimer) automatisch obsolet.
''' </summary>
Private ReadOnly _localOverrideCache As New ConcurrentDictionary(Of String, DataTable)()
''' <summary>Erstellt den Cache-Key aus Tabellenname und Filter.</summary>
Private Shared Function GetOverrideCacheKey(pTable As String, pFilter As String) As String
Return $"{pTable.ToUpper}|{pFilter}"
End Function
''' <summary>Leert den lokalen Override-Cache (z.B. nach manuellem Refresh).</summary>
Public Sub InvalidateLocalOverrideCache()
_localOverrideCache.Clear()
_Logger.Debug("InvalidateLocalOverrideCache: Lokaler Override-Cache geleert.")
End Sub
''' <summary>Leert den Override-Cache für eine bestimmte Tabelle.</summary>
Public Sub InvalidateLocalOverrideCache(pTableName As String)
Dim oKeysToRemove = _localOverrideCache.Keys.
Where(Function(k) k.StartsWith(pTableName.ToUpper & "|")).ToList()
For Each oKey In oKeysToRemove
Dim oRemoved As DataTable = Nothing
_localOverrideCache.TryRemove(oKey, oRemoved)
Next
_Logger.Debug("InvalidateLocalOverrideCache: Override-Cache für Tabelle [{0}] geleert.", pTableName)
End Sub
''' <summary>
''' Thread-sicherer Cache für Connection Strings, indexiert nach Connection-ID.
''' Verhindert wiederholte DB-Roundtrips für SELECT * FROM TBDD_CONNECTION.
''' </summary>
Private ReadOnly _connectionStringCache As New ConcurrentDictionary(Of Integer, String)
''' <summary>
''' Liefert den Connection String für eine bekannte Connection-ID.
''' Beim ersten Aufruf wird der Wert aus der DB geladen und gecacht.
''' Hinweis: Bei parallelen Erstabrufen derselben ID kann die Factory mehrfach
''' aufgerufen werden – da der Wert idempotent ist, ist dies funktional korrekt.
''' </summary>
Private Function GetCachedConnectionString(pConnectionId As Integer) As String
Return _connectionStringCache.GetOrAdd(pConnectionId,
Function(id)
_Logger.Debug("GetCachedConnectionString: Cache miss für ConnectionId [{0}] - lade aus DB", id)
Dim oConnectionString = _DatabaseECM.Get_ConnectionStringforID(id)
_Logger.Debug("GetCachedConnectionString: ConnectionId [{0}] gecacht", id)
Return oConnectionString
End Function)
End Function
''' <summary>
''' Leert den Connection-String-Cache, z.B. nach Konfigurationsänderungen.
''' </summary>
Public Sub InvalidateConnectionCache()
_connectionStringCache.Clear()
_Logger.Debug("InvalidateConnectionCache: Connection-String-Cache geleert")
End Sub
''' <summary>
''' Leert den Cache für eine bestimmte Connection-ID.
''' </summary>
Public Sub InvalidateConnectionCache(pConnectionId As Integer)
Dim removed As String = Nothing
If _connectionStringCache.TryRemove(pConnectionId, removed) Then
_Logger.Debug("InvalidateConnectionCache: ConnectionId [{0}] aus Cache entfernt", pConnectionId)
End If
End Sub
''' <summary> ''' <summary>
''' Options for GetDatatable ''' Options for GetDatatable
''' </summary> ''' </summary>
@@ -99,105 +34,7 @@ Public Class DatabaseWithFallback
''' Connection Id to use, references TBDD_CONNECTION ''' Connection Id to use, references TBDD_CONNECTION
''' </summary> ''' </summary>
Public Property ConnectionId As Integer = 0 Public Property ConnectionId As Integer = 0
''' <summary>
''' Erkennt URI-Cache-Syntax: "TABELLENNAME?FILTERAUSDRUCK"
''' Beispiel: "TBDD_USER?USER_ID=4524"
''' </summary>
Public ReadOnly Property IsCacheQuery As Boolean
Get
If String.IsNullOrWhiteSpace(FallbackSQL) Then Return False
Dim oTrimmed As String = FallbackSQL.TrimStart()
' Nur wenn kein SQL-Schlüsselwort vorhanden → Cache-Routing-Syntax
Return FallbackSQL.Contains("?") AndAlso
Not oTrimmed.StartsWith("SELECT", StringComparison.OrdinalIgnoreCase) AndAlso
Not oTrimmed.StartsWith("INSERT", StringComparison.OrdinalIgnoreCase) AndAlso
Not oTrimmed.StartsWith("UPDATE", StringComparison.OrdinalIgnoreCase) AndAlso
Not oTrimmed.StartsWith("DELETE", StringComparison.OrdinalIgnoreCase) AndAlso
Not oTrimmed.Contains("DECLARE") AndAlso
Not oTrimmed.StartsWith("EXEC", StringComparison.OrdinalIgnoreCase) AndAlso
Not oTrimmed.StartsWith("DECLARE", StringComparison.OrdinalIgnoreCase)
End Get
End Property
Public ReadOnly Property IsCacheWriteQuery As Boolean
Get
If String.IsNullOrWhiteSpace(FallbackSQL) Then Return False
Dim oTrimmed As String = FallbackSQL.TrimStart()
Return FallbackSQL.Contains("?") AndAlso
FallbackSQL.Contains("!") AndAlso
Not oTrimmed.StartsWith("SELECT", StringComparison.OrdinalIgnoreCase) AndAlso
Not oTrimmed.StartsWith("INSERT", StringComparison.OrdinalIgnoreCase) AndAlso
Not oTrimmed.StartsWith("UPDATE", StringComparison.OrdinalIgnoreCase) AndAlso
Not oTrimmed.StartsWith("DELETE", StringComparison.OrdinalIgnoreCase) AndAlso
Not oTrimmed.StartsWith("EXEC", StringComparison.OrdinalIgnoreCase) AndAlso
Not oTrimmed.StartsWith("DECLARE", StringComparison.OrdinalIgnoreCase) AndAlso
Not oTrimmed.StartsWith("--", StringComparison.OrdinalIgnoreCase) AndAlso
Not oTrimmed.StartsWith("/*", StringComparison.OrdinalIgnoreCase)
End Get
End Property
''' <summary>"TBDD_USER?USER_ID=4524" → "TBDD_USER"</summary>
Public ReadOnly Property CacheQueryTable As String
Get
If Not IsCacheQuery Then Return String.Empty
Return FallbackSQL.Substring(0, FallbackSQL.IndexOf("?")).Trim()
End Get
End Property
''' <summary>"TBDD_USER?USER_ID=4524" → "USER_ID=4524"</summary>
Public ReadOnly Property CacheQueryFilter As String
Get
If Not IsCacheQuery Then Return String.Empty
Return FallbackSQL.Substring(FallbackSQL.IndexOf("?") + 1).Trim()
End Get
End Property
''' <summary>"TBDD_USER?USER_ID=4524!STATUS=1" → "TBDD_USER"</summary>
Public ReadOnly Property CacheWriteTable As String
Get
If Not IsCacheWriteQuery Then Return String.Empty
Return FallbackSQL.Substring(0, FallbackSQL.IndexOf("?")).Trim()
End Get
End Property
''' <summary>"TBDD_USER?USER_ID=4524!STATUS=1" → "USER_ID=4524"</summary>
Public ReadOnly Property CacheWriteFilter As String
Get
If Not IsCacheWriteQuery Then Return String.Empty
Dim oStart As Integer = FallbackSQL.IndexOf("?") + 1
Dim oLength As Integer = FallbackSQL.IndexOf("!") - oStart
Return FallbackSQL.Substring(oStart, oLength).Trim()
End Get
End Property
''' <summary>"TBDD_USER?USER_ID=4524!STATUS=1" → "STATUS=1" | "DELETE"</summary>
Public ReadOnly Property CacheWriteAction As String
Get
If Not IsCacheWriteQuery Then Return String.Empty
Return FallbackSQL.Substring(FallbackSQL.IndexOf("!") + 1).Trim()
End Get
End Property
''' <summary>True wenn die Aktion ein DELETE ist</summary>
Public ReadOnly Property CacheWriteIsDelete As Boolean
Get
Return IsCacheWriteQuery AndAlso
CacheWriteAction.Equals("DELETE", StringComparison.OrdinalIgnoreCase)
End Get
End Property
''' <summary>
''' Generiert das SQL aus der URI-Write-Syntax.
''' UPDATE: "TBDD_USER?USER_ID=4524!STATUS=1" → "UPDATE TBDD_USER SET STATUS=1 WHERE USER_ID=4524"
''' DELETE: "TBDD_USER?USER_ID=4524!DELETE" → "DELETE FROM TBDD_USER WHERE USER_ID=4524"
''' </summary>
Public ReadOnly Property CacheWriteToSql As String
Get
If Not IsCacheWriteQuery Then Return String.Empty
If CacheWriteIsDelete Then
Return $"DELETE FROM {CacheWriteTable} WHERE {CacheWriteFilter}"
Else
Return $"UPDATE {CacheWriteTable} SET {CacheWriteAction} WHERE {CacheWriteFilter}"
End If
End Get
End Property
''' <summary> ''' <summary>
''' Creates a new options object for GetDatatable options ''' Creates a new options object for GetDatatable options
''' </summary> ''' </summary>
@@ -207,19 +44,8 @@ Public Class DatabaseWithFallback
FallbackSQL = pFallbackSQL FallbackSQL = pFallbackSQL
FallbackType = pFallbackType FallbackType = pFallbackType
End Sub End Sub
''' <summary>
''' Creates a new options object using URI-Syntax (Cache-Query or URI-Write-Query).
''' FallbackType defaults to ECM – only relevant if URI detection fails and falls back to SQL.
''' Beispiel Read: "TBDD_USER?USER_ID=4524"
''' Beispiel Write: "TBDD_USER?USER_ID=4524!STATUS=1"
''' Beispiel Write: "TBDD_USER?USER_ID=4524!DELETE"
''' </summary>
''' <param name="pURISyntax">URI-Syntax string</param>
Public Sub New(pURISyntax As String)
FallbackSQL = pURISyntax
FallbackType = Constants.DatabaseType.ECM
End Sub
End Class End Class
Public Sub New(LogConfig As LogConfig, Client As Client, DatabaseECM As MSSQLServer, DatabaseIDB As MSSQLServer) Public Sub New(LogConfig As LogConfig, Client As Client, DatabaseECM As MSSQLServer, DatabaseIDB As MSSQLServer)
_Logger = LogConfig.GetLogger() _Logger = LogConfig.GetLogger()
_Client = Client _Client = Client
@@ -246,37 +72,29 @@ Public Class DatabaseWithFallback
Return _DatabaseECM.GetConnectionStringForId(pConnectionId) Return _DatabaseECM.GetConnectionStringForId(pConnectionId)
End Function End Function
#Region "GetDatatable" #Region "GetDatatable"
''' <summary>URI-Cache-Syntax wird über GetDatatable(pOptions) ausgewertet.</summary>
Public Function GetDatatableECM(pSQL As String) As DataTable Public Function GetDatatableECM(pSQL As String) As DataTable
Return GetDatatable(New GetDatatableOptions(pSQL, Constants.DatabaseType.ECM)) Return GetDatatable(New GetDatatableOptions(pSQL, Constants.DatabaseType.ECM))
End Function End Function
Public Async Function GetDatatableECMAsync(pSQL As String) As Task(Of DataTable) Public Async Function GetDatatableECMAsync(pSQL As String) As Task(Of DataTable)
Return Await GetDatatableFromServiceAsync(pSQL, Constants.DatabaseType.ECM, 0) Return Await Task.Run(Function() GetDatatableECM(pSQL))
End Function End Function
''' <summary>URI-Cache-Syntax wird über GetDatatable(pOptions) ausgewertet.</summary>
Public Function GetDatatableIDB(pSQL As String) As DataTable Public Function GetDatatableIDB(pSQL As String) As DataTable
Return GetDatatable(New GetDatatableOptions(pSQL, Constants.DatabaseType.IDB)) Return GetDatatable(New GetDatatableOptions(pSQL, Constants.DatabaseType.IDB))
End Function End Function
Public Async Function GetDatatableIDBAsync(pSQL As String) As Task(Of DataTable) Public Async Function GetDatatableIDBAsync(pSQL As String) As Task(Of DataTable)
Return Await GetDatatableFromServiceAsync(pSQL, Constants.DatabaseType.IDB, 0) Return Await Task.Run(Function() GetDatatableIDB(pSQL))
End Function End Function
Public Function GetDatatableWithConnection(pSQL As String, pConnectionId As Integer) As DataTable Public Function GetDatatableWithConnection(pSQL As String, pConnectionId As Integer) As DataTable
' ===== URI-CACHE-SYNTAX: "TABELLENNAME?FILTERAUSDRUCK" ===== Return GetDatatable(New GetDatatableOptions(pSQL, Constants.DatabaseType.None) With {.ConnectionId = pConnectionId})
Dim oOptions As New GetDatatableOptions(pSQL, Constants.DatabaseType.None) With {.ConnectionId = pConnectionId}
If oOptions.IsCacheQuery Then
Return GetDatatable(oOptions.CacheQueryTable, oOptions)
End If
Return GetDatatable(oOptions)
End Function End Function
Public Async Function GetDatatableWithConnectionAsync(pSQL As String, pConnectionId As Integer) As Task(Of DataTable) Public Async Function GetDatatableWithConnectionAsync(pSQL As String, pConnectionId As Integer) As Task(Of DataTable)
Return Await GetDatatableFromServiceAsync(pSQL, Constants.DatabaseType.None, pConnectionId) Return Await Task.Run(Function() GetDatatableWithConnection(pSQL, pConnectionId))
End Function End Function
#End Region #End Region
@@ -286,7 +104,7 @@ Public Class DatabaseWithFallback
End Function End Function
Public Async Function GetScalarValueECMAsync(pSQL As String) As Task(Of Object) Public Async Function GetScalarValueECMAsync(pSQL As String) As Task(Of Object)
Return Await GetScalarValueFromServiceAsync(pSQL, Constants.DatabaseType.ECM, 0) Return Await Task.Run(Function() GetScalarValueECM(pSQL))
End Function End Function
Public Function GetScalarValueIDB(pSQL As String) As Object Public Function GetScalarValueIDB(pSQL As String) As Object
@@ -294,7 +112,7 @@ Public Class DatabaseWithFallback
End Function End Function
Public Async Function GetScalarValueIDBAsync(pSQL As String) As Task(Of Object) Public Async Function GetScalarValueIDBAsync(pSQL As String) As Task(Of Object)
Return Await GetScalarValueFromServiceAsync(pSQL, Constants.DatabaseType.IDB, 0) Return Await Task.Run(Function() GetScalarValueIDB(pSQL))
End Function End Function
Public Function GetScalarValueWithConnection(pSQL As String, pConnectionId As Integer) As Object Public Function GetScalarValueWithConnection(pSQL As String, pConnectionId As Integer) As Object
@@ -302,20 +120,17 @@ Public Class DatabaseWithFallback
End Function End Function
Public Async Function GetScalarValueWithConnectionAsync(pSQL As String, pConnectionId As Integer) As Task(Of Object) Public Async Function GetScalarValueWithConnectionAsync(pSQL As String, pConnectionId As Integer) As Task(Of Object)
Return Await GetScalarValueFromServiceAsync(pSQL, Constants.DatabaseType.None, pConnectionId) Return Await Task.Run(Function() GetScalarValueWithConnection(pSQL, pConnectionId))
End Function End Function
#End Region #End Region
#Region "ExecuteNonQuery" #Region "ExecuteNonQuery"
' URI-Cache-Syntax ("TABELLE?FILTER") ist hier nicht anwendbar:
' ExecuteNonQuery führt schreibende Operationen aus (INSERT/UPDATE/DELETE)
' und liefert kein Ergebnis, das aus dem AppServer-Cache gelesen werden könnte.
Public Function ExecuteNonQueryECM(pSQL As String) As Boolean Public Function ExecuteNonQueryECM(pSQL As String) As Boolean
Return ExecuteNonQuery(pSQL, Constants.DatabaseType.ECM) Return ExecuteNonQuery(pSQL, Constants.DatabaseType.ECM)
End Function End Function
Public Async Function ExecuteNonQueryECMAsync(pSQL As String) As Task(Of Boolean) Public Async Function ExecuteNonQueryECMAsync(pSQL As String) As Task(Of Boolean)
Return Await ExecuteNonQueryFromServiceAsync(pSQL, Constants.DatabaseType.ECM, 0) Return Await Task.Run(Function() ExecuteNonQueryECM(pSQL))
End Function End Function
Public Function ExecuteNonQueryIDB(pSQL As String) As Boolean Public Function ExecuteNonQueryIDB(pSQL As String) As Boolean
@@ -323,7 +138,7 @@ Public Class DatabaseWithFallback
End Function End Function
Public Async Function ExecuteNonQueryIDBAsync(pSQL As String) As Task(Of Boolean) Public Async Function ExecuteNonQueryIDBAsync(pSQL As String) As Task(Of Boolean)
Return Await ExecuteNonQueryFromServiceAsync(pSQL, Constants.DatabaseType.IDB, 0) Return Await Task.Run(Function() ExecuteNonQueryIDB(pSQL))
End Function End Function
Public Function ExecuteNonQueryWithConnection(pSQL As String, pConnectionId As Integer) As Boolean Public Function ExecuteNonQueryWithConnection(pSQL As String, pConnectionId As Integer) As Boolean
@@ -331,7 +146,7 @@ Public Class DatabaseWithFallback
End Function End Function
Public Async Function ExecuteNonQueryWithConnectionAsync(pSQL As String, pConnectionId As Integer) As Task(Of Boolean) Public Async Function ExecuteNonQueryWithConnectionAsync(pSQL As String, pConnectionId As Integer) As Task(Of Boolean)
Return Await ExecuteNonQueryFromServiceAsync(pSQL, Constants.DatabaseType.None, pConnectionId) Return Await Task.Run(Function() ExecuteNonQueryWithConnection(pSQL, pConnectionId))
End Function End Function
#End Region #End Region
@@ -342,61 +157,18 @@ Public Class DatabaseWithFallback
''' <param name="pDataTableName">Name of the Cached Datatable</param> ''' <param name="pDataTableName">Name of the Cached Datatable</param>
''' <param name="pOptions">Options object</param> ''' <param name="pOptions">Options object</param>
Public Function GetDatatable(pDataTableName As String, pOptions As GetDatatableOptions) As DataTable Public Function GetDatatable(pDataTableName As String, pOptions As GetDatatableOptions) As DataTable
' ===== URI-CACHE-SYNTAX: "TABELLENNAME?FILTERAUSDRUCK" =====
If pOptions.IsCacheQuery AndAlso Not pOptions.ForceFallback AndAlso
Not (_ClientConfig IsNot Nothing AndAlso _ClientConfig.ForceDirectDatabaseAccess) Then
Dim oTable As String = pOptions.CacheQueryTable
Dim oFilter As String = pOptions.CacheQueryFilter
' ===== LOKALER OVERRIDE-CACHE – vorrangig prüfen =====
Dim oCacheKey As String = GetOverrideCacheKey(oTable, oFilter)
Dim oOverride As DataTable = Nothing
If _localOverrideCache.TryGetValue(oCacheKey, oOverride) Then
_Logger.Debug("✔ GetDatatable: Lokaler Override-Cache trifft für [{0}] Filter [{1}]", oTable, oFilter)
Return oOverride
End If
_Logger.Debug("GetDatatable: URI-Cache-Query erkannt – Tabelle [{0}] Filter [{1}]", oTable, oFilter)
If _Client IsNot Nothing AndAlso IsTableCached(oTable) Then
Try
Dim oResult As TableResult = _Client.GetDatatableByName(oTable, oFilter, pOptions.SortByColumn)
If oResult IsNot Nothing AndAlso oResult.OK Then
_Logger.Debug("✔ GetDatatable: URI-Cache-Query [{0}] – {1} Zeilen", oTable, oResult.Table?.Rows.Count)
Return oResult.Table
End If
Catch ex As Exception
_Logger.Error(ex)
End Try
_Logger.Warn("⚠ GetDatatable: URI-Cache-Query [{0}] fehlgeschlagen – kein SQL-Fallback verfügbar", oTable)
Return Nothing
End If
_Logger.Warn("⚠ GetDatatable: URI-Cache-Query – Tabelle [{0}] nicht im AppServer-Cache", oTable)
Return Nothing
End If
Return GetDatatable(pDataTableName, pOptions.FallbackSQL, pOptions.FallbackType, pOptions.FilterExpression, pOptions.SortByColumn, pOptions.ForceFallback, pOptions.ConnectionId) Return GetDatatable(pDataTableName, pOptions.FallbackSQL, pOptions.FallbackType, pOptions.FilterExpression, pOptions.SortByColumn, pOptions.ForceFallback, pOptions.ConnectionId)
End Function End Function
Public Function GetDatatable(pSQL As String, pConnectionId As Integer) As DataTable Public Function GetDatatable(pSQL As String, pConnectionId As Integer) As DataTable
' ===== URI-CACHE-SYNTAX: "TABELLENNAME?FILTERAUSDRUCK" =====
Dim oOptions As New GetDatatableOptions(pSQL, Constants.DatabaseType.ECM) With {.ConnectionId = pConnectionId}
If oOptions.IsCacheQuery Then
Return GetDatatable(oOptions.CacheQueryTable, oOptions)
End If
Return GetDatatable("FORCE_FALLBACK", pSQL, Constants.DatabaseType.ECM, pSortByColumn:=Nothing, pForceFallback:=False, pConnectionId:=pConnectionId) Return GetDatatable("FORCE_FALLBACK", pSQL, Constants.DatabaseType.ECM, pSortByColumn:=Nothing, pForceFallback:=False, pConnectionId:=pConnectionId)
End Function End Function
''' <summary> ''' <summary>
''' Returns a datatable directly from the database – or from AppServer cache if URI-Cache-Syntax is detected. ''' Returns a datatable directly from the database.
''' </summary> ''' </summary>
''' <param name="pOptions">Options object</param> ''' <param name="pOptions">Options object</param>
Public Function GetDatatable(pOptions As GetDatatableOptions) As DataTable Public Function GetDatatable(pOptions As GetDatatableOptions) As DataTable
' ===== URI-CACHE-SYNTAX: "TABELLENNAME?FILTERAUSDRUCK" =====
If pOptions.IsCacheQuery Then
Return GetDatatable(pOptions.CacheQueryTable, pOptions)
End If
Dim oForceFallback = True Dim oForceFallback = True
Return GetDatatable("FORCE_FALLBACK", pOptions.FallbackSQL, pOptions.FallbackType, pOptions.FilterExpression, pOptions.SortByColumn, oForceFallback, pOptions.ConnectionId) Return GetDatatable("FORCE_FALLBACK", pOptions.FallbackSQL, pOptions.FallbackType, pOptions.FilterExpression, pOptions.SortByColumn, oForceFallback, pOptions.ConnectionId)
End Function End Function
@@ -413,35 +185,35 @@ Public Class DatabaseWithFallback
''' <param name="pConnectionId">Connection Id to use, references TBDD_CONNECTION</param> ''' <param name="pConnectionId">Connection Id to use, references TBDD_CONNECTION</param>
Public Function GetDatatable(pDataTableName As String, pFallbackSQL As String, pFallbackType As Constants.DatabaseType, Optional pFilterExpression As String = "", Optional pSortByColumn As String = "", Optional pForceFallback As Boolean = False, Optional pConnectionId As Integer = 0) As DataTable Public Function GetDatatable(pDataTableName As String, pFallbackSQL As String, pFallbackType As Constants.DatabaseType, Optional pFilterExpression As String = "", Optional pSortByColumn As String = "", Optional pForceFallback As Boolean = False, Optional pConnectionId As Integer = 0) As DataTable
Try Try
Dim oResult As DataTable = Nothing
Dim oTableResult As TableResult = Nothing Dim oTableResult As TableResult = Nothing
_Logger.Debug("GetDatatable: Fetching datatable [{0}] , Filter Expression [{1}], Sort By Column [{2}], Force Fallback [{3}]",
pDataTableName, pFilterExpression, pSortByColumn, pForceFallback)
' If there is no client, we assume there is no service (configured) ' If there is no client, we assume there is no service (configured)
If _Client Is Nothing Then If _Client Is Nothing Then
_Logger.Debug("GetDatatable: Client is empty, falling back to direct database access.") _Logger.Debug("Client is empty, falling back to direct database access.")
Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType, pConnectionId) Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType, pConnectionId)
End If End If
' If ForceFallback flag is set, we go to database immediately ' If ForceFallback flag is set, we go to database immediately
If pForceFallback Or _ClientConfig.ForceDirectDatabaseAccess Then If pForceFallback Or _ClientConfig.ForceDirectDatabaseAccess Then
_Logger.Debug("GetDatatable: ForceFallback is True, falling back to direct database access.") _Logger.Debug("ForceFallback is True, falling back to direct database access.")
Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType, pConnectionId) Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType, pConnectionId)
End If End If
' If the table is not cached, we try going through the service ' If the table is not cached, we try going through the service
If Not IsTableCached(pDataTableName) Then If Not IsTableCached(pDataTableName) Then
_Logger.Debug("GetDatatable: Datatable [{0}] is not chached, fetching data from service.", pDataTableName) _Logger.Debug("Datatable is not chached, fetching data from service.")
Return GetDatatableFromService(pFallbackSQL, pFallbackType, pConnectionId) Return GetDatatableFromService(pFallbackSQL, pFallbackType, pConnectionId)
End If End If
' If there is a proper ConnectionId, we try going through the service ' If there is a proper ConnectionId, we try going through the service
If pConnectionId > 0 Then If pConnectionId > 0 Then
_Logger.Debug("GetDatatable: ConnectionId is set, fetching data from service.") _Logger.Debug("ConnectionId is set, fetching data from service.")
Return GetDatatableFromService(pFallbackSQL, pFallbackType, pConnectionId) Return GetDatatableFromService(pFallbackSQL, pFallbackType, pConnectionId)
End If End If
Try Try
_Logger.Debug("GetDatatable: Datatable is chached, fetching data from cache.") _Logger.Debug("Datatable is chached, fetching data from cache.")
oTableResult = _Client.GetDatatableByName(pDataTableName, pFilterExpression, pSortByColumn) oTableResult = _Client.GetDatatableByName(pDataTableName, pFilterExpression, pSortByColumn)
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
@@ -449,10 +221,9 @@ Public Class DatabaseWithFallback
End Try End Try
If oTableResult Is Nothing OrElse oTableResult.OK = False Then If oTableResult Is Nothing OrElse oTableResult.OK = False Then
_Logger.Warn("⚠ GetDatatable: Datatable [{0}] could not be fetched from AppServer Cache. Falling back to direct Database Access.", pDataTableName) _Logger.Warn("Datatable [{0}] could not be fetched from AppServer Cache. Falling back to direct Database Access.", pDataTableName)
Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType, pConnectionId) Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType, pConnectionId)
Else Else
_Logger.Debug("✔ GetDatatable: Datatable [{0}] fetched from AppServer Cache.", pDataTableName)
Return oTableResult.Table Return oTableResult.Table
End If End If
@@ -465,75 +236,51 @@ Public Class DatabaseWithFallback
''' <summary> ''' <summary>
''' Returns a Scalar Value by querying the database through the service and querying the database directly as fallback. ''' Returns a Scalar Value by querying the database through the service and querying the database directly as fallback.
''' URI-Cache-Syntax wird unterstützt: "TABELLENNAME?FILTERAUSDRUCK" – liefert Wert der ersten Spalte der ersten Zeile aus dem AppServer-Cache.
''' </summary> ''' </summary>
''' <param name="pSQL">SQL Command to execute as fallback – oder URI-Cache-Syntax "TABELLENNAME?FILTERAUSDRUCK"</param> ''' <param name="pSQL">SQL Command to execute as fallback</param>
''' <param name="pDatabaseType">Named Database to use for the fallback SQL Command</param> ''' <param name="pDatabaseType">Named Database to use for the fallback SQL Command</param>
''' <param name="pForceFallback">Force the fallback, skipping the service completely</param> ''' <param name="pForceFallback">Force the fallback, skipping the service completely</param>
''' <param name="pConnectionId">Connection Id to use, references TBDD_CONNECTION</param> ''' <param name="pConnectionId">Connection Id to use, references TBDD_CONNECTION</param>
Public Function GetScalarValue(pSQL As String, pDatabaseType As Constants.DatabaseType, Optional pForceFallback As Boolean = False, Optional pConnectionId As Integer = 0) As Object Public Function GetScalarValue(pSQL As String, pDatabaseType As Constants.DatabaseType, Optional pForceFallback As Boolean = False, Optional pConnectionId As Integer = 0) As Object
Try Try
' ===== URI-CACHE-SYNTAX: "TABELLENNAME?FILTERAUSDRUCK" ===== ' If there is no client, we assume there is no service (configured)
' ForceFallback übersteuert auch die URI-Cache-Syntax
Dim oOptions As New GetDatatableOptions(pSQL, pDatabaseType)
If oOptions.IsCacheQuery AndAlso Not pForceFallback AndAlso
Not (_ClientConfig IsNot Nothing AndAlso _ClientConfig.ForceDirectDatabaseAccess) Then
Dim oTable As String = oOptions.CacheQueryTable
Dim oFilter As String = oOptions.CacheQueryFilter
_Logger.Debug("GetScalarValue: URI-Cache-Query erkannt – Tabelle [{0}] Filter [{1}]", oTable, oFilter)
If _Client IsNot Nothing AndAlso IsTableCached(oTable) Then
Try
Dim oResult As TableResult = _Client.GetDatatableByName(oTable, oFilter, "")
If oResult IsNot Nothing AndAlso oResult.OK AndAlso
oResult.Table IsNot Nothing AndAlso oResult.Table.Rows.Count > 0 Then
Dim oScalar As Object = oResult.Table.Rows(0)(0)
_Logger.Debug("✔ GetScalarValue: URI-Cache-Query [{0}] – Scalar [{1}]", oTable, oScalar)
Return oScalar
End If
Catch ex As Exception
_Logger.Error(ex)
End Try
_Logger.Warn("⚠ GetScalarValue: URI-Cache-Query [{0}] fehlgeschlagen – kein SQL-Fallback verfügbar", oTable)
Return Nothing
End If
_Logger.Warn("⚠ GetScalarValue: URI-Cache-Query – Tabelle [{0}] nicht im AppServer-Cache", oTable)
Return Nothing
End If
If _Client Is Nothing Then If _Client Is Nothing Then
Return GetScalarValueFromDatabase(pSQL, pDatabaseType, pConnectionId) Return GetScalarValueFromDatabase(pSQL, pDatabaseType, pConnectionId)
End If End If
' If ForceFallback flag is set, we go to database immediately
If pForceFallback Or _ClientConfig.ForceDirectDatabaseAccess Then If pForceFallback Or _ClientConfig.ForceDirectDatabaseAccess Then
Return GetScalarValueFromDatabase(pSQL, pDatabaseType, pConnectionId) Return GetScalarValueFromDatabase(pSQL, pDatabaseType, pConnectionId)
End If End If
Return GetScalarValueFromService(pSQL, pDatabaseType, pConnectionId) Return GetScalarValueFromService(pSQL, pDatabaseType, pConnectionId)
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
Return Nothing Return Nothing
End Try End Try
End Function End Function
''' <summary> ''' <summary>
''' Executes a non-query SQL command through the service and falls back to direct database access. ''' Returns a Scalar Value by querying the database through the service and querying the database directly as fallback.
''' </summary> ''' </summary>
''' <param name="pSQL">SQL Command to execute</param> ''' <param name="pSQL">SQL Command to execute as fallback</param>
''' <param name="pDatabaseType">Named Database to use for the SQL Command</param> ''' <param name="pDatabaseType">Named Database to use for the fallback SQL Command</param>
''' <param name="pForceFallback">Force the fallback, skipping the service completely</param> ''' <param name="pForceFallback">Force the fallback, skipping the service completely</param>
''' <param name="pConnectionId">Connection Id to use, references TBDD_CONNECTION</param> ''' <param name="pConnectionId">Connection Id to use, references TBDD_CONNECTION</param>
Public Function ExecuteNonQuery(pSQL As String, pDatabaseType As Constants.DatabaseType, Optional pForceFallback As Boolean = False, Optional pConnectionId As Integer = 0) As Boolean Public Function ExecuteNonQuery(pSQL As String, pDatabaseType As Constants.DatabaseType, Optional pForceFallback As Boolean = False, Optional pConnectionId As Integer = 0) As Boolean
Try Try
Dim oResult As DataTable = Nothing
Dim oTableResult As TableResult = Nothing
' If there is no client, we assume there is no service (configured) ' If there is no client, we assume there is no service (configured)
If _Client Is Nothing Then If _Client Is Nothing Then
_Logger.Debug("ExecuteNonQuery - Client is empty, falling back to direct database access.")
Return ExecuteNonQueryFromDatabase(pSQL, pDatabaseType, pConnectionId) Return ExecuteNonQueryFromDatabase(pSQL, pDatabaseType, pConnectionId)
End If End If
' If ForceFallback flag is set, we go to database immediately ' If ForceFallback flag is set, we go to database immediately
If pForceFallback Or _ClientConfig.ForceDirectDatabaseAccess Then If pForceFallback Or _ClientConfig.ForceDirectDatabaseAccess Then
_Logger.Debug("ExecuteNonQuery - ForceFallback is set, falling back to direct database access.")
Return ExecuteNonQueryFromDatabase(pSQL, pDatabaseType, pConnectionId) Return ExecuteNonQueryFromDatabase(pSQL, pDatabaseType, pConnectionId)
End If End If
@@ -541,82 +288,13 @@ Public Class DatabaseWithFallback
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
Return False Return Nothing
End Try End Try
End Function End Function
''' <summary>
''' Führt ein UPDATE oder DELETE über URI-Write-Syntax aus.
''' Der geänderte Snapshot wird lokal gecacht und bei GetDatatable/GetScalarValue
''' vorrangig ausgewertet – bis der Server-Refresh den Cache neu befüllt.
''' UPDATE: "TBDD_USER?USER_ID=4524!STATUS=1"
''' DELETE: "TBDD_USER?USER_ID=4524!DELETE"
''' </summary>
Public Function ExecuteAppServiceWrite(pOptions As GetDatatableOptions) As Boolean
If Not pOptions.IsCacheWriteQuery Then
_Logger.Warn("⚠ ExecuteAppServiceWrite: Keine gültige URI-Write-Syntax – [{0}] – Abbruch.", pOptions.FallbackSQL)
Return False
End If
If _Client Is Nothing OrElse Not IsTableCached(pOptions.CacheWriteTable) Then
_Logger.Warn("⚠ ExecuteAppServiceWrite: Tabelle [{0}] nicht im AppServer-Cache – Abbruch.", pOptions.CacheWriteTable)
Return False
End If
_Logger.Debug("ExecuteAppServiceWrite: Tabelle [{0}] | Filter [{1}] | Aktion [{2}] | IsDelete [{3}]",
pOptions.CacheWriteTable, pOptions.CacheWriteFilter, pOptions.CacheWriteAction, pOptions.CacheWriteIsDelete)
Try
' Aktuellen Snapshot aus Cache laden
Dim oResult As TableResult = _Client.GetDatatableByName(pOptions.CacheWriteTable, pOptions.CacheWriteFilter, "")
If oResult Is Nothing OrElse Not oResult.OK OrElse oResult.Table Is Nothing Then
_Logger.Warn("⚠ ExecuteAppServiceWrite: Cache-Abfrage für [{0}] fehlgeschlagen.", pOptions.CacheWriteTable)
Return False
End If
Dim oMatchingRows As DataRow() = oResult.Table.Select(pOptions.CacheWriteFilter)
If oMatchingRows.Length = 0 Then
_Logger.Debug("ExecuteAppServiceWrite: Keine Zeilen für Filter [{0}] gefunden.", pOptions.CacheWriteFilter)
Return True
End If
If pOptions.CacheWriteIsDelete Then
For Each oRow As DataRow In oMatchingRows
oRow.Delete()
Next
oResult.Table.AcceptChanges()
_Logger.Debug("✔ ExecuteAppServiceWrite: DELETE – [{0}] Zeilen entfernt.", oMatchingRows.Length)
Else
For Each oPair As String In pOptions.CacheWriteAction.Split(","c)
Dim oParts = oPair.Split("="c)
If oParts.Length <> 2 Then Continue For
Dim oCol As String = oParts(0).Trim()
Dim oVal As String = oParts(1).Trim().Trim("'"c)
For Each oRow As DataRow In oMatchingRows
If oResult.Table.Columns.Contains(oCol) Then
oRow(oCol) = oVal
End If
Next
Next
oResult.Table.AcceptChanges()
_Logger.Debug("✔ ExecuteAppServiceWrite: UPDATE – [{0}] Zeilen aktualisiert.", oMatchingRows.Length)
End If
' ===== OVERRIDE-CACHE BEFÜLLEN =====
Dim oCacheKey As String = GetOverrideCacheKey(pOptions.CacheWriteTable, pOptions.CacheWriteFilter)
_localOverrideCache(oCacheKey) = oResult.Table
_Logger.Debug("✔ ExecuteAppServiceWrite: Override-Cache gesetzt für [{0}]", oCacheKey)
Return True
Catch ex As Exception
_Logger.Error(ex)
Return False
End Try
End Function
Private Function IsTableCached(pName As String) As Boolean Private Function IsTableCached(pName As String) As Boolean
_Logger.Debug("IsTableCached: Checking if table [{0}] is cached.", pName)
If _Client Is Nothing Then If _Client Is Nothing Then
_Logger.Warn("⚠ IsTableCached: Client is nothing, cannot check if table is cached.")
Return False Return False
End If End If
@@ -625,79 +303,42 @@ Public Class DatabaseWithFallback
Private Function GetDatatableFromService(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As DataTable Private Function GetDatatableFromService(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As DataTable
Try Try
_Logger.Debug("GetDatatableFromService: Fetching data from service [{0}] with Connection Id [{1}] and Command [{2}]", DatabaseType.ToString, pConnectionId, pSQLCommand)
Dim oResult As GetDatatableResponse = Nothing Dim oResult As GetDatatableResponse = Nothing
Select Case DatabaseType Select Case DatabaseType
Case Constants.DatabaseType.ECM Case Constants.DatabaseType.ECM
oResult = _Client.GetDatatableFromECM(pSQLCommand) oResult = _Client.GetDatatableFromECM(pSQLCommand)
Case Constants.DatabaseType.IDB Case Constants.DatabaseType.IDB
oResult = _Client.GetDatatableFromIDB(pSQLCommand) oResult = _Client.GetDatatableFromIDB(pSQLCommand)
Case Else Case Else
Return GetDatatableFromDatabase(pSQLCommand, DatabaseType, pConnectionId) Return GetDatatableFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
End Select End Select
If oResult Is Nothing OrElse oResult.OK = False Then If oResult Is Nothing Then
_Logger.Warn("⚠ GetDatatableFromService: Service returned invalid response [{0}]. Falling back to direct database access.", If(oResult Is Nothing, "null", oResult.ErrorMessage)) Throw New ApplicationException("Unexpected server error ocurred!")
Return GetDatatableFromDatabase(pSQLCommand, DatabaseType, pConnectionId) End If
If oResult.OK = False Then
Throw New ApplicationException(oResult.ErrorMessage)
End If End If
Return oResult.Table Return oResult.Table
Catch ex As InvalidOperationException
_Logger.Warn("⚠ GetDatatableFromService skipped: [{0}] Falling back to direct database access.", ex.Message)
Return GetDatatableFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
Catch ex As Exception Catch ex As Exception
_Logger.Warn("⚠ GetDatatableFromService failed. Falling back to direct database access.") _Logger.Warn("GetDatatableFromService failed. Falling back to direct database access.")
_Logger.Error(ex) _Logger.Error(ex)
Return GetDatatableFromDatabase(pSQLCommand, DatabaseType, pConnectionId) Return GetDatatableFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
End Try End Try
End Function End Function
Private Async Function GetDatatableFromServiceAsync(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Task(Of DataTable)
_Logger.Debug("GetDatatableFromServiceAsync called | SQL=[{0}] | DB=[{1}] | ConnId=[{2}]",
pSQLCommand, DatabaseType.ToString, pConnectionId)
If _Client Is Nothing OrElse _ClientConfig?.ForceDirectDatabaseAccess Then
' ← Kein Task.Run: direkt synchron, Thread ist ohnehin frei
Return GetDatatableFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
End If
Try
Dim oResult As GetDatatableResponse = Nothing
Select Case DatabaseType
Case Constants.DatabaseType.ECM
oResult = Await _Client.GetDatatableFromECMAsync(pSQLCommand)
Case Constants.DatabaseType.IDB
oResult = Await _Client.GetDatatableFromIDBAsync(pSQLCommand)
Case Else
oResult = Await _Client.GetDatatableFromConnectionAsync(pSQLCommand, pConnectionId)
End Select
If oResult Is Nothing OrElse oResult.OK = False Then
_Logger.Warn("⚠ GetDatatableFromServiceAsync failed | Fallback to DB | Error=[{0}]",
If(oResult Is Nothing, "null", oResult.ErrorMessage))
Return GetDatatableFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
End If
Return oResult.Table
Catch ex As InvalidOperationException
_Logger.Warn("⚠ GetDatatableFromServiceAsync offline: [{0}] | Fallback to DB", ex.Message)
Return GetDatatableFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
Catch ex As Exception
_Logger.Warn("⚠ GetDatatableFromServiceAsync failed | Fallback to DB")
_Logger.Error(ex)
Return GetDatatableFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
End Try
End Function
Private Function GetDatatableFromDatabase(pSQLCommand As String, pDatabaseType As Constants.DatabaseType, pConnectionId As Integer) As DataTable Private Function GetDatatableFromDatabase(pSQLCommand As String, pDatabaseType As Constants.DatabaseType, pConnectionId As Integer) As DataTable
Try Try
_Logger.Debug("GetDatatableFromDatabase: Fetching data from database [{0}] with Connection Id [{1}] and Command [{2}]", pDatabaseType.ToString, pConnectionId, pSQLCommand) _Logger.Debug("Fetching data from database [{0}] with Connection Id [{0}]", pDatabaseType.ToString, pConnectionId)
Select Case pDatabaseType Select Case pDatabaseType
Case Constants.DatabaseType.IDB Case Constants.DatabaseType.IDB
@@ -706,7 +347,7 @@ Public Class DatabaseWithFallback
Case Else Case Else
If pConnectionId > 0 Then If pConnectionId > 0 Then
_Logger.Debug("Retrieving Connection String from Connection Id [{0}]", pConnectionId) _Logger.Debug("Retrieving Connection String from Connection Id [{0}]", pConnectionId)
Dim oConnectionString = GetCachedConnectionString(pConnectionId) ' ← NEU: Cache statt direkter DB-Abfrage Dim oConnectionString = _DatabaseECM.Get_ConnectionStringforID(pConnectionId)
Return _DatabaseECM.GetDatatableWithConnection(pSQLCommand, oConnectionString) Return _DatabaseECM.GetDatatableWithConnection(pSQLCommand, oConnectionString)
Else Else
Return _DatabaseECM.GetDatatable(pSQLCommand) Return _DatabaseECM.GetDatatable(pSQLCommand)
@@ -720,69 +361,35 @@ Public Class DatabaseWithFallback
End Try End Try
End Function End Function
Private Async Function GetScalarValueFromServiceAsync(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Task(Of Object)
_Logger.Debug("GetScalarValueFromServiceAsync called | SQL=[{0}] | DB=[{1}] | ConnId=[{2}]",
pSQLCommand, DatabaseType.ToString, pConnectionId)
If _Client Is Nothing OrElse _ClientConfig?.ForceDirectDatabaseAccess Then
Return GetScalarValueFromDatabase(pSQLCommand, DatabaseType, pConnectionId) ' ← kein Task.Run
End If
Try
Dim oResult As GetScalarValueResponse = Nothing
Select Case DatabaseType
Case Constants.DatabaseType.ECM
oResult = Await _Client.GetScalarValueFromECMAsync(pSQLCommand)
Case Constants.DatabaseType.IDB
oResult = Await _Client.GetScalarValueFromIDBAsync(pSQLCommand)
Case Else
oResult = Await _Client.GetScalarValueFromConnectionAsync(pSQLCommand, pConnectionId)
End Select
If oResult Is Nothing OrElse oResult.OK = False Then
_Logger.Warn("⚠ GetScalarValueFromServiceAsync failed | Fallback to DB")
Return GetScalarValueFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
End If
Return oResult.Scalar
Catch ex As InvalidOperationException
_Logger.Warn("⚠ GetScalarValueFromServiceAsync offline: [{0}] | Fallback to DB", ex.Message)
Return GetScalarValueFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
Catch ex As Exception
_Logger.Warn("⚠ GetScalarValueFromServiceAsync failed | Fallback to DB")
_Logger.Error(ex)
Return GetScalarValueFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
End Try
End Function
Private Function GetScalarValueFromService(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Object Private Function GetScalarValueFromService(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Object
Try Try
Dim oResult As GetScalarValueResponse = Nothing Dim oResult As GetScalarValueResponse = Nothing
_Logger.Debug("GetScalarValueFromService [{0}] with Connection Id [{1}] and Command [{2}]", DatabaseType.ToString, pConnectionId, pSQLCommand)
Select Case DatabaseType Select Case DatabaseType
Case Constants.DatabaseType.ECM Case Constants.DatabaseType.ECM
oResult = _Client.GetScalarValueFromECM(pSQLCommand) oResult = _Client.GetScalarValueFromECM(pSQLCommand)
Case Constants.DatabaseType.IDB Case Constants.DatabaseType.IDB
oResult = _Client.GetScalarValueFromIDB(pSQLCommand) oResult = _Client.GetScalarValueFromIDB(pSQLCommand)
Case Else Case Else
Return GetScalarValueFromDatabase(pSQLCommand, DatabaseType, pConnectionId) Return GetScalarValueFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
End Select End Select
If oResult Is Nothing OrElse oResult.OK = False Then If oResult Is Nothing Then
_Logger.Warn("⚠ GetScalarValueFromService: Service returned invalid response [{0}]. Falling back to direct database access.", If(oResult Is Nothing, "null", oResult.ErrorMessage)) Throw New ApplicationException("Unexpected server error ocurred!")
Return GetScalarValueFromDatabase(pSQLCommand, DatabaseType, pConnectionId) End If
If oResult.OK = False Then
Throw New ApplicationException(oResult.ErrorMessage)
End If End If
Return oResult.Scalar Return oResult.Scalar
Catch ex As InvalidOperationException
_Logger.Warn("⚠ GetScalarValueFromService skipped: [{0}] Falling back to direct database access.", ex.Message)
Return GetScalarValueFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
Catch ex As Exception Catch ex As Exception
_Logger.Warn("⚠ GetScalarValueFromService failed. Falling back to direct database access.") _Logger.Warn("GetScalarValueFromService failed. Falling back to direct database access.")
_Logger.Error(ex) _Logger.Error(ex)
Return GetScalarValueFromDatabase(pSQLCommand, DatabaseType, pConnectionId) Return GetScalarValueFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
@@ -792,14 +399,13 @@ Public Class DatabaseWithFallback
Private Function GetScalarValueFromDatabase(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Object Private Function GetScalarValueFromDatabase(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Object
Try Try
_Logger.Debug("DBwFF GetScalarValueFromDatabase [{0}] with Connection Id [{1}] and Command [{2}]", DatabaseType.ToString, pConnectionId, pSQLCommand)
Select Case DatabaseType Select Case DatabaseType
Case Constants.DatabaseType.IDB Case Constants.DatabaseType.IDB
Return _DatabaseIDB.GetScalarValue(pSQLCommand) Return _DatabaseIDB.GetScalarValue(pSQLCommand)
Case Else Case Else
If pConnectionId > 0 Then If pConnectionId > 0 Then
Dim oConnectionString = GetCachedConnectionString(pConnectionId) ' ← NEU: Cache statt direkter DB-Abfrage Dim oConnectionString = _DatabaseECM.Get_ConnectionStringforID(pConnectionId)
Return _DatabaseECM.GetScalarValueWithConnection(pSQLCommand, oConnectionString) Return _DatabaseECM.GetScalarValueWithConnection(pSQLCommand, oConnectionString)
Else Else
Return _DatabaseECM.GetScalarValue(pSQLCommand) Return _DatabaseECM.GetScalarValue(pSQLCommand)
@@ -813,69 +419,35 @@ Public Class DatabaseWithFallback
End Try End Try
End Function End Function
Private Async Function ExecuteNonQueryFromServiceAsync(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Task(Of Boolean)
_Logger.Debug("ExecuteNonQueryFromServiceAsync called | SQL=[{0}] | DB=[{1}] | ConnId=[{2}]",
pSQLCommand, DatabaseType.ToString, pConnectionId)
If _Client Is Nothing OrElse _ClientConfig?.ForceDirectDatabaseAccess Then
Return ExecuteNonQueryFromDatabase(pSQLCommand, DatabaseType, pConnectionId) ' ← kein Task.Run
End If
Try
Dim oResult As ExecuteNonQueryResponse = Nothing
Select Case DatabaseType
Case Constants.DatabaseType.ECM
oResult = Await _Client.ExecuteNonQueryFromECMAsync(pSQLCommand)
Case Constants.DatabaseType.IDB
oResult = Await _Client.ExecuteNonQueryFromIDBAsync(pSQLCommand)
Case Else
oResult = Await _Client.ExecuteNonQueryFromConnectionAsync(pSQLCommand, pConnectionId)
End Select
If oResult Is Nothing OrElse oResult.OK = False Then
_Logger.Warn("⚠ ExecuteNonQueryFromServiceAsync failed | Fallback to DB")
Return ExecuteNonQueryFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
End If
Return oResult.Result
Catch ex As InvalidOperationException
_Logger.Warn("⚠ ExecuteNonQueryFromServiceAsync offline: [{0}] | Fallback to DB", ex.Message)
Return ExecuteNonQueryFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
Catch ex As Exception
_Logger.Warn("⚠ ExecuteNonQueryFromServiceAsync failed | Fallback to DB")
_Logger.Error(ex)
Return ExecuteNonQueryFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
End Try
End Function
Private Function ExecuteNonQueryFromService(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Boolean Private Function ExecuteNonQueryFromService(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Boolean
Try Try
Dim oResult As ExecuteNonQueryResponse = Nothing Dim oResult As ExecuteNonQueryResponse = Nothing
_Logger.Debug("ExecuteNonQueryFromService [{0}] with Connection Id [{1}] and Command [{2}]", DatabaseType.ToString, pConnectionId, pSQLCommand)
Select Case DatabaseType Select Case DatabaseType
Case Constants.DatabaseType.ECM Case Constants.DatabaseType.ECM
oResult = _Client.ExecuteNonQueryFromECM(pSQLCommand) oResult = _Client.ExecuteNonQueryFromECM(pSQLCommand)
Case Constants.DatabaseType.IDB Case Constants.DatabaseType.IDB
oResult = _Client.ExecuteNonQueryFromIDB(pSQLCommand) oResult = _Client.ExecuteNonQueryFromIDB(pSQLCommand)
Case Else Case Else
Return ExecuteNonQueryFromDatabase(pSQLCommand, DatabaseType, pConnectionId) Return ExecuteNonQueryFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
End Select End Select
If oResult Is Nothing OrElse oResult.OK = False Then If oResult Is Nothing Then
_Logger.Warn("⚠ ExecuteNonQueryFromService: Service returned invalid response [{0}]. Falling back to direct database access.", If(oResult Is Nothing, "null", oResult.ErrorMessage)) Throw New ApplicationException("Unexpected server error ocurred!")
Return ExecuteNonQueryFromDatabase(pSQLCommand, DatabaseType, pConnectionId) End If
If oResult.OK = False Then
Throw New ApplicationException(oResult.ErrorMessage)
End If End If
Return oResult.Result Return oResult.Result
Catch ex As InvalidOperationException
_Logger.Warn("⚠ ExecuteNonQueryFromService skipped: [{0}] Falling back to direct database access.", ex.Message)
Return ExecuteNonQueryFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
Catch ex As Exception Catch ex As Exception
_Logger.Warn("⚠ ExecuteNonQueryFromService failed. Falling back to direct database access.") _Logger.Warn("ExecuteNonQueryFromService failed. Falling back to direct database access.")
_Logger.Error(ex) _Logger.Error(ex)
Return ExecuteNonQueryFromDatabase(pSQLCommand, DatabaseType, pConnectionId) Return ExecuteNonQueryFromDatabase(pSQLCommand, DatabaseType, pConnectionId)
@@ -884,15 +456,13 @@ Public Class DatabaseWithFallback
Private Function ExecuteNonQueryFromDatabase(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Boolean Private Function ExecuteNonQueryFromDatabase(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Boolean
Try Try
_Logger.Debug("ExecuteNonQueryFromDatabase [{0}] with Connection Id [{1}] and Command [{2}]", DatabaseType.ToString, pConnectionId, pSQLCommand)
Select Case DatabaseType Select Case DatabaseType
Case Constants.DatabaseType.IDB Case Constants.DatabaseType.IDB
Return _DatabaseIDB.ExecuteNonQuery(pSQLCommand) Return _DatabaseIDB.ExecuteNonQuery(pSQLCommand)
Case Else Case Else
If pConnectionId > 0 Then If pConnectionId > 0 Then
Dim oConnectionString = GetCachedConnectionString(pConnectionId) ' ← NEU: Cache statt direkter DB-Abfrage Dim oConnectionString = _DatabaseECM.Get_ConnectionStringforID(pConnectionId)
Return _DatabaseECM.ExecuteNonQueryWithConnection(pSQLCommand, oConnectionString) Return _DatabaseECM.ExecuteNonQueryWithConnection(pSQLCommand, oConnectionString)
Else Else
Return _DatabaseECM.ExecuteNonQuery(pSQLCommand) Return _DatabaseECM.ExecuteNonQuery(pSQLCommand)

View File

@@ -44,22 +44,6 @@
<OptionInfer>On</OptionInfer> <OptionInfer>On</OptionInfer>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="DigitalData.Modules.Base, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Config, Version=1.4.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Database, Version=2.3.7.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath> <HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath>
@@ -312,7 +296,22 @@
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="ErrorLog.txt" /> <ProjectReference Include="..\Base\Base.vbproj">
<Project>{6ea0c51f-c2b1-4462-8198-3de0b32b74f8}</Project>
<Name>Base</Name>
</ProjectReference>
<ProjectReference Include="..\Config\Config.vbproj">
<Project>{44982f9b-6116-44e2-85d0-f39650b1ef99}</Project>
<Name>Config</Name>
</ProjectReference>
<ProjectReference Include="..\Database\Database.vbproj">
<Project>{eaf0ea75-5fa7-485d-89c7-b2d843b03a96}</Project>
<Name>Database</Name>
</ProjectReference>
<ProjectReference Include="..\Logging\Logging.vbproj">
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
<Name>Logging</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup> <PropertyGroup>

View File

@@ -25,7 +25,7 @@ Namespace Modules.IDB
Return True Return True
End If End If
Logger.Warn("⚠ Error while setting Attribute Value: [{0}]", oResponse.ErrorMessage) Logger.Warn("Error while setting Attribute Value: [{0}]", oResponse.ErrorMessage)
Return False Return False
Catch ex As Exception Catch ex As Exception

View File

@@ -12,8 +12,8 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyDescription("")> <Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("Digital Data")> <Assembly: AssemblyCompany("Digital Data")>
<Assembly: AssemblyProduct("EDMIAPI")> <Assembly: AssemblyProduct("EDMIAPI")>
<Assembly: AssemblyCopyright("Copyright © 2026")> <Assembly: AssemblyCopyright("Copyright © 2023")>
<Assembly: AssemblyTrademark("2.9.0")> <Assembly: AssemblyTrademark("1.6.1.1")>
<Assembly: ComVisible(False)> <Assembly: ComVisible(False)>
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.9.0.0")> <Assembly: AssemblyVersion("1.6.1.1")>
<Assembly: AssemblyFileVersion("1.6.1.1")> <Assembly: AssemblyFileVersion("1.6.1.1")>

File diff suppressed because it is too large Load Diff

View File

@@ -44,38 +44,6 @@
<assemblyIdentity name="FirebirdSql.Data.FirebirdClient" publicKeyToken="3750abcc3150b00c" culture="neutral" /> <assemblyIdentity name="FirebirdSql.Data.FirebirdClient" publicKeyToken="3750abcc3150b00c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.5.0.0" newVersion="7.5.0.0" /> <bindingRedirect oldVersion="0.0.0.0-7.5.0.0" newVersion="7.5.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.3.0" newVersion="6.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.3" newVersion="4.1.1.3" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.4.0" newVersion="4.2.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /></startup></configuration> <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /></startup></configuration>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="NLog" version="5.0.5" targetFramework="net462" /> <package id="NLog" version="5.0.5" targetFramework="net461" />
</packages> </packages>

View File

@@ -45,8 +45,8 @@
<OptionInfer>On</OptionInfer> <OptionInfer>On</OptionInfer>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="DigitalData.Modules.Logging"> <Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath> <HintPath>..\packages\DigitalData.Modules.Logging.2.6.5\lib\net462\DigitalData.Modules.Logging.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">

View File

@@ -15,7 +15,7 @@ Option Explicit On
Namespace My Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0"), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase Inherits Global.System.Configuration.ApplicationSettingsBase

View File

@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="NLog" version="5.0.5" targetFramework="net462" /> <package id="DigitalData.Modules.Logging" version="2.6.5" targetFramework="net462" />
<package id="NLog" version="5.0.5" targetFramework="net461" />
</packages> </packages>

View File

@@ -45,8 +45,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <HintPath>..\packages\DigitalData.Modules.Logging.2.6.5\lib\net462\DigitalData.Modules.Logging.dll</HintPath>
<HintPath>..\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">

View File

@@ -15,7 +15,7 @@ Option Explicit On
Namespace My Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0"), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase Inherits Global.System.Configuration.ApplicationSettingsBase

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="DigitalData.Modules.Logging" version="2.6.5" targetFramework="net48" />
<package id="NLog" version="5.0.5" targetFramework="net48" /> <package id="NLog" version="5.0.5" targetFramework="net48" />
<package id="NuGet.CommandLine" version="6.13.2" targetFramework="net48" developmentDependency="true" /> <package id="NuGet.CommandLine" version="6.13.2" targetFramework="net48" developmentDependency="true" />
<package id="protobuf-net" version="2.4.0" targetFramework="net461" /> <package id="protobuf-net" version="2.4.0" targetFramework="net461" />

View File

@@ -1,8 +1,6 @@
Imports System.DirectoryServices Imports System.DirectoryServices
Imports System.DirectoryServices.AccountManagement Imports System.DirectoryServices.AccountManagement
Imports System.Runtime.InteropServices
Imports System.Text.RegularExpressions Imports System.Text.RegularExpressions
Imports System.Threading
Imports DigitalData.Modules.Database Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
@@ -15,9 +13,6 @@ Public Class ActiveDirectoryInterface
Private _rootNode As DirectoryEntry Private _rootNode As DirectoryEntry
Private Const SEARCH_LIMIT = 50000 Private Const SEARCH_LIMIT = 50000
Private Const AD_RETRY_COUNT = 3
Private Const AD_RETRY_DELAY_MS = 5000
Private Const LDAP_SERVER_NOT_OPERATIONAL As Integer = &H8007203A
Private Const SAMACCOUNTNAME = "samaccountname" Private Const SAMACCOUNTNAME = "samaccountname"
Private Const OBJECTCLASS = "objectClass" Private Const OBJECTCLASS = "objectClass"
@@ -52,7 +47,9 @@ Public Class ActiveDirectoryInterface
End Function End Function
Public Function SyncUsersForGroup(GroupName As String, AttributeMappings As List(Of AttributeMapping), MSSQL As MSSQLServer, Optional Filter As String = DEFAULT_USER_FILTER) As List(Of ADUser) Public Function SyncUsersForGroup(GroupName As String, AttributeMappings As List(Of AttributeMapping), MSSQL As MSSQLServer, Optional Filter As String = DEFAULT_USER_FILTER) As List(Of ADUser)
Dim oUsers As List(Of ADUser) Dim oUsers As New List(Of ADUser)
Dim oSyncedUsers As New List(Of ADUser)
Dim oGroupId As Int64 = Nothing
Dim oSQLSync As New SyncUsers.SyncUsersMSSQL(_logConfig, MSSQL) Dim oSQLSync As New SyncUsers.SyncUsersMSSQL(_logConfig, MSSQL)
Dim oSyncedUsersMSSQL As List(Of ADUser) Dim oSyncedUsersMSSQL As List(Of ADUser)
@@ -60,18 +57,13 @@ Public Class ActiveDirectoryInterface
Try Try
_logger.Debug("Fetching users from ActiveDirectory") _logger.Debug("Fetching users from ActiveDirectory")
oUsers = ListUsers(GroupName, AttributeMappings, Filter) oUsers = ListUsers(GroupName, AttributeMappings, Filter)
If oUsers Is Nothing Then
_logger.Warn("ActiveDirectory query failed for group [{0}]. Sync skipped.", GroupName)
Return Nothing
End If
_logger.Debug("Found {0} users", oUsers.Count) _logger.Debug("Found {0} users", oUsers.Count)
Catch ex As Exception Catch ex As Exception
_logger.Error(ex) _logger.Error(ex)
Return Nothing Return Nothing
End Try End Try
' Do the actual sync into MSSQL
If MSSQL IsNot Nothing Then If MSSQL IsNot Nothing Then
oSyncedUsersMSSQL = oSQLSync.SyncUsers(GroupName, oUsers, AttributeMappings) oSyncedUsersMSSQL = oSQLSync.SyncUsers(GroupName, oUsers, AttributeMappings)
If oSyncedUsersMSSQL.Count > 0 Then If oSyncedUsersMSSQL.Count > 0 Then
@@ -146,112 +138,88 @@ Public Class ActiveDirectoryInterface
Public Async Function ListUsersAsync(GroupName As String, Optional Filter As String = DEFAULT_USER_FILTER) As Task(Of List(Of ADUser)) Public Async Function ListUsersAsync(GroupName As String, Optional Filter As String = DEFAULT_USER_FILTER) As Task(Of List(Of ADUser))
Return Await Task.Run(Function() ListUsers(GroupName, Filter)) Return Await Task.Run(Function() ListUsers(GroupName, Filter))
End Function End Function
Public Function ListUsers(GroupName As String, AttributeMappings As List(Of AttributeMapping), Optional Filter As String = DEFAULT_USER_FILTER) As List(Of ADUser) Public Function ListUsers(GroupName As String, AttributeMappings As List(Of AttributeMapping), Optional Filter As String = DEFAULT_USER_FILTER) As List(Of ADUser)
For oAttempt As Integer = 1 To AD_RETRY_COUNT Dim oUsers As New List(Of ADUser)
Try
Dim oUsers As New List(Of ADUser)
Using oContext As New PrincipalContext(ContextType.Domain) Try
Using oGroupPrincipal As GroupPrincipal = GroupPrincipal.FindByIdentity(oContext, IdentityType.Name, GroupName) Using oContext As New PrincipalContext(ContextType.Domain)
If oGroupPrincipal Is Nothing Then Using oGroupPrincipal As GroupPrincipal = GroupPrincipal.FindByIdentity(oContext, IdentityType.Name, GroupName)
_logger.Debug("Group {0} does not exist.", GroupName) If oGroupPrincipal Is Nothing Then
Return oUsers _logger.Debug("Group {0} does not exist.", GroupName)
End If Return oUsers
End If
_logger.Debug("Listing members of Group {0}", GroupName) _logger.Debug("Listing members of Group {0}", GroupName)
Using oMembers = oGroupPrincipal.GetMembers(True) Using oMembers = oGroupPrincipal.GetMembers(True)
For Each oMember As Principal In oMembers For Each oMember As Principal In oMembers
Try Try
If TypeOf oMember Is UserPrincipal Then If TypeOf oMember Is UserPrincipal Then
Dim oUser As UserPrincipal = DirectCast(oMember, UserPrincipal) Dim oUser As UserPrincipal = DirectCast(oMember, UserPrincipal)
Dim oUserEx As UserPrincipalEx = UserPrincipalEx.FindByIdentity(oContext, IdentityType.SamAccountName, oUser.SamAccountName) Dim oUserEx As UserPrincipalEx = UserPrincipalEx.FindByIdentity(oContext, IdentityType.SamAccountName, oUser.SamAccountName)
Dim oCustomAttributes As New List(Of ADUser.CustomAttribute) Dim oCustomAttributes As New List(Of ADUser.CustomAttribute)
Dim oUserFound = FindUserWithFilter(oUserEx, Filter) Dim oUserFound = FindUserWithFilter(oUserEx, Filter)
If oUserFound = False Then If oUserFound = False Then
_logger.Debug("User [{0}] was skipped out due to user filter.", oUserEx.SamAccountName) _logger.Debug("User [{0}] was skipped out due to user filter.", oUserEx.SamAccountName)
Continue For Continue For
End If
If oUserEx IsNot Nothing Then
For Each oMap As AttributeMapping In AttributeMappings
Dim oAttributeValue = oUserEx.GetAttributeValue(oMap.AttributeName)
If oAttributeValue <> String.Empty Then
oCustomAttributes.Add(New ADUser.CustomAttribute() With {
.Name = oMap.AttributeName,
.Value = oAttributeValue,
.FirebirdSyskey = oMap.FirebirdSyskey,
.MSSQLColumn = oMap.MSSQLColumn
})
End If
Next
End If
oUsers.Add(New ADUser With {
.SId = oUser.Sid,
.samAccountName = oUser.SamAccountName,
.Middlename = oUser.MiddleName,
.GivenName = oUser.GivenName,
.Surname = oUser.Surname,
.GUID = oUser.Guid,
.Email = oUser.EmailAddress,
.CustomAttributes = oCustomAttributes
})
End If End If
Catch ex As Exception _logger.Debug("User [{0}] passed the filter.", oUserEx.SamAccountName)
_logger.Warn("User could not be processed")
_logger.Error(ex) ' TODO: Figure out why oUserEx can be nothing for certain users
End Try If oUserEx IsNot Nothing Then
Next For Each oMap As AttributeMapping In AttributeMappings
End Using Dim oAttributeValue = oUserEx.GetAttributeValue(oMap.AttributeName)
If oAttributeValue <> String.Empty Then
_logger.Debug("Attribute [{0}] is not empty.", oMap.AttributeName)
oCustomAttributes.Add(New ADUser.CustomAttribute() With {
.Name = oMap.AttributeName,
.Value = oAttributeValue,
.FirebirdSyskey = oMap.FirebirdSyskey,
.MSSQLColumn = oMap.MSSQLColumn
})
Else
_logger.Debug("Attribute [{0}] is empty.", oMap.AttributeName)
End If
Next
Else
_logger.Debug("Could not fetch CustomAttributes for user [{0}]", oUser)
End If
_logger.Debug("Trying to add User [{0}] to user list", oUser)
Dim oNewUser As New ADUser With {
.SId = oUser.Sid,
.samAccountName = oUser.SamAccountName,
.Middlename = oUser.MiddleName,
.GivenName = oUser.GivenName,
.Surname = oUser.Surname,
.GUID = oUser.Guid,
.Email = oUser.EmailAddress,
.CustomAttributes = oCustomAttributes
}
oUsers.Add(oNewUser)
End If
Catch ex As Exception
_logger.Warn("User could not be processed")
_logger.Error(ex)
End Try
Next
End Using End Using
End Using End Using
End Using
Return oUsers Return oUsers
Catch ex As Exception Catch ex As Exception
If IsTransientAdException(ex) AndAlso oAttempt < AD_RETRY_COUNT Then _logger.Error(ex)
_logger.Warn("ActiveDirectory unavailable (attempt {0}/{1}) for group [{2}]. Retrying in {3} ms.", oAttempt, AD_RETRY_COUNT, GroupName, AD_RETRY_DELAY_MS) Return oUsers
Thread.Sleep(AD_RETRY_DELAY_MS) End Try
Continue For
End If
_logger.Error(ex)
If IsTransientAdException(ex) Then
_logger.Warn("ActiveDirectory unavailable after {0} attempts for group [{1}]. Returning Nothing.", AD_RETRY_COUNT, GroupName)
Return Nothing
End If
Return New List(Of ADUser)
End Try
Next
Return Nothing
End Function End Function
Private Function IsTransientAdException(ex As Exception) As Boolean
Dim oCurrent = ex
While oCurrent IsNot Nothing
If TypeOf oCurrent Is COMException Then
Dim oComEx = DirectCast(oCurrent, COMException)
If oComEx.ErrorCode = LDAP_SERVER_NOT_OPERATIONAL Then
Return True
End If
End If
If oCurrent.Message IsNot Nothing AndAlso oCurrent.Message.IndexOf("The server is not operational", StringComparison.OrdinalIgnoreCase) >= 0 Then
Return True
End If
oCurrent = oCurrent.InnerException
End While
Return False
End Function
Private Function GetPartFromFirstOU(dnString As String) As String Private Function GetPartFromFirstOU(dnString As String) As String
Dim keyword As String = "OU=" Dim keyword As String = "OU="
Dim index As Integer = dnString.IndexOf(keyword) Dim index As Integer = dnString.IndexOf(keyword)

View File

@@ -26,11 +26,6 @@ Namespace SyncUsers
Dim oCreatedUsers As New List(Of ADUser) Dim oCreatedUsers As New List(Of ADUser)
Dim oUpdatedUsers As New List(Of ADUser) Dim oUpdatedUsers As New List(Of ADUser)
If Users Is Nothing Then
_logger.Warn("SyncUsers aborted: Users is Nothing. Skipping sync and delete step for group [{0}].", GroupName)
Return oSyncedUsers
End If
Try Try
_logger.Debug("Getting group Id for group {0}", GroupName) _logger.Debug("Getting group Id for group {0}", GroupName)
oGroupId = GetGroupId(GroupName) oGroupId = GetGroupId(GroupName)
@@ -50,6 +45,7 @@ Namespace SyncUsers
Dim oUserId As Long Dim oUserId As Long
Dim oUserExists As Boolean Dim oUserExists As Boolean
' Check if user already exists
Try Try
_logger.Debug("Checking if user [{0}] exists", oUser) _logger.Debug("Checking if user [{0}] exists", oUser)
oUserId = GetUserId(oUser.samAccountName) oUserId = GetUserId(oUser.samAccountName)
@@ -61,32 +57,38 @@ Namespace SyncUsers
Continue For Continue For
End Try End Try
' Collect user ids from existing users
If oUserExists Then
oSyncedUserIds.Add(oUserId)
End If
' Create or update user
Try Try
If Not oUserExists Then If Not oUserExists Then
_logger.Debug("Creating new user for [{0}]", oUser) _logger.Debug("Creating new user for [{0}]", oUser)
oUserId = CreateUser(oUser) oUserId = CreateUser(oUser)
_logger.Debug("User created with Id [{0}]", oUserId) _logger.Debug("User created with Id [{0}]", oUserId)
_logger.Info("Added new User [{0}]", oUser) _logger.Info("Added new User [{0}]", oUser)
oCreatedUsers.Add(oUser) oCreatedUsers.Add(oUser)
Else Else
_logger.Debug("Updating user [{0}]", oUser) _logger.Debug("Updating user [{0}]", oUser)
oUserId = UpdateUser(oUser) oUserId = UpdateUser(oUser)
If oUserId <> 0 Then If oUserId <> 0 Then
_logger.Debug("User updated with Id [{0}]", oUserId) _logger.Debug("User created with Id [{0}]", oUserId)
_logger.Info("Updated User [{0}]", oUser) _logger.Info("Updated User [{0}]", oUser)
oUpdatedUsers.Add(oUser) oUpdatedUsers.Add(oUser)
End If End If
End If End If
Catch ex As Exception Catch ex As Exception
_logger.Error(ex) _logger.Error(ex)
_logger.Warn("Could Not create/update user [{0}]. Skipping.", oUser) _logger.Warn("Could Not create/update user [{0}]. Skipping.", oUser)
Continue For Continue For
End Try End Try
If oUserId > 0 Then ' Add custom attributes to user
oSyncedUserIds.Add(oUserId)
End If
Try Try
AddCustomAttributesToUser(oUser, oUserId) AddCustomAttributesToUser(oUser, oUserId)
Catch ex As Exception Catch ex As Exception
@@ -94,6 +96,7 @@ Namespace SyncUsers
_logger.Debug("Could Not add custom attributes to user {0}. Continuing.", oUser) _logger.Debug("Could Not add custom attributes to user {0}. Continuing.", oUser)
End Try End Try
' Add the user to group
Try Try
If AddUserToGroup(oUserId, oGroupId) Then If AddUserToGroup(oUserId, oGroupId) Then
_logger.Info("User [{0}] added to group [{1}]", oUser, GroupName) _logger.Info("User [{0}] added to group [{1}]", oUser, GroupName)
@@ -107,33 +110,26 @@ Namespace SyncUsers
oSyncedUsers.Add(oUser) oSyncedUsers.Add(oUser)
Next Next
' Safety: never delete relations on empty source result ' Delete users that are assigned to the group but no longer exist in active directory
If Users.Count = 0 Then Dim oUserIdString = String.Join(",", oSyncedUserIds)
_logger.Warn("Safety stop: AD returned 0 users for group [{0}]. Delete step skipped.", GroupName) If oSyncedUserIds.Count = 0 Then
Return oSyncedUsers _logger.Info("Group {0} does not contain any users.", GroupName)
oUserIdString = 0
End If End If
Dim oSQL As String = $"DELETE FROM TBDD_GROUPS_USER WHERE USER_ID NOT IN ({oUserIdString}) AND GROUP_ID = {oGroupId}"
If oSyncedUserIds.Count > 0 Then Dim oDeletedRelations = _mssql.GetScalarValue(oSQL)
Dim oUserIdString = String.Join(",", oSyncedUserIds.Distinct())
Dim oSQL As String = $"DELETE FROM TBDD_GROUPS_USER WHERE USER_ID NOT IN ({oUserIdString}) AND GROUP_ID = {oGroupId}"
Dim oDeleteResult = _mssql.ExecuteNonQuery(oSQL)
If oDeleteResult Then
_logger.Info("User-group relations cleanup executed for group [{0}].", GroupName)
Else
_logger.Warn("User-group relations cleanup failed for group [{0}].", GroupName)
End If
Else
_logger.Warn("Safety stop: No synced user IDs collected for group [{0}]. Delete step skipped.", GroupName)
End If
If oCreatedUsers.Count > 0 Then If oCreatedUsers.Count > 0 Then
_logger.Info("Created [{0}] new users", oCreatedUsers.Count) _logger.Info("Created [{0}] new users", oCreatedUsers.Count)
End If End If
_logger.Info("Updated [{0}] users", oUpdatedUsers.Count) _logger.Info("Updated [{0}] users", oUpdatedUsers.Count)
If oDeletedRelations > 0 Then
_logger.Info("Removed [{0}] users from Group [{1}]", oDeletedRelations, GroupName)
End If
Return oSyncedUsers Return oSyncedUsers
End Function End Function
Private Function AddUserToGroup(UserId As Integer, GroupId As Integer) As Boolean Implements ISyncUsers.AddUserToGroup Private Function AddUserToGroup(UserId As Integer, GroupId As Integer) As Boolean Implements ISyncUsers.AddUserToGroup
Try Try
Dim oSQL = $"SELECT COUNT(*) FROM TBDD_GROUPS_USER WHERE USER_ID = {UserId} And GROUP_ID = {GroupId}" Dim oSQL = $"SELECT COUNT(*) FROM TBDD_GROUPS_USER WHERE USER_ID = {UserId} And GROUP_ID = {GroupId}"

View File

@@ -49,110 +49,80 @@
<Reference Include="BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=072edcf4a5328938, processorArchitecture=MSIL"> <Reference Include="BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=072edcf4a5328938, processorArchitecture=MSIL">
<HintPath>..\packages\BouncyCastle.Cryptography.2.5.0\lib\net461\BouncyCastle.Cryptography.dll</HintPath> <HintPath>..\packages\BouncyCastle.Cryptography.2.5.0\lib\net461\BouncyCastle.Cryptography.dll</HintPath>
</Reference> </Reference>
<Reference Include="DigitalData.Modules.Base">
<HintPath>..\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Database">
<HintPath>..\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging">
<HintPath>..\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference>
<Reference Include="DocumentFormat.OpenXml, Version=3.2.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL"> <Reference Include="DocumentFormat.OpenXml, Version=3.2.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<HintPath>..\packages\DocumentFormat.OpenXml.3.2.0\lib\net46\DocumentFormat.OpenXml.dll</HintPath> <HintPath>..\packages\DocumentFormat.OpenXml.3.2.0\lib\net46\DocumentFormat.OpenXml.dll</HintPath>
</Reference> </Reference>
<Reference Include="DocumentFormat.OpenXml.Framework, Version=3.2.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL"> <Reference Include="DocumentFormat.OpenXml.Framework, Version=3.2.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<HintPath>..\packages\DocumentFormat.OpenXml.Framework.3.2.0\lib\net46\DocumentFormat.OpenXml.Framework.dll</HintPath> <HintPath>..\packages\DocumentFormat.OpenXml.Framework.3.2.0\lib\net46\DocumentFormat.OpenXml.Framework.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.barcode.1d.writer, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.barcode.1d.writer, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.barcode.1d.writer.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.barcode.1d.writer.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.barcode.2d.writer, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.barcode.2d.writer, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.barcode.2d.writer.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.barcode.2d.writer.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.CAD, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.CAD, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.CAD.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.CAD.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.CAD.DWG, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.CAD.DWG, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.CAD.DWG.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.CAD.DWG.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.Common, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.Common, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.Common.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Common.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.Document, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.Document, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.Document.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Document.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.Email, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.Email, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.Email.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Email.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.HTML, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.HTML, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.HTML.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.HTML.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.Imaging, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.Imaging, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.Imaging.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.Imaging.Formats, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.Imaging.Formats, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.Imaging.Formats.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.Formats.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.Imaging.Formats.Conversion, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.Imaging.Formats.Conversion, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.Imaging.Formats.Conversion.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.Formats.Conversion.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.Imaging.Rendering, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.Imaging.Rendering, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.Imaging.Rendering.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.Rendering.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.Markdown, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.MSOfficeBinary, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.Markdown.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.MSOfficeBinary.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.MSOfficeBinary, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.OpenDocument, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.MSOfficeBinary.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.OpenDocument.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.OpenDocument, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.OpenXML, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.OpenDocument.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.OpenXML.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.OpenXML, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.OpenXML.Templating, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.OpenXML.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.OpenXML.Templating.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.OpenXML.Templating, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.PDF, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.OpenXML.Templating.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.PDF.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.PDF, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.RTF, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.PDF.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.RTF.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.RTF, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.SVG, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.RTF.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.SVG.dll</HintPath>
</Reference>
<Reference Include="GdPicture.NET.14.SVG, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.SVG.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.wia.gateway, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6973b5c22dcf45f7, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.wia.gateway, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6973b5c22dcf45f7, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.wia.gateway.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.wia.gateway.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes> <EmbedInteropTypes>True</EmbedInteropTypes>
</Reference> </Reference>
<Reference Include="Google.Protobuf, Version=3.33.2.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL"> <Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.33.2\lib\net45\Google.Protobuf.dll</HintPath> <HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.10.0.5\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.Cryptography, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.Cryptography.10.0.5\lib\net462\Microsoft.Bcl.Cryptography.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.HashCode, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.HashCode.6.0.0\lib\net462\Microsoft.Bcl.HashCode.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NativeSDK.Exceptions, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\NativeSDK.Exceptions.dll</HintPath>
</Reference>
<Reference Include="NativeSDK.Settings, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\NativeSDK.Settings.dll</HintPath>
</Reference>
<Reference Include="NativeSDK.Settings.Edition, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\NativeSDK.Settings.Edition.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath> <HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference> </Reference>
@@ -162,8 +132,8 @@
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath> <HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="OpenMcdf, Version=3.1.4.0, Culture=neutral, PublicKeyToken=fdbb1629d7c00800, processorArchitecture=MSIL"> <Reference Include="OpenMcdf, Version=2.4.1.0, Culture=neutral, PublicKeyToken=fdbb1629d7c00800, processorArchitecture=MSIL">
<HintPath>..\packages\OpenMcdf.3.1.4\lib\netstandard2.0\OpenMcdf.dll</HintPath> <HintPath>..\packages\OpenMcdf.2.4.1\lib\net40\OpenMcdf.dll</HintPath>
</Reference> </Reference>
<Reference Include="protobuf-net, Version=3.0.0.0, Culture=neutral, PublicKeyToken=257b51d87d2e4d67, processorArchitecture=MSIL"> <Reference Include="protobuf-net, Version=3.0.0.0, Culture=neutral, PublicKeyToken=257b51d87d2e4d67, processorArchitecture=MSIL">
<HintPath>..\packages\protobuf-net.3.2.46\lib\net462\protobuf-net.dll</HintPath> <HintPath>..\packages\protobuf-net.3.2.46\lib\net462\protobuf-net.dll</HintPath>
@@ -175,64 +145,55 @@
<HintPath>..\packages\RtfPipe.2.0.7677.4303\lib\net45\RtfPipe.dll</HintPath> <HintPath>..\packages\RtfPipe.2.0.7677.4303\lib\net45\RtfPipe.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Buffers, Version=4.0.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.6.1\lib\net462\System.Buffers.dll</HintPath> <HintPath>..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.CodeDom, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.CodeDom, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.CodeDom.8.0.0\lib\net462\System.CodeDom.dll</HintPath> <HintPath>..\packages\System.CodeDom.8.0.0\lib\net462\System.CodeDom.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Collections.Immutable, Version=10.0.0.5, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <Reference Include="System.Collections.Immutable, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Collections.Immutable.10.0.5\lib\net462\System.Collections.Immutable.dll</HintPath> <HintPath>..\packages\System.Collections.Immutable.8.0.0\lib\net462\System.Collections.Immutable.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.DirectoryServices" /> <Reference Include="System.DirectoryServices" />
<Reference Include="System.DirectoryServices.AccountManagement" /> <Reference Include="System.DirectoryServices.AccountManagement" />
<Reference Include="System.Formats.Asn1, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Formats.Asn1.10.0.5\lib\net462\System.Formats.Asn1.dll</HintPath>
</Reference>
<Reference Include="System.IO.Compression" /> <Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Packaging, Version=10.0.0.5, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <Reference Include="System.IO.Packaging, Version=8.0.0.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Packaging.10.0.5\lib\net462\System.IO.Packaging.dll</HintPath> <HintPath>..\packages\System.IO.Packaging.8.0.1\lib\net462\System.IO.Packaging.dll</HintPath>
</Reference>
<Reference Include="System.IO.Pipelines, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Pipelines.10.0.5\lib\net462\System.IO.Pipelines.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Management" /> <Reference Include="System.Management" />
<Reference Include="System.Memory, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Memory, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.6.3\lib\net462\System.Memory.dll</HintPath> <HintPath>..\packages\System.Memory.4.6.0\lib\net462\System.Memory.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Net.Http.Formatting, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="System.Net.Http.Formatting, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.6.0.0\lib\net45\System.Net.Http.Formatting.dll</HintPath> <HintPath>..\packages\Microsoft.AspNet.WebApi.Client.6.0.0\lib\net45\System.Net.Http.Formatting.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Numerics" /> <Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <Reference Include="System.Numerics.Vectors, Version=4.1.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.6.1\lib\net462\System.Numerics.Vectors.dll</HintPath> <HintPath>..\packages\System.Numerics.Vectors.4.6.0\lib\net462\System.Numerics.Vectors.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.1.2\lib\net462\System.Runtime.CompilerServices.Unsafe.dll</HintPath> <HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Runtime.Serialization" /> <Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Security" /> <Reference Include="System.Security" />
<Reference Include="System.Security.Cryptography.Pkcs, Version=10.0.0.5, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <Reference Include="System.Security.Cryptography.Pkcs, Version=8.0.0.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Pkcs.10.0.5\lib\net462\System.Security.Cryptography.Pkcs.dll</HintPath> <HintPath>..\packages\System.Security.Cryptography.Pkcs.8.0.1\lib\net462\System.Security.Cryptography.Pkcs.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.ServiceModel" /> <Reference Include="System.ServiceModel" />
<Reference Include="System.Text.Encodings.Web, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Text.Encodings.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Encodings.Web.10.0.5\lib\net462\System.Text.Encodings.Web.dll</HintPath> <HintPath>..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Text.Json, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Text.Json, Version=8.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Json.10.0.5\lib\net462\System.Text.Json.dll</HintPath> <HintPath>..\packages\System.Text.Json.8.0.5\lib\net462\System.Text.Json.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Threading.Channels, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Channels.10.0.5\lib\net462\System.Threading.Channels.dll</HintPath> <HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.6.3\lib\net462\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Transactions" /> <Reference Include="System.Transactions" />
<Reference Include="System.ValueTuple, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.6.1\lib\net462\System.ValueTuple.dll</HintPath> <HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
@@ -265,7 +226,6 @@
<Compile Include="GrapQLInterface\LoginData.vb" /> <Compile Include="GrapQLInterface\LoginData.vb" />
<Compile Include="GrapQLInterface\LogoutData.vb" /> <Compile Include="GrapQLInterface\LogoutData.vb" />
<Compile Include="GrapQLInterface\QueryData.vb" /> <Compile Include="GrapQLInterface\QueryData.vb" />
<Compile Include="ZUGFeRDInterface\ebInterface6.1\InvoiceType.vb" />
<Compile Include="ZUGFeRDInterface\Enums\ErrorCodes.vb" /> <Compile Include="ZUGFeRDInterface\Enums\ErrorCodes.vb" />
<Compile Include="ZUGFeRDInterface\Enums\Item_Types.vb" /> <Compile Include="ZUGFeRDInterface\Enums\Item_Types.vb" />
<Compile Include="ZUGFeRDInterface\Exceptions.vb" /> <Compile Include="ZUGFeRDInterface\Exceptions.vb" />
@@ -300,9 +260,6 @@
<Compile Include="ZUGFeRDInterface\Version2.2_FacturX\CrossIndustryInvoiceType.vb" /> <Compile Include="ZUGFeRDInterface\Version2.2_FacturX\CrossIndustryInvoiceType.vb" />
<Compile Include="ZUGFeRDInterface\Version2.3_3_FacturX\CrossIndustryInvoiceType.vb" /> <Compile Include="ZUGFeRDInterface\Version2.3_3_FacturX\CrossIndustryInvoiceType.vb" />
<Compile Include="ZUGFeRDInterface\Version2.3_FacturX\CrossIndustryInvoiceType.vb" /> <Compile Include="ZUGFeRDInterface\Version2.3_FacturX\CrossIndustryInvoiceType.vb" />
<Compile Include="ZUGFeRDInterface\Version2.4_FacturX\CrossIndustryInvoiceType.vb" />
<Compile Include="ZUGFeRDInterface\Version2.5_2_FacturX\CrossIndustryInvoiceType.vb" />
<Compile Include="ZUGFeRDInterface\Version2.5_FacturX\CrossIndustryInvoiceType.vb" />
<Compile Include="ZUGFeRDInterface\XmlItemProperty.vb" /> <Compile Include="ZUGFeRDInterface\XmlItemProperty.vb" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -326,16 +283,30 @@
</None> </None>
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Base\Base.vbproj">
<Project>{6ea0c51f-c2b1-4462-8198-3de0b32b74f8}</Project>
<Name>Base</Name>
</ProjectReference>
<ProjectReference Include="..\Database\Database.vbproj">
<Project>{eaf0ea75-5fa7-485d-89c7-b2d843b03a96}</Project>
<Name>Database</Name>
</ProjectReference>
<ProjectReference Include="..\Logging\Logging.vbproj">
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
<Name>Logging</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup /> <ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent> <PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<Import Project="..\packages\GdPicture.runtimes.windows.14.4.4\build\net462\GdPicture.runtimes.windows.targets" Condition="Exists('..\packages\GdPicture.runtimes.windows.14.4.4\build\net462\GdPicture.runtimes.windows.targets')" /> <Import Project="..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets" Condition="Exists('..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <PropertyGroup>
<ErrorText>Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".</ErrorText> <ErrorText>Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".</ErrorText>
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('..\packages\GdPicture.runtimes.windows.14.4.4\build\net462\GdPicture.runtimes.windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GdPicture.runtimes.windows.14.4.4\build\net462\GdPicture.runtimes.windows.targets'))" /> <Error Condition="!Exists('..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets'))" />
</Target> </Target>
</Project> </Project>

View File

@@ -12,8 +12,8 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyDescription("")> <Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("Digital Data")> <Assembly: AssemblyCompany("Digital Data")>
<Assembly: AssemblyProduct("Modules.Interfaces")> <Assembly: AssemblyProduct("Modules.Interfaces")>
<Assembly: AssemblyCopyright("Copyright © 2026")> <Assembly: AssemblyCopyright("Copyright © 2025")>
<Assembly: AssemblyTrademark("2.5.2.0")> <Assembly: AssemblyTrademark("2.3.7.0")>
<Assembly: ComVisible(False)> <Assembly: ComVisible(False)>
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.5.2.0")> <Assembly: AssemblyVersion("2.3.7.0")>
<Assembly: AssemblyFileVersion("2.5.2.0")> <Assembly: AssemblyFileVersion("2.3.7.0")>

View File

@@ -3,7 +3,6 @@ Imports System.Xml
Imports System.Xml.Serialization Imports System.Xml.Serialization
Imports DigitalData.Modules.Interfaces.Exceptions Imports DigitalData.Modules.Interfaces.Exceptions
Imports DigitalData.Modules.Interfaces.PDFEmbeds Imports DigitalData.Modules.Interfaces.PDFEmbeds
Imports DigitalData.Modules.Interfaces.PropertyValues
Imports DigitalData.Modules.Interfaces.ZUGFeRD Imports DigitalData.Modules.Interfaces.ZUGFeRD
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports GdPicture14 Imports GdPicture14
@@ -22,23 +21,17 @@ Public Class ZUGFeRDInterface
Public Const ZUGFERD_SPEC_2x = "ZUGFERD_2x" Public Const ZUGFERD_SPEC_2x = "ZUGFERD_2x"
Public Const ZUGFERD_SPEC_2_3x = "ZUGFERD_2_3x" Public Const ZUGFERD_SPEC_2_3x = "ZUGFERD_2_3x"
Public Const UBL_SPEC_21 = "UBL_21"
Public Const XMLSCHEMA_ZUGFERD_10 = "Version1_0" Public Const XMLSCHEMA_ZUGFERD_10 = "Version1_0"
Public Const XMLSCHEMA_ZUGFERD_20 = "Version2_0" Public Const XMLSCHEMA_ZUGFERD_20 = "Version2_0"
Public Const XMLSCHEMA_ZUGFERD_211 = "Version2_1_1" Public Const XMLSCHEMA_ZUGFERD_211 = "Version2_1_1"
Public Const XMLSCHEMA_ZUGFERD_22 = "Version2_2_FacturX" Public Const XMLSCHEMA_ZUGFERD_22 = "Version2_2_FacturX"
Public Const XMLSCHEMA_ZUGFERD_23 = "Version2_3_FacturX" Public Const XMLSCHEMA_ZUGFERD_23 = "Version2_3_FacturX"
Public Const XMLSCHEMA_ZUGFERD_233 = "Version2_3_3_FacturX" Public Const XMLSCHEMA_ZUGFERD_233 = "Version2_3_3_FacturX"
Public Const XMLSCHEMA_ZUGFERD_24 = "Version2_4_FacturX"
Public Const XMLSCHEMA_ZUGFERD_25 = "Version2_5_FacturX"
Public Const XMLSCHEMA_ZUGFERD_252 = "Version2_5_2_FacturX"
Public Const UBL_SPEC_21 = "UBL_21"
Public Const XMLSCHEMA_UBL_21_INVOICE = "UBL2_1_INVOICE" Public Const XMLSCHEMA_UBL_21_INVOICE = "UBL2_1_INVOICE"
Public Const XMLSCHEMA_UBL_21_CREDITNOTE = "UBL2_1_CREDITNOTE" Public Const XMLSCHEMA_UBL_21_CREDITNOTE = "UBL2_1_CREDITNOTE"
Public Const EBINTERFACE_SPEC_61 = "EBINTERFACE_61"
Public Const XMLSCHEMA_EBINTERFACE_61 = "Version6_1"
Public Const RECEIPT_TYPE_XML = "XML" Public Const RECEIPT_TYPE_XML = "XML"
Public Const RECEIPT_TYPE_PDF = "PDF" Public Const RECEIPT_TYPE_PDF = "PDF"
@@ -64,15 +57,13 @@ Public Class ZUGFeRDInterface
Public ReadOnly Property FileGroup As FileGroups Public ReadOnly Property FileGroup As FileGroups
Public ReadOnly Property PropertyValues As PropertyValues Public ReadOnly Property PropertyValues As PropertyValues
Public Class ZugferdOptions Public Class ZugferdOptions
Public Property AllowFacturX_Filename As Boolean = True Public Property AllowFacturX_Filename As Boolean = True
Public Property AllowXRechnung_Filename As Boolean = True Public Property AllowXRechnung_Filename As Boolean = True
Public Property AllowZugferd_1_0_Schema As Boolean = False Public Property AllowZugferd_1_0_Schema As Boolean = True
Public Property AllowZugferd_2_x_Schema As Boolean = False Public Property AllowZugferd_2_x_Schema As Boolean = True
Public Property AllowZugferd_2_3_x_Schema As Boolean = False Public Property AllowZugferd_2_3_x_Schema As Boolean = True
Public Property AllowPeppol_3_x_Schema As Boolean = False Public Property AllowPeppol_3_x_Schema As Boolean = False
Public Property AllowEBInterface_Schema As Boolean = False
End Class End Class
Public Class ZugferdResult Public Class ZugferdResult
@@ -93,7 +84,6 @@ Public Class ZUGFeRDInterface
Public ElementValue As String Public ElementValue As String
Public ErrorMessage As String Public ErrorMessage As String
Public ErrorMessageDE As String Public ErrorMessageDE As String
Public ErrorMessageToken As String
End Class End Class
''' <summary> ''' <summary>
@@ -111,7 +101,6 @@ Public Class ZUGFeRDInterface
_Options = New ZugferdOptions() _Options = New ZugferdOptions()
Else Else
_Options = pOptions _Options = pOptions
LogSpecificationOptions(_Options)
End If End If
ApplyFilenameOptions(_Options) ApplyFilenameOptions(_Options)
@@ -128,16 +117,6 @@ Public Class ZUGFeRDInterface
End Try End Try
End Sub End Sub
Private Sub LogSpecificationOptions(options As ZugferdOptions)
_logger.Debug("AllowFacturX_Filename has Value [{0}]",options.AllowFacturX_Filename)
_logger.Debug("AllowXRechnung_Filename has Value [{0}]",options.AllowXRechnung_Filename)
_logger.Debug("AllowZugferd_1_0_Schema has Value [{0}]",options.AllowZugferd_1_0_Schema)
_logger.Debug("AllowZugferd_2_x_Schema has Value [{0}]",options.AllowZugferd_2_x_Schema)
_logger.Debug("AllowZugferd_2_3_x_Schema has Value [{0}]",options.AllowZugferd_2_3_x_Schema)
_logger.Debug("AllowPeppol_3_x_Schema has Value [{0}]",options.AllowPeppol_3_x_Schema)
_logger.Debug("AllowEBInterface_Schema has Value [{0}]", options.AllowEBInterface_Schema)
End Sub
Private Sub ApplyFilenameOptions(pOptions As ZugferdOptions) Private Sub ApplyFilenameOptions(pOptions As ZugferdOptions)
Dim oAllowedFilenames As List(Of String) = ValidFilenames Dim oAllowedFilenames As List(Of String) = ValidFilenames
@@ -169,20 +148,6 @@ Public Class ZUGFeRDInterface
Where(Function(kv) kv.Specification = pSpecification Or kv.Specification = ZUGFERD_SPEC_DEFAULT). Where(Function(kv) kv.Specification = pSpecification Or kv.Specification = ZUGFERD_SPEC_DEFAULT).
ToDictionary(Function(kv) kv.XMLPath, Function(kv) kv) ToDictionary(Function(kv) kv.XMLPath, Function(kv) kv)
Catch ex As Exception
_logger.Error(ex)
End Try
ElseIf pSpecification = EBINTERFACE_SPEC_61 Then
Try
' root-Elemente werden hier herausgefiltert
Dim countElements As Integer = pPropertyMapList.Where(Function(x) x.Specification = pSpecification And Not x.XMLPath.StartsWith("root.")).Count
_logger.Debug("Property map list contains [{0}] elements for specification [{1}]", countElements, pSpecification)
Return pPropertyMapList.
Where(Function(kv) kv.Specification = pSpecification And Not kv.XMLPath.StartsWith("root.")).
ToDictionary(Function(kv) kv.XMLPath, Function(kv) kv)
Catch ex As Exception Catch ex As Exception
_logger.Error(ex) _logger.Error(ex)
End Try End Try
@@ -205,27 +170,6 @@ Public Class ZUGFeRDInterface
Return Nothing Return Nothing
End Function End Function
Public Function FilterRootPropertyMap(pPropertyMapList As List(Of XmlItemProperty), pSpecification As String) As Dictionary(Of String, XmlItemProperty)
' Aktuell verwendet nur ebeInterafce attribute im root-Knoten
If pSpecification = EBINTERFACE_SPEC_61 Then
Try
' root-Elemente werden hier herausgefiltert
Dim countElements As Integer = pPropertyMapList.Where(Function(x) x.Specification = pSpecification And x.XMLPath.StartsWith("root.")).Count
_logger.Debug("Property map list contains [{0}] root attribute elements for specification [{1}]", countElements, pSpecification)
Return pPropertyMapList.
Where(Function(kv) kv.Specification = pSpecification And kv.XMLPath.StartsWith("root.")).
ToDictionary(Function(kv) kv.XMLPath, Function(kv) kv)
Catch ex As Exception
_logger.Error(ex)
End Try
End If
Return Nothing
End Function
Public Function GetSerializedXMLContentFromFile(oFileInfo As FileInfo) As ZugferdResult Public Function GetSerializedXMLContentFromFile(oFileInfo As FileInfo) As ZugferdResult
Dim oResult = New ZugferdResult() Dim oResult = New ZugferdResult()
Dim oMessage As String = String.Empty Dim oMessage As String = String.Empty
@@ -246,14 +190,6 @@ Public Class ZUGFeRDInterface
} }
End Using End Using
oResult = _Validator.ValidateZUGFeRDDocument(oResult)
If oResult.ValidationErrors.Count > 0 Then
_logger.Warn($"XML-Logik - Nach Validator() Errors: {oResult.ValidationErrors.Count}")
Else
_logger.Info($"XML-Logik - Nach Validator() NO Errors.")
End If
Catch ex As ZUGFeRDExecption Catch ex As ZUGFeRDExecption
' Don't log ZUGFeRD Exceptions here, they should be handled by the calling code. ' Don't log ZUGFeRD Exceptions here, they should be handled by the calling code.
' It also produces misleading error messages when checking if an attachment is a zugferd file. ' It also produces misleading error messages when checking if an attachment is a zugferd file.
@@ -345,22 +281,16 @@ Public Class ZUGFeRDInterface
''' </summary> ''' </summary>
''' <param name="pPath"></param> ''' <param name="pPath"></param>
''' <returns>The embedded xml data as an XPath document</returns> ''' <returns>The embedded xml data as an XPath document</returns>
Public Function ValidateZUGFeRDFileWithGDPicture(pPath As String, Optional Validate As Boolean = False) As ZugferdResult Public Function ValidateZUGFeRDFileWithGDPicture(pPath As String) As ZugferdResult
Dim oEmbedExtractor = New PDFEmbeds(_logConfig) Dim oEmbedExtractor = New PDFEmbeds(_logConfig)
Try Try
' Extract XML attachments only! ' Extract XML attachments only!
Dim oFiles = oEmbedExtractor.Extract(pPath, New List(Of String) From {"xml"}) Dim oFiles = oEmbedExtractor.Extract(pPath, New List(Of String) From {"xml"})
If Validate Then
Dim oZugferdResult = HandleEmbeddedFiles(oFiles)
Return _Validator.ValidateZUGFeRDDocument(oZugferdResult)
Else
' Attachments are in this case the files that are embedded into a pdf file,
' like for example the zugferd-invoice.xml file
Return HandleEmbeddedFiles(oFiles)
End If
' Attachments are in this case the files that are embedded into a pdf file,
' like for example the zugferd-invoice.xml file
Return HandleEmbeddedFiles(oFiles)
Catch ex As ZUGFeRDExecption Catch ex As ZUGFeRDExecption
' Don't log ZUGFeRD Exceptions here, they should be handled by the calling code. ' Don't log ZUGFeRD Exceptions here, they should be handled by the calling code.
@@ -466,24 +396,9 @@ Public Class ZUGFeRDInterface
}) })
End If End If
'' Reihenfolge ab 2.3 geändert. Neuste Version immer zuerst bzw. oben '' Reihenfolge ab 2.3 geändert. Neuste Version immer zuerst
If _Options.AllowZugferd_2_3_x_Schema Then If _Options.AllowZugferd_2_3_x_Schema Then
oAllowedTypes.AddRange(New List(Of AllowedType) From { oAllowedTypes.AddRange(New List(Of AllowedType) From {
New AllowedType With {
.SchemaType = GetType(Version2_5_2_FacturX.CrossIndustryInvoiceType),
.Specification = ZUGFERD_SPEC_2_3x,
.XMLSchema = XMLSCHEMA_ZUGFERD_252
},
New AllowedType With {
.SchemaType = GetType(Version2_5_FacturX.CrossIndustryInvoiceType),
.Specification = ZUGFERD_SPEC_2_3x,
.XMLSchema = XMLSCHEMA_ZUGFERD_25
},
New AllowedType With {
.SchemaType = GetType(Version2_4_FacturX.CrossIndustryInvoiceType),
.Specification = ZUGFERD_SPEC_2_3x,
.XMLSchema = XMLSCHEMA_ZUGFERD_24
},
New AllowedType With { New AllowedType With {
.SchemaType = GetType(Version2_3_3_FacturX.CrossIndustryInvoiceType), .SchemaType = GetType(Version2_3_3_FacturX.CrossIndustryInvoiceType),
.Specification = ZUGFERD_SPEC_2_3x, .Specification = ZUGFERD_SPEC_2_3x,
@@ -512,16 +427,6 @@ Public Class ZUGFeRDInterface
}) })
End If End If
If _Options.AllowEBInterface_Schema Then
oAllowedTypes.AddRange(New List(Of AllowedType) From {
New AllowedType With {
.SchemaType = GetType(EBINTERFACE_61.InvoiceType),
.Specification = EBINTERFACE_SPEC_61,
.XMLSchema = XMLSCHEMA_EBINTERFACE_61
}
})
End If
For Each oType In oAllowedTypes For Each oType In oAllowedTypes
Dim oTypeName As String = oType.SchemaType.FullName Dim oTypeName As String = oType.SchemaType.FullName
Dim oSerializer As New XmlSerializer(oType.SchemaType) Dim oSerializer As New XmlSerializer(oType.SchemaType)
@@ -564,5 +469,4 @@ Public Class ZUGFeRDInterface
Throw New ZUGFeRDExecption(ErrorCodes.UnsupportedFerdException, oMessage) Throw New ZUGFeRDExecption(ErrorCodes.UnsupportedFerdException, oMessage)
End Try End Try
End Function End Function
End Class End Class

View File

@@ -1,8 +1,8 @@
Public Enum Item_Types Public Enum Item_Types
StringType = 0 '0 StringType '0
DateType = 1 '1 DateType '1
MoneyType = 2 '2 MoneyType '2
FileType = 3 '3 FileType '3
ListType = 4 '4 - vgl. Währung ListType '4 - vgl. Währung
End Enum End Enum

View File

@@ -205,8 +205,7 @@ Public Class PDFEmbeds
End If End If
Else Else
Logger.Error("An error occurred getting the file name for [{0}]. Status: {1}", oFileName, GDPicturePDF.GetStat().ToString()) Logger.Error("An error occurred getting the file name for [{0}]. Status: {1}", oFileName, GDPicturePDF.GetStat().ToString())
Dim oMessage = String.Format("An error occurred getting the file name for [{0}]. Status: {1}", oFileName, GDPicturePDF.GetStat().ToString()) Continue For
Throw New ApplicationException(oMessage)
End If End If
Next Next
End If End If

View File

@@ -1,10 +1,7 @@
Imports System.Globalization Imports System.Globalization
Imports System.Reflection Imports System.Reflection
Imports System.Text.RegularExpressions Imports System.Text.RegularExpressions
Imports System.Xml
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports GdPicture.Internal.MSOfficeBinary.translator.Spreadsheet.XlsFileFormat.Records
Imports GdPicture.Internal.MSOfficeBinary.translator.Tools
Public Class PropertyValues Public Class PropertyValues
Private _logger As Logger Private _logger As Logger
@@ -125,13 +122,12 @@ Public Class PropertyValues
' Returns nothing if oColumn.Value contains an empty list ' Returns nothing if oColumn.Value contains an empty list
Dim oPropertyValue = oColumn.Value.ElementAtOrDefault(oRowIndex) Dim oPropertyValue = oColumn.Value.ElementAtOrDefault(oRowIndex)
'_logger.Debug("Processing itemColumn *TableColumn* [{0}].", oTableColumn) _logger.Debug("Processing itemColumn *TableColumn* [{0}].", oTableColumn)
'If oTableColumn = "INVOICE_SELLER_EMAIL" Then If oTableColumn = "INVOICE_SELLER_EMAIL" Then
' Console.WriteLine("INVOICE_SELLER_EMAIL") Console.WriteLine("INVOICE_SELLER_EMAIL")
'ElseIf oTableColumn = "INVOICE_POSITION_ARTICLE" Then ElseIf oTableColumn = "INVOICE_POSITION_ARTICLE" Then
' Console.WriteLine("INVOICE_POSITION_ARTICLE") Console.WriteLine("INVOICE_POSITION_ARTICLE")
'End If End If
If IsNothing(oPropertyValue) OrElse String.IsNullOrEmpty(oPropertyValue) Then If IsNothing(oPropertyValue) OrElse String.IsNullOrEmpty(oPropertyValue) Then
If oColumn.Key.IsRequired Then If oColumn.Key.IsRequired Then
_logger.Warn($"{MessageId} - oPropertyValue for column [{oTableColumn}] is empty or not found but is required. Continuing with Empty String.") _logger.Warn($"{MessageId} - oPropertyValue for column [{oTableColumn}] is empty or not found but is required. Continuing with Empty String.")
@@ -158,11 +154,7 @@ Public Class PropertyValues
End If End If
If oItemType = Item_Types.MoneyType Then If oTableColumn = "INVOICE_CURRENCY" Or oItemType = 4 Then
oPropertyValue = GetFormattedDecimalValue(oPropertyValue)
End If
If oTableColumn = "INVOICE_CURRENCY" Or oItemType = Item_Types.ListType Then
Dim oValuestring = oPropertyValue.ToString() Dim oValuestring = oPropertyValue.ToString()
' Bei Listenelementen entfernen wir den String Item, um den Wert zu erhalten ' Bei Listenelementen entfernen wir den String Item, um den Wert zu erhalten
@@ -226,15 +218,9 @@ Public Class PropertyValues
' This should hopefully show config errors ' This should hopefully show config errors
If TypeOf oPropertyValue Is List(Of Object) Then If TypeOf oPropertyValue Is List(Of Object) Then
_logger.Warn("Item [{0}] may be configured incorrectly", oTableColumn) _logger.Warn("Item with specification [{0}] may be configured incorrectly", oTableColumn)
oPropertyValue = Nothing oPropertyValue = Nothing
End If End If
If IsComplexeObject(oPropertyValue) = True Then
_logger.Debug("Item Value [{0}] is complexe. cant be used.", oTableColumn)
oPropertyValue = Nothing
End If
End Select End Select
End If End If
Catch ex As Exception Catch ex As Exception
@@ -248,7 +234,6 @@ Public Class PropertyValues
_logger.Warn("Specification [{0}] is empty, but marked as required! Skipping.", oTableColumn) _logger.Warn("Specification [{0}] is empty, but marked as required! Skipping.", oTableColumn)
Dim oMissingProperty = New MissingProperty With Dim oMissingProperty = New MissingProperty With
{ {
.EN16931_ID = oEN16931_ID,
.Description = oPropertyDescription, .Description = oPropertyDescription,
.XMLPath = oPropertyPath .XMLPath = oPropertyPath
} }
@@ -261,12 +246,8 @@ Public Class PropertyValues
End If End If
End If End If
If oItemType = Item_Types.MoneyType Then
oPropertyValue = GetFormattedDecimalValue(oPropertyValue)
End If
' Statt dem Zahlenwert des Enums, wollen wir die Währungsbezeichnung ' Statt dem Zahlenwert des Enums, wollen wir die Währungsbezeichnung
If oTableColumn = "INVOICE_CURRENCY" Or oItemType = Item_Types.ListType Then If oTableColumn = "INVOICE_CURRENCY" Or oItemType = 4 Then
Dim oValuestring = oPropertyValue.ToString() Dim oValuestring = oPropertyValue.ToString()
' Bei Listenelementen entfernen wir den String Item, um den Wert zu erhalten ' Bei Listenelementen entfernen wir den String Item, um den Wert zu erhalten
@@ -293,167 +274,6 @@ Public Class PropertyValues
Return oResult Return oResult
End Function End Function
Private Function GetFormattedDecimalValue(pPropertyValue As Object) As Object
' wir versuchen den gefundenen Wert in einen decimal mit 2 Nachommastellen umzuwandeln
' Eingaben können mit . oder mit , als Dezimal-Trenner kommen: 19.00 = 19,00
If IsNothing(pPropertyValue) OrElse String.IsNullOrEmpty(pPropertyValue) Then
Return String.Empty
End If
Try
Dim stringValue = pPropertyValue.ToString()
Dim deCulture As New CultureInfo("de-DE")
Dim usCulture As New CultureInfo("en-US")
Dim decimalValue As Decimal
If stringValue.Contains(".") AndAlso Not stringValue.Contains(",") Then
' Wir wandeln mit en-US um
If Decimal.TryParse(pPropertyValue, NumberStyles.Any, usCulture, decimalValue) Then
decimalValue = Math.Round(decimalValue, 2)
pPropertyValue = decimalValue.ToString("F2", CultureInfo.InvariantCulture)
End If
ElseIf stringValue.Contains(",") AndAlso Not stringValue.Contains(".") Then
' Wir wandeln mit de-DE um, wenn Komma als Trennzeichen enthalten ist
If Decimal.TryParse(pPropertyValue, NumberStyles.Any, deCulture, decimalValue) Then
decimalValue = Math.Round(decimalValue, 2)
pPropertyValue = decimalValue.ToString("F2", CultureInfo.InvariantCulture)
End If
ElseIf Not stringValue.Contains(",") AndAlso Not stringValue.Contains(".") Then
' Wir wandeln mit en-US um, wenn KEIN Trennzeichen enthalten ist
If Decimal.TryParse(pPropertyValue, NumberStyles.Any, usCulture, decimalValue) Then
decimalValue = Math.Round(decimalValue, 2)
pPropertyValue = decimalValue.ToString("F2", CultureInfo.InvariantCulture)
End If
End If
Return pPropertyValue
Catch ex As Exception
_logger.Error(ex)
Return Nothing
End Try
End Function
Public Function CheckRootAttributeValues(pDocument As Object, pPropertyMap As Dictionary(Of String, XmlItemProperty), pMessageId As String, pCheckResult As CheckPropertyValuesResult) As CheckPropertyValuesResult
If pPropertyMap Is Nothing Then
Return pCheckResult
End If
' PropertyMap items with `IsGrouped = False` are handled normally
Dim oRootAttributeProperties As Dictionary(Of String, XmlItemProperty) = pPropertyMap.
ToDictionary(Function(Item) Item.Key,
Function(Item) Item.Value)
For Each oItem As KeyValuePair(Of String, XmlItemProperty) In oRootAttributeProperties
Dim oTableColumn As String = oItem.Value.TableColumn
Dim oPropertyDescription As String = oItem.Value.Description
Dim oPropertyPath As String = oItem.Value.XMLPath
Dim oPropertyValue As Object = Nothing
Dim oTableName = oItem.Value.TableName
Dim oIsRequired = oItem.Value.IsRequired
Dim oDescription = oItem.Value.Description
Dim oItemType = oItem.Value.ItemType
Dim oEN16931_ID = oItem.Value.EN16931_ID
Try
oPropertyValue = GetRootAttributeValue(pDocument, oItem.Key)
Catch ex As Exception
_logger.Error(ex)
oPropertyValue = Nothing
End Try
If IsNothing(oPropertyValue) OrElse String.IsNullOrEmpty(oPropertyValue) Then
If oItem.Value.IsRequired Then
_logger.Warn("Column [{0}] is empty, but marked as required! Adding MissingProperty.", oTableColumn)
Dim oMissingProperty = New MissingProperty With
{
.EN16931_ID = oEN16931_ID,
.Description = oPropertyDescription,
.XMLPath = oPropertyPath
}
pCheckResult.MissingProperties.Add(oMissingProperty)
Continue For
Else
_logger.Debug("oPropertyValue for Column [{0}] is empty or not found. Skipping.", oTableColumn)
Continue For
End If
End If
If pDocument.Specification = "EBINTERFACE_61" Then
' ebInterface DocumentType in UNTDID 1001 — Document type
If oTableColumn = "INVOICE_TYPE" Then
oPropertyValue = GetUNTDID1001_DocumentType(oPropertyValue)
_logger.Debug("oPropertyValue for Column [{0}] in EBINTERFACE_61 with value [{1}] ", oTableColumn, oPropertyValue)
End If
End If
pCheckResult.ValidProperties.Add(New ValidProperty() With {
.MessageId = pMessageId,
.Description = oPropertyDescription,
.Value = oPropertyValue,
.GroupCounter = 0,
.TableName = oTableName,
.TableColumn = oTableColumn,
.IsRequired = oIsRequired,
.XMLPath = oPropertyPath,
.ItemType = oItemType,
.EN16931_ID = oEN16931_ID
})
Next
Return pCheckResult
End Function
Private Function GetUNTDID1001_DocumentType(oPropertyValue As String) As String
Select Case oPropertyValue
Case "CreditMemo"
Return 381 ' Credit note
Case "FinalSettlement"
Return 877 ' Final construction invoice
Case "Invoice"
Return 380 ' Commercial invoice
Case "InvoiceForAdvancePayment"
Return 386 ' Prepayment invoice
Case "InvoiceForPartialDelivery"
Return 381 ' Partial invoice
Case "SelfBilling"
Return 261 ' Self billed credit note
Case "SubsequentCredit"
Return 83 ' Credit note related to financial adjustments
Case "SubsequentDebit"
Return 84 ' Debit note related to financial adjustments
Case Else
Return 0
End Select
End Function
Private Function GetRootAttributeValue(pDocument As Object, pXmlPath As String) As String
If pDocument.XElementObject Is Nothing Then
Return Nothing
End If
Try
Dim attributeName As String = pXmlPath.Replace("root.", "")
Dim attributeValue As String = pDocument.XElementObject.Attribute(attributeName).Value
Return attributeValue
Catch ex As Exception
_logger.Error(ex)
Return Nothing
End Try
End Function
Public Function GetPropValue(Obj As Object, PropertyName As String) As List(Of Object) Public Function GetPropValue(Obj As Object, PropertyName As String) As List(Of Object)
Dim oNameParts As String() = PropertyName.Split("."c) Dim oNameParts As String() = PropertyName.Split("."c)
@@ -600,21 +420,8 @@ Public Class PropertyValues
firstElement = oList.FirstOrDefault() firstElement = oList.FirstOrDefault()
If firstElement IsNot Nothing AndAlso IsArray(firstElement) Then If firstElement IsNot Nothing AndAlso IsArray(firstElement) Then
Dim oStr As String ' Attachments sind Byte-Arrays und müssen umgewandelt werden
' Array behandeln -> erstes Element nehmen Return Convert.ToBase64String(firstElement)
If TypeOf firstElement Is String() Then
Dim arr As String() = CType(firstElement, String())
oStr = If(arr.Length > 0, arr(0), String.Empty)
Else
oStr = firstElement.ToString()
End If
If IsBase64String(oStr) Then
' Attachments sind Byte-Arrays und müssen umgewandelt werden
Return Convert.ToBase64String(firstElement)
Else
Return oStr
End If
Else Else
Return DoGetFinalPropValue(oList.First()) Return DoGetFinalPropValue(oList.First())
@@ -656,40 +463,4 @@ Public Class PropertyValues
Return Regex.IsMatch(Prop, _indexPattern) Return Regex.IsMatch(Prop, _indexPattern)
End Function End Function
Private Function IsComplexeObject(obj As Object) As Boolean
If obj Is Nothing Then Return False
Dim t As Type = obj.GetType()
' Einfache Typen ausschließen
If t.IsPrimitive OrElse
t.IsEnum OrElse
t Is GetType(String) OrElse
t Is GetType(Decimal) OrElse
t Is GetType(DateTime) Then
Return False
End If
' Wenn es öffentliche Properties hat, ist es "komplex"
Return t.GetProperties().Length > 0 OrElse t.IsClass
End Function
Function IsBase64String(str As String) As Boolean
If String.IsNullOrEmpty(str) Then Return False
' Base64 hat bestimmte Zeichen und meist Länge Vielfaches von 4
If str.Length Mod 4 <> 0 Then Return False
' Regex-Check für gültige Base64-Zeichen
If Not System.Text.RegularExpressions.Regex.IsMatch(str, "^[A-Za-z0-9+/]*={0,2}$") Then
Return False
End If
Try
Dim bytes As Byte() = Convert.FromBase64String(str)
Return True
Catch ex As FormatException
Return False
End Try
End Function
End Class End Class

View File

@@ -26,13 +26,11 @@ Public Class Validator
For Each oNode As XElement In oDecimalNodes For Each oNode As XElement In oDecimalNodes
Dim oParsedValue As Decimal = 0.0 Dim oParsedValue As Decimal = 0.0
If Decimal.TryParse(oNode.Value, oParsedValue) = False Then If Decimal.TryParse(oNode.Value, oParsedValue) = False Then
_logger.Warn($"Invalid Decimal Value in {oNode.Name.LocalName}")
pResult.ValidationErrors.Add(New ZugferdValidationError() With { pResult.ValidationErrors.Add(New ZugferdValidationError() With {
.ElementName = oNode.Name.LocalName, .ElementName = oNode.Name.LocalName,
.ElementValue = oNode.Value, .ElementValue = oNode.Value,
.ErrorMessage = "Value could not be parsed as Decimal.", .ErrorMessage = "Value could not be parsed as Decimal.",
.ErrorMessageDE = "Der Wert ist keine Dezimalzahl.", .ErrorMessageDE = "Der Wert ist keine Dezimalzahl."
.ErrorMessageToken = "NoDecimalText"
}) })
End If End If
Next Next
@@ -51,14 +49,11 @@ Public Class Validator
For Each oNode As XElement In oCurrencyCodeNodes For Each oNode As XElement In oCurrencyCodeNodes
Dim oValid = ValidateCurrencyCode(oNode.Value) Dim oValid = ValidateCurrencyCode(oNode.Value)
If oValid = False Then If oValid = False Then
_logger.Warn($"Invalid CurrencyCode in {oNode.Name.LocalName}")
pResult.ValidationErrors.Add(New ZugferdValidationError() With { pResult.ValidationErrors.Add(New ZugferdValidationError() With {
.ElementName = oNode.Name.LocalName, .ElementName = oNode.Name.LocalName,
.ElementValue = oNode.Value, .ElementValue = oNode.Value,
.ErrorMessage = "Invalid CurrencyCode. Only 3-Character codes are allowed.", .ErrorMessage = "Invalid CurrencyCode. Only 3-Character codes are allowed.",
.ErrorMessageDE = "Ungültiger Währungscode. Es sind nur 3-stellige Codes erlaubt.", .ErrorMessageDE = "Ungültiger Währungscode. Es sind nur 3-stellige Codes erlaubt."
.ErrorMessageToken = "WrongCurrencyCodeText"
}) })
End If End If
Next Next
@@ -81,13 +76,11 @@ Public Class Validator
Dim oValid = ValidateCurrencyCode(oCurrencyID) Dim oValid = ValidateCurrencyCode(oCurrencyID)
If oValid = False Then If oValid = False Then
_logger.Warn($"Invalid CurrencyID in {oNode.Name.LocalName}")
pResult.ValidationErrors.Add(New ZugferdValidationError() With { pResult.ValidationErrors.Add(New ZugferdValidationError() With {
.ElementName = oNode.Name.LocalName, .ElementName = oNode.Name.LocalName,
.ElementValue = oCurrencyID, .ElementValue = oCurrencyID,
.ErrorMessage = "Invalid currencyID. Only 3-Character codes or empty values are allowed.", .ErrorMessage = "Invalid currencyID. Only 3-Character codes or empty values are allowed.",
.ErrorMessageDE = "Ungültige WährungsID. Es sind nur 3-Zeichen lange Codes oder ein leerer Wert erlaubt.", .ErrorMessageDE = "Ungültige WährungsID. Es sind nur 3-Zeichen lange Codes oder ein leerer Wert erlaubt."
.ErrorMessageToken = "WrongCurrencyIDText"
}) })
End If End If
Next Next

File diff suppressed because it is too large Load Diff

View File

@@ -12,19 +12,19 @@
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" /> <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.3.0" newVersion="6.0.3.0" /> <bindingRedirect oldVersion="0.0.0.0-6.0.1.0" newVersion="6.0.1.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" /> <bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.5" newVersion="10.0.0.5" /> <bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
@@ -32,27 +32,15 @@
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Security.Cryptography.Pkcs" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.Security.Cryptography.Pkcs" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.5" newVersion="10.0.0.5" /> <bindingRedirect oldVersion="0.0.0.0-8.0.0.1" newVersion="8.0.0.1" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.IO.Packaging" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.IO.Packaging" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.5" newVersion="10.0.0.5" /> <bindingRedirect oldVersion="0.0.0.0-8.0.0.1" newVersion="8.0.0.1" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.5" newVersion="10.0.0.5" /> <bindingRedirect oldVersion="0.0.0.0-8.0.0.5" newVersion="8.0.0.5" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.4.0" newVersion="4.2.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Channels" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.5" newVersion="10.0.0.5" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Encodings.Web" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.5" newVersion="10.0.0.5" />
</dependentAssembly> </dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>

View File

@@ -3,36 +3,30 @@
<package id="BouncyCastle.Cryptography" version="2.5.0" targetFramework="net462" /> <package id="BouncyCastle.Cryptography" version="2.5.0" targetFramework="net462" />
<package id="DocumentFormat.OpenXml" version="3.2.0" targetFramework="net462" /> <package id="DocumentFormat.OpenXml" version="3.2.0" targetFramework="net462" />
<package id="DocumentFormat.OpenXml.Framework" version="3.2.0" targetFramework="net462" /> <package id="DocumentFormat.OpenXml.Framework" version="3.2.0" targetFramework="net462" />
<package id="GdPicture" version="14.4.4" targetFramework="net462" /> <package id="GdPicture" version="14.3.3" targetFramework="net462" />
<package id="GdPicture.runtimes.windows" version="14.4.4" targetFramework="net462" /> <package id="GdPicture.runtimes.windows" version="14.3.3" targetFramework="net462" />
<package id="Google.Protobuf" version="3.33.2" targetFramework="net462" />
<package id="Microsoft.AspNet.WebApi.Client" version="6.0.0" targetFramework="net462" /> <package id="Microsoft.AspNet.WebApi.Client" version="6.0.0" targetFramework="net462" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="10.0.5" targetFramework="net462" /> <package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net462" />
<package id="Microsoft.Bcl.Cryptography" version="10.0.5" targetFramework="net462" />
<package id="Microsoft.Bcl.HashCode" version="6.0.0" targetFramework="net462" />
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net462" /> <package id="Microsoft.CSharp" version="4.7.0" targetFramework="net462" />
<package id="Microsoft.VisualBasic" version="10.3.0" targetFramework="net462" /> <package id="Microsoft.VisualBasic" version="10.3.0" targetFramework="net462" />
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" /> <package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" />
<package id="Newtonsoft.Json.Bson" version="1.0.2" targetFramework="net462" /> <package id="Newtonsoft.Json.Bson" version="1.0.2" targetFramework="net462" />
<package id="NLog" version="5.0.5" targetFramework="net461" /> <package id="NLog" version="5.0.5" targetFramework="net461" />
<package id="OpenMcdf" version="3.1.4" targetFramework="net462" /> <package id="OpenMcdf" version="2.4.1" targetFramework="net462" />
<package id="protobuf-net" version="3.2.46" targetFramework="net462" /> <package id="protobuf-net" version="3.2.46" targetFramework="net462" />
<package id="protobuf-net.Core" version="3.2.46" targetFramework="net462" /> <package id="protobuf-net.Core" version="3.2.46" targetFramework="net462" />
<package id="RtfPipe" version="2.0.7677.4303" targetFramework="net462" /> <package id="RtfPipe" version="2.0.7677.4303" targetFramework="net462" />
<package id="System.Buffers" version="4.6.1" targetFramework="net462" /> <package id="System.Buffers" version="4.6.0" targetFramework="net462" />
<package id="System.CodeDom" version="8.0.0" targetFramework="net462" /> <package id="System.CodeDom" version="8.0.0" targetFramework="net462" />
<package id="System.Collections.Immutable" version="10.0.5" targetFramework="net462" /> <package id="System.Collections.Immutable" version="8.0.0" targetFramework="net462" />
<package id="System.Formats.Asn1" version="10.0.5" targetFramework="net462" /> <package id="System.IO.Packaging" version="8.0.1" targetFramework="net462" />
<package id="System.IO.Packaging" version="10.0.5" targetFramework="net462" />
<package id="System.IO.Pipelines" version="10.0.5" targetFramework="net462" />
<package id="System.Management" version="8.0.0" targetFramework="net462" /> <package id="System.Management" version="8.0.0" targetFramework="net462" />
<package id="System.Memory" version="4.6.3" targetFramework="net462" /> <package id="System.Memory" version="4.6.0" targetFramework="net462" />
<package id="System.Numerics.Vectors" version="4.6.1" targetFramework="net462" /> <package id="System.Numerics.Vectors" version="4.6.0" targetFramework="net462" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.1.2" targetFramework="net462" /> <package id="System.Runtime.CompilerServices.Unsafe" version="6.1.0" targetFramework="net462" />
<package id="System.Security.Cryptography.Pkcs" version="10.0.5" targetFramework="net462" /> <package id="System.Security.Cryptography.Pkcs" version="8.0.1" targetFramework="net462" />
<package id="System.Text.Encodings.Web" version="10.0.5" targetFramework="net462" /> <package id="System.Text.Encodings.Web" version="8.0.0" targetFramework="net462" />
<package id="System.Text.Json" version="10.0.5" targetFramework="net462" /> <package id="System.Text.Json" version="8.0.5" targetFramework="net462" />
<package id="System.Threading.Channels" version="10.0.5" targetFramework="net462" /> <package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net462" />
<package id="System.Threading.Tasks.Extensions" version="4.6.3" targetFramework="net462" /> <package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
<package id="System.ValueTuple" version="4.6.1" targetFramework="net462" />
</packages> </packages>

View File

@@ -12,7 +12,7 @@ Public Class ADSyncJob
MyBase.New(LogConfig, MSSQL) MyBase.New(LogConfig, MSSQL)
End Sub End Sub
Public Sub Start(Arguments As ADSyncArgs) Implements IJob(Of ADSyncArgs).StartDexAPISQL Public Sub Start(Arguments As ADSyncArgs) Implements IJob(Of ADSyncArgs).Start
Dim oJobName As String = [GetType]().Name Dim oJobName As String = [GetType]().Name
Try Try

View File

@@ -5,27 +5,25 @@
</startup> </startup>
<runtime> <runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="GdPicture.NET.14" publicKeyToken="f52a2e60ad468dbb" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-14.3.9.0" newVersion="14.3.9.0" />
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="FirebirdSql.Data.FirebirdClient" publicKeyToken="3750abcc3150b00c" culture="neutral" /> <assemblyIdentity name="FirebirdSql.Data.FirebirdClient" publicKeyToken="3750abcc3150b00c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.5.0.0" newVersion="7.5.0.0" /> <bindingRedirect oldVersion="0.0.0.0-7.5.0.0" newVersion="7.5.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" /> <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.3.0" newVersion="6.0.3.0" /> <bindingRedirect oldVersion="0.0.0.0-6.0.1.0" newVersion="6.0.1.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" /> <bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.5" newVersion="10.0.0.5" /> <bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
@@ -37,35 +35,15 @@
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Security.Cryptography.Pkcs" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.Security.Cryptography.Pkcs" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.5" newVersion="10.0.0.5" /> <bindingRedirect oldVersion="0.0.0.0-8.0.0.1" newVersion="8.0.0.1" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.IO.Packaging" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.IO.Packaging" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.5" newVersion="10.0.0.5" /> <bindingRedirect oldVersion="0.0.0.0-8.0.0.1" newVersion="8.0.0.1" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.5" newVersion="10.0.0.5" /> <bindingRedirect oldVersion="0.0.0.0-8.0.0.5" newVersion="8.0.0.5" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="GdPicture.NET.14.Common" publicKeyToken="f52a2e60ad468dbb" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-14.4.4.0" newVersion="14.4.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="GdPicture.NET.14" publicKeyToken="f52a2e60ad468dbb" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-14.4.4.0" newVersion="14.4.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.4.0" newVersion="4.2.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Channels" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.5" newVersion="10.0.0.5" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Encodings.Web" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.5" newVersion="10.0.0.5" />
</dependentAssembly> </dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>

View File

@@ -1,4 +0,0 @@
Public Class APISQLArgs
Inherits JobArgs
Public ProfileID As String
End Class

View File

@@ -1,6 +0,0 @@
Public Class APISQLConfig
Public Property BaseUrl As String = ""
Public Property Property1 As String = ""
Public Property Property2 As String = ""
Public Property Property3 As String = ""
End Class

View File

@@ -1,35 +0,0 @@
Imports System.Collections.Generic
Imports System.Data
Imports System.Threading.Tasks
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Interfaces
Imports DigitalData.Modules.Logging
Public Class API_DEXSQLJob
Inherits JobBase
Implements IJob(Of APISQLArgs)
Public Sub New(LogConfig As LogConfig, MSSQL As MSSQLServer)
MyBase.New(LogConfig, MSSQL)
End Sub
Public Sub StartDexAPISQL(Arguments As APISQLArgs) Implements IJob(Of APISQLArgs).StartDexAPISQL
Dim oJobName As String = [GetType]().Name
Try
_Logger.Info("Running job {0}", oJobName)
_Logger.Info("Job {0} completed!", oJobName)
Catch ex As Exception
_Logger.Warn("Job {0} failed!", oJobName)
_Logger.Error(ex)
End Try
End Sub
Public Function ShouldStart(Arguments As APISQLArgs) As Boolean Implements IJob(Of APISQLArgs).ShouldStart
Return Arguments.Enabled
End Function
End Class

View File

@@ -21,7 +21,7 @@ Public Class GraphQLJob
MyBase.New(LogConfig, MSSQL) MyBase.New(LogConfig, MSSQL)
End Sub End Sub
Public Sub Start(Args As GraphQLArgs) Implements IJob(Of GraphQLArgs).StartDexAPISQL Public Sub Start(Args As GraphQLArgs) Implements IJob(Of GraphQLArgs).Start
Try Try
Dim oConfigPath As String = Args.QueryConfigPath Dim oConfigPath As String = Args.QueryConfigPath
Dim oConfigManager As New ConfigManager(Of GraphQLConfig)(_LogConfig, oConfigPath) Dim oConfigManager As New ConfigManager(Of GraphQLConfig)(_LogConfig, oConfigPath)

View File

@@ -17,6 +17,5 @@ Public Class JobConfig
ADSync ADSync
GraphQL GraphQL
Test Test
API_SQL
End Enum End Enum
End Class End Class

View File

@@ -3,7 +3,7 @@
End Interface End Interface
Public Interface IJob(Of T) Public Interface IJob(Of T)
Sub StartDexAPISQL(Arguments As T) Sub Start(Arguments As T)
Function ShouldStart(Arguments As T) As Boolean Function ShouldStart(Arguments As T) As Boolean
End Interface End Interface

View File

@@ -66,12 +66,31 @@
</None> </None>
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Base\Base.vbproj">
<Project>{6ea0c51f-c2b1-4462-8198-3de0b32b74f8}</Project>
<Name>Base</Name>
</ProjectReference>
<ProjectReference Include="..\Config\Config.vbproj">
<Project>{44982f9b-6116-44e2-85d0-f39650b1ef99}</Project>
<Name>Config</Name>
</ProjectReference>
<ProjectReference Include="..\Database\Database.vbproj">
<Project>{eaf0ea75-5fa7-485d-89c7-b2d843b03a96}</Project>
<Name>Database</Name>
</ProjectReference>
<ProjectReference Include="..\Interfaces\Interfaces.vbproj">
<Project>{ab6f09bf-e794-4f6a-94bb-c97c0ba84d64}</Project>
<Name>Interfaces</Name>
</ProjectReference>
<ProjectReference Include="..\Logging\Logging.vbproj">
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
<Name>Logging</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="ADSync\ADSyncArgs.vb" /> <Compile Include="ADSync\ADSyncArgs.vb" />
<Compile Include="ADSync\ADSyncJob.vb" /> <Compile Include="ADSync\ADSyncJob.vb" />
<Compile Include="DEX_API\APISQLArgs.vb" />
<Compile Include="DEX_API\APISQLConfig.vb" />
<Compile Include="DEX_API\API_DEXSQLJob.vb" />
<Compile Include="GraphQL\GraphQLArgs.vb" /> <Compile Include="GraphQL\GraphQLArgs.vb" />
<Compile Include="GraphQL\GraphQLConfig.vb" /> <Compile Include="GraphQL\GraphQLConfig.vb" />
<Compile Include="GraphQL\GraphQLJob.vb" /> <Compile Include="GraphQL\GraphQLJob.vb" />
@@ -106,21 +125,6 @@
<Reference Include="BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=072edcf4a5328938, processorArchitecture=MSIL"> <Reference Include="BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=072edcf4a5328938, processorArchitecture=MSIL">
<HintPath>..\packages\BouncyCastle.Cryptography.2.5.0\lib\net461\BouncyCastle.Cryptography.dll</HintPath> <HintPath>..\packages\BouncyCastle.Cryptography.2.5.0\lib\net461\BouncyCastle.Cryptography.dll</HintPath>
</Reference> </Reference>
<Reference Include="DigitalData.Modules.Base">
<HintPath>..\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Config">
<HintPath>..\Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Database">
<HintPath>..\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Interfaces">
<HintPath>..\Interfaces\bin\Debug\DigitalData.Modules.Interfaces.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging">
<HintPath>..\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference>
<Reference Include="DocumentFormat.OpenXml, Version=3.2.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL"> <Reference Include="DocumentFormat.OpenXml, Version=3.2.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<HintPath>..\packages\DocumentFormat.OpenXml.3.2.0\lib\net46\DocumentFormat.OpenXml.dll</HintPath> <HintPath>..\packages\DocumentFormat.OpenXml.3.2.0\lib\net46\DocumentFormat.OpenXml.dll</HintPath>
</Reference> </Reference>
@@ -130,95 +134,74 @@
<Reference Include="FirebirdSql.Data.FirebirdClient, Version=7.5.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c, processorArchitecture=MSIL"> <Reference Include="FirebirdSql.Data.FirebirdClient, Version=7.5.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c, processorArchitecture=MSIL">
<HintPath>..\packages\FirebirdSql.Data.FirebirdClient.7.5.0\lib\net452\FirebirdSql.Data.FirebirdClient.dll</HintPath> <HintPath>..\packages\FirebirdSql.Data.FirebirdClient.7.5.0\lib\net452\FirebirdSql.Data.FirebirdClient.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.barcode.1d.writer, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.barcode.1d.writer, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.barcode.1d.writer.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.barcode.1d.writer.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.barcode.2d.writer, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.barcode.2d.writer, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.barcode.2d.writer.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.barcode.2d.writer.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.CAD, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.CAD, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.CAD.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.CAD.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.CAD.DWG, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.CAD.DWG, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.CAD.DWG.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.CAD.DWG.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.Common, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.Common, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.Common.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Common.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.Document, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.Document, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.Document.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Document.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.Email, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.Email, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.Email.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Email.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.HTML, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.HTML, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.HTML.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.HTML.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.Imaging, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.Imaging, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.Imaging.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.Imaging.Formats, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.Imaging.Formats, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.Imaging.Formats.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.Formats.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.Imaging.Formats.Conversion, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.Imaging.Formats.Conversion, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.Imaging.Formats.Conversion.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.Formats.Conversion.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.Imaging.Rendering, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.Imaging.Rendering, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.Imaging.Rendering.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.Rendering.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.Markdown, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.MSOfficeBinary, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.Markdown.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.MSOfficeBinary.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.MSOfficeBinary, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.OpenDocument, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.MSOfficeBinary.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.OpenDocument.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.OpenDocument, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.OpenXML, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.OpenDocument.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.OpenXML.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.OpenXML, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.OpenXML.Templating, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.OpenXML.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.OpenXML.Templating.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.OpenXML.Templating, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.PDF, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.OpenXML.Templating.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.PDF.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.PDF, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.RTF, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.PDF.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.RTF.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.RTF, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.SVG, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.RTF.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.SVG.dll</HintPath>
</Reference>
<Reference Include="GdPicture.NET.14.SVG, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.SVG.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.wia.gateway, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6973b5c22dcf45f7, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.wia.gateway, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6973b5c22dcf45f7, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.wia.gateway.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.wia.gateway.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes> <EmbedInteropTypes>True</EmbedInteropTypes>
</Reference> </Reference>
<Reference Include="Google.Protobuf, Version=3.33.2.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL"> <Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.33.2\lib\net45\Google.Protobuf.dll</HintPath> <HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.10.0.5\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.Cryptography, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.Cryptography.10.0.5\lib\net462\Microsoft.Bcl.Cryptography.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.HashCode, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.HashCode.6.0.0\lib\net462\Microsoft.Bcl.HashCode.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NativeSDK.Exceptions, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\NativeSDK.Exceptions.dll</HintPath>
</Reference>
<Reference Include="NativeSDK.Settings, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\NativeSDK.Settings.dll</HintPath>
</Reference>
<Reference Include="NativeSDK.Settings.Edition, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\NativeSDK.Settings.Edition.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath> <HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference> </Reference>
@@ -228,8 +211,8 @@
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath> <HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="OpenMcdf, Version=3.1.4.0, Culture=neutral, PublicKeyToken=fdbb1629d7c00800, processorArchitecture=MSIL"> <Reference Include="OpenMcdf, Version=2.4.1.0, Culture=neutral, PublicKeyToken=fdbb1629d7c00800, processorArchitecture=MSIL">
<HintPath>..\packages\OpenMcdf.3.1.4\lib\netstandard2.0\OpenMcdf.dll</HintPath> <HintPath>..\packages\OpenMcdf.2.4.1\lib\net40\OpenMcdf.dll</HintPath>
</Reference> </Reference>
<Reference Include="protobuf-net, Version=3.0.0.0, Culture=neutral, PublicKeyToken=257b51d87d2e4d67, processorArchitecture=MSIL"> <Reference Include="protobuf-net, Version=3.0.0.0, Culture=neutral, PublicKeyToken=257b51d87d2e4d67, processorArchitecture=MSIL">
<HintPath>..\packages\protobuf-net.3.2.46\lib\net462\protobuf-net.dll</HintPath> <HintPath>..\packages\protobuf-net.3.2.46\lib\net462\protobuf-net.dll</HintPath>
@@ -241,82 +224,69 @@
<HintPath>..\packages\RtfPipe.2.0.7677.4303\lib\net45\RtfPipe.dll</HintPath> <HintPath>..\packages\RtfPipe.2.0.7677.4303\lib\net45\RtfPipe.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Buffers, Version=4.0.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.6.1\lib\net462\System.Buffers.dll</HintPath> <HintPath>..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.CodeDom, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.CodeDom, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.CodeDom.8.0.0\lib\net462\System.CodeDom.dll</HintPath> <HintPath>..\packages\System.CodeDom.8.0.0\lib\net462\System.CodeDom.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Collections.Immutable, Version=10.0.0.5, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <Reference Include="System.Collections.Immutable, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Collections.Immutable.10.0.5\lib\net462\System.Collections.Immutable.dll</HintPath> <HintPath>..\packages\System.Collections.Immutable.8.0.0\lib\net462\System.Collections.Immutable.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.Formats.Asn1, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Formats.Asn1.10.0.5\lib\net462\System.Formats.Asn1.dll</HintPath>
</Reference>
<Reference Include="System.IO.Compression" /> <Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Packaging, Version=10.0.0.5, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <Reference Include="System.IO.Packaging, Version=8.0.0.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Packaging.10.0.5\lib\net462\System.IO.Packaging.dll</HintPath> <HintPath>..\packages\System.IO.Packaging.8.0.1\lib\net462\System.IO.Packaging.dll</HintPath>
</Reference>
<Reference Include="System.IO.Pipelines, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Pipelines.10.0.5\lib\net462\System.IO.Pipelines.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Management" /> <Reference Include="System.Management" />
<Reference Include="System.Memory, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Memory, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.6.3\lib\net462\System.Memory.dll</HintPath> <HintPath>..\packages\System.Memory.4.6.0\lib\net462\System.Memory.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Net.Http" /> <Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.Formatting, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="System.Net.Http.Formatting, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.6.0.0\lib\net45\System.Net.Http.Formatting.dll</HintPath> <HintPath>..\packages\Microsoft.AspNet.WebApi.Client.6.0.0\lib\net45\System.Net.Http.Formatting.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Numerics" /> <Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <Reference Include="System.Numerics.Vectors, Version=4.1.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.6.1\lib\net462\System.Numerics.Vectors.dll</HintPath> <HintPath>..\packages\System.Numerics.Vectors.4.6.0\lib\net462\System.Numerics.Vectors.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.1.2\lib\net462\System.Runtime.CompilerServices.Unsafe.dll</HintPath> <HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Runtime.Serialization" /> <Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Security" /> <Reference Include="System.Security" />
<Reference Include="System.Security.Cryptography.Pkcs, Version=10.0.0.5, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <Reference Include="System.Security.Cryptography.Pkcs, Version=8.0.0.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Pkcs.10.0.5\lib\net462\System.Security.Cryptography.Pkcs.dll</HintPath> <HintPath>..\packages\System.Security.Cryptography.Pkcs.8.0.1\lib\net462\System.Security.Cryptography.Pkcs.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.ServiceModel" /> <Reference Include="System.ServiceModel" />
<Reference Include="System.Text.Encodings.Web, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Text.Encodings.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Encodings.Web.10.0.5\lib\net462\System.Text.Encodings.Web.dll</HintPath> <HintPath>..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Text.Json, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Text.Json, Version=8.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Json.10.0.5\lib\net462\System.Text.Json.dll</HintPath> <HintPath>..\packages\System.Text.Json.8.0.5\lib\net462\System.Text.Json.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Threading.Channels, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Channels.10.0.5\lib\net462\System.Threading.Channels.dll</HintPath> <HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.6.3\lib\net462\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Transactions" /> <Reference Include="System.Transactions" />
<Reference Include="System.ValueTuple, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.6.1\lib\net462\System.ValueTuple.dll</HintPath> <HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="System.XML.Linq" /> <Reference Include="System.XML.Linq" />
<Reference Include="WindowsBase" /> <Reference Include="WindowsBase" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Content Include="logParser.txt" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent> <PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<Import Project="..\packages\GdPicture.runtimes.windows.14.4.4\build\net462\GdPicture.runtimes.windows.targets" Condition="Exists('..\packages\GdPicture.runtimes.windows.14.4.4\build\net462\GdPicture.runtimes.windows.targets')" /> <Import Project="..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets" Condition="Exists('..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <PropertyGroup>
<ErrorText>Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".</ErrorText> <ErrorText>Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".</ErrorText>
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('..\packages\GdPicture.runtimes.windows.14.4.4\build\net462\GdPicture.runtimes.windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GdPicture.runtimes.windows.14.4.4\build\net462\GdPicture.runtimes.windows.targets'))" /> <Error Condition="!Exists('..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets'))" />
</Target> </Target>
</Project> </Project>

View File

@@ -12,8 +12,8 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyDescription("")> <Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("Digital Data")> <Assembly: AssemblyCompany("Digital Data")>
<Assembly: AssemblyProduct("Modules.Jobs")> <Assembly: AssemblyProduct("Modules.Jobs")>
<Assembly: AssemblyCopyright("Copyright © 2026")> <Assembly: AssemblyCopyright("Copyright © 2025")>
<Assembly: AssemblyTrademark("3.9.1.0")> <Assembly: AssemblyTrademark("3.0.3.0")>
<Assembly: ComVisible(False)> <Assembly: ComVisible(False)>
@@ -30,5 +30,5 @@ Imports System.Runtime.InteropServices
' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern ' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
<Assembly: AssemblyVersion("3.9.1.0")> <Assembly: AssemblyVersion("3.1.0.0")>
<Assembly: AssemblyFileVersion("3.9.1.0")> <Assembly: AssemblyFileVersion("3.1.0.0")>

View File

@@ -48,7 +48,7 @@ Namespace ZUGFeRD
Dim intCode As Integer = DirectCast(pErrorCode, Integer) Dim intCode As Integer = DirectCast(pErrorCode, Integer)
oErrorCode = $"{EmailStrings.ErrorCodePraefix}{intCode}" oErrorCode = $"{EmailStrings.ErrorCodePraefix}{intCode}"
Dim oSQL = $"SELECT COUNT(*) FROM TBDD_GUI_LANGUAGE_PHRASE WITH (NOLOCK) WHERE TITLE = '{oErrorCode}'" Dim oSQL = $"SELECT COUNT(*) FROM TBDD_GUI_LANGUAGE_PHRASE WHERE TITLE = '{oErrorCode}'"
If _mssql.GetScalarValue(oSQL) > 0 Then If _mssql.GetScalarValue(oSQL) > 0 Then
useLegacyMethod = False useLegacyMethod = False
Else Else
@@ -59,7 +59,7 @@ Namespace ZUGFeRD
' Gibt es das Template in TBDD_EMAIL_TEMPLATE? ' Gibt es das Template in TBDD_EMAIL_TEMPLATE?
If useLegacyMethod = False AndAlso pTemplateId > 0 Then If useLegacyMethod = False AndAlso pTemplateId > 0 Then
Try Try
Dim oSQL = $"SELECT COUNT(*) FROM TBDD_EMAIL_TEMPLATE WITH (NOLOCK) WHERE GUID = {pTemplateId}" Dim oSQL = $"SELECT COUNT(*) FROM TBDD_EMAIL_TEMPLATE WHERE GUID = {pTemplateId}"
If _mssql.GetScalarValue(oSQL) <= 0 Then If _mssql.GetScalarValue(oSQL) <= 0 Then
_logger.Warn($"EMAIL_TEMPLATE [{pTemplateId}] not found in TBDD_EMAIL_TEMPLATE!") _logger.Warn($"EMAIL_TEMPLATE [{pTemplateId}] not found in TBDD_EMAIL_TEMPLATE!")
useLegacyMethod = True useLegacyMethod = True
@@ -137,11 +137,7 @@ Namespace ZUGFeRD
, '{pParameter2}' , '{pParameter2}'
, 77" , 77"
If pTransaction IsNot Nothing Then _mssql.ExecuteNonQuery(oExecute, pTransaction)
_mssql.ExecuteNonQuery(oExecute, pTransaction)
Else
_mssql.ExecuteNonQuery(oExecute)
End If
Catch ex As Exception Catch ex As Exception
_logger.Error(ex) _logger.Error(ex)
@@ -189,7 +185,7 @@ Namespace ZUGFeRD
_logger.Debug("To: {0}", oEmailTo) _logger.Debug("To: {0}", oEmailTo)
_logger.Debug("Subject: {0}", oSubject) _logger.Debug("Subject: {0}", oSubject)
_logger.Debug("Body {0}", oFinalBodyText) _logger.Debug("Body {0}", oFinalBodyText)
Dim osql = $"Select MAX(GUID) FROM TBEMLP_HISTORY WITH (NOLOCK) WHERE EMAIL_MSGID = '{MessageId}'" Dim osql = $"Select MAX(GUID) FROM TBEMLP_HISTORY WHERE EMAIL_MSGID = '{MessageId}'"
Dim oHistoryID = _mssql.GetScalarValue(osql) Dim oHistoryID = _mssql.GetScalarValue(osql)
If IsNumeric(oHistoryID) Then If IsNumeric(oHistoryID) Then
@@ -227,7 +223,7 @@ Namespace ZUGFeRD
End Sub End Sub
Public Function GetEmailDataForMessageId(MessageId As String) As EmailData Public Function GetEmailDataForMessageId(MessageId As String) As EmailData
Dim oSQL = $"SELECT EMAIL_FROM, EMAIL_SUBJECT FROM TBEMLP_HISTORY WITH (NOLOCK) WHERE EMAIL_MSGID = '{MessageId}'" Dim oSQL = $"SELECT EMAIL_FROM, EMAIL_SUBJECT FROM TBEMLP_HISTORY WHERE EMAIL_MSGID = '{MessageId}'"
Try Try
Dim oDatatable = _mssql.GetDatatable(oSQL) Dim oDatatable = _mssql.GetDatatable(oSQL)
Dim oRow As DataRow Dim oRow As DataRow

View File

@@ -10,5 +10,5 @@
FileSizeLimitReachedException = 20008 FileSizeLimitReachedException = 20008
OutOfMemoryException = 20009 OutOfMemoryException = 20009
UnhandledException = 20010 UnhandledException = 20010
FileMoveException = 20011 FileMoveException = 200011
End Enum End Enum

View File

@@ -1,8 +1,6 @@
Imports System.Collections.Generic Imports System.Collections.Generic
Imports System.Globalization
Imports System.IO Imports System.IO
Imports System.Linq Imports System.Linq
Imports System.Text
Imports DigitalData.Modules.Base Imports DigitalData.Modules.Base
Imports DigitalData.Modules.Database Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Interfaces Imports DigitalData.Modules.Interfaces
@@ -93,8 +91,7 @@ Namespace ZUGFeRD
' Write Embedded Files to disk ' Write Embedded Files to disk
For Each oResult In pEmbeddedAttachments For Each oResult In pEmbeddedAttachments
Try Try
Dim oCleanedFilename As String = BereinigeDateinamenAscii(oResult.FileName) Dim oFileName As String = $"{pMessageId}~{oResult.FileName}"
Dim oFileName As String = $"{pMessageId}~{oCleanedFilename}"
Dim oFilePath As String = Path.Combine(oAttachmentDirectory, oFileName) Dim oFilePath As String = Path.Combine(oAttachmentDirectory, oFileName)
If Not File.Exists(oAttachmentDirectory) Then If Not File.Exists(oAttachmentDirectory) Then
@@ -211,7 +208,6 @@ Namespace ZUGFeRD
Return False ' Andere Fehler Return False ' Andere Fehler
End Try End Try
End Function End Function
Public Function GetEmailPathWithSubjectAsName(RejectedEmailDirectory As String, UncleanedSubject As String) As String Public Function GetEmailPathWithSubjectAsName(RejectedEmailDirectory As String, UncleanedSubject As String) As String
Dim oCleanSubject = String.Join("", UncleanedSubject.Split(Path.GetInvalidPathChars())) Dim oCleanSubject = String.Join("", UncleanedSubject.Split(Path.GetInvalidPathChars()))
Dim oAttachmentDirectory = RejectedEmailDirectory Dim oAttachmentDirectory = RejectedEmailDirectory
@@ -222,41 +218,6 @@ Namespace ZUGFeRD
Return oAttachmentPath Return oAttachmentPath
End Function End Function
''' <summary>
''' 20.8.2026 - In den Dateinamen der Anhänge in einem PDF können Unicode-Zeichen vorkommen
''' die später nicht mehr verarbeitet werden können. sie werden hier rausgefiltert
''' </summary>
''' <param name="pFilename"></param>
''' <returns></returns>
Function BereinigeDateinamenAscii(pFilename As String) As String
If pFilename.IsNullOrEmpty() Then
Return String.Empty
End If
' Restliche Diakritika entfernen (é, à, ñ, etc.)
Dim normalisiert As String = pFilename.Normalize(NormalizationForm.FormD)
Dim sb As New StringBuilder()
For Each c As Char In normalisiert
If CharUnicodeInfo.GetUnicodeCategory(c) = UnicodeCategory.NonSpacingMark Then
Continue For
End If
Dim code As Integer = AscW(c)
If code >= 32 AndAlso code <= 126 Then
If "\/:*?""<>|".Contains(c) Then
sb.Append("_")
Else
sb.Append(c)
End If
End If
' Alles andere (z.B. 你好) wird komplett verworfen
Next
Return sb.ToString()
End Function
End Class End Class
End Namespace End Namespace

View File

@@ -33,7 +33,7 @@ Public Class HashFunctions
End If End If
' Check if Checksum exists in History Table ' Check if Checksum exists in History Table
Dim oCheckCommand = $"SELECT * FROM TBEMLP_HISTORY WITH (NOLOCK) WHERE GUID = (SELECT MAX(GUID) FROM TBEMLP_HISTORY WITH (NOLOCK) WHERE UPPER(MD5HASH) = UPPER('{oMD5CheckSum}'))" Dim oCheckCommand = $"SELECT * FROM TBEMLP_HISTORY WHERE GUID = (SELECT MAX(GUID) FROM TBEMLP_HISTORY WHERE UPPER(MD5HASH) = UPPER('{oMD5CheckSum}'))"
Dim oTable As DataTable = Database.GetDatatable(oCheckCommand, MSSQLServer.TransactionMode.NoTransaction) Dim oTable As DataTable = Database.GetDatatable(oCheckCommand, MSSQLServer.TransactionMode.NoTransaction)
' If History entries could not be fetched, just return the MD5 Checksum ' If History entries could not be fetched, just return the MD5 Checksum
@@ -94,7 +94,7 @@ Public Class HashFunctions
Public Function GetOriginalFilename(pFilename As String) As String Public Function GetOriginalFilename(pFilename As String) As String
' Try to get the original filename from Attachment table ' Try to get the original filename from Attachment table
' If this fails, falls back to the new filename (<msgid>~Attm<i>.ext) ' If this fails, falls back to the new filename (<msgid>~Attm<i>.ext)
Dim oSQL = $"SELECT EMAIL_ATTMT FROM TBEMLP_HISTORY_ATTACHMENT WITH (NOLOCK) WHERE EMAIL_ATTMT_INDEX = '{pFilename}'" Dim oSQL = $"SELECT EMAIL_ATTMT FROM TBEMLP_HISTORY_ATTACHMENT WHERE EMAIL_ATTMT_INDEX = '{pFilename}'"
Dim oEmailAttachment = Database.GetScalarValue(oSQL, MSSQLServer.TransactionMode.NoTransaction) Dim oEmailAttachment = Database.GetScalarValue(oSQL, MSSQLServer.TransactionMode.NoTransaction)
Dim oOriginalName = ObjectEx.NotNull(oEmailAttachment, pFilename) Dim oOriginalName = ObjectEx.NotNull(oEmailAttachment, pFilename)
Return oOriginalName Return oOriginalName

View File

@@ -68,7 +68,6 @@ Public Class ImportZUGFeRDFiles
Private ReadOnly _embeds As PDFEmbeds Private ReadOnly _embeds As PDFEmbeds
Private SQL_xRechnung_ItemTemplate As String = "" Private SQL_xRechnung_ItemTemplate As String = ""
Private SQL_ebInterface_CompleteXMLItems As String = ""
Private ReadOnly _gdpictureLicenseKey As String Private ReadOnly _gdpictureLicenseKey As String
Private ReadOnly _xRechnungCreator As XRechnungViewDocument Private ReadOnly _xRechnungCreator As XRechnungViewDocument
@@ -82,8 +81,6 @@ Public Class ImportZUGFeRDFiles
Public ZugferdFileCount As Integer = 0 Public ZugferdFileCount As Integer = 0
Public MD5Checksum As String = Nothing Public MD5Checksum As String = Nothing
Public XMLSpecification As String = Nothing
Public XMLSchema As String = Nothing
Public EmailAttachmentFiles As New List(Of FileInfo) Public EmailAttachmentFiles As New List(Of FileInfo)
Public EmbeddedAttachmentFiles As New List(Of PDFEmbeds.EmbeddedFile) Public EmbeddedAttachmentFiles As New List(Of PDFEmbeds.EmbeddedFile)
@@ -117,31 +114,22 @@ Public Class ImportZUGFeRDFiles
Public Sub Start(Arguments As Object) Implements IJob.Start Public Sub Start(Arguments As Object) Implements IJob.Start
Dim oArgs As WorkerArgs = Arguments Dim oArgs As WorkerArgs = Arguments
Dim oAttachmentExtractor = New PDFEmbeds(_logConfig) Dim oAttachmentExtractor = New PDFEmbeds(_logConfig)
Dim oSpecification As String = String.Empty
_EmailOutAccountId = oArgs.EmailOutProfileId _EmailOutAccountId = oArgs.EmailOutProfileId
_zugferd = New ZUGFeRDInterface(_logConfig, _gdpictureLicenseKey, New ZUGFeRDInterface.ZugferdOptions() With { _zugferd = New ZUGFeRDInterface(_logConfig, _gdpictureLicenseKey, New ZUGFeRDInterface.ZugferdOptions() With {
.AllowFacturX_Filename = oArgs.AllowFacturX, .AllowFacturX_Filename = oArgs.AllowFacturX,
.AllowXRechnung_Filename = oArgs.AllowXRechnung, .AllowXRechnung_Filename = oArgs.AllowXRechnung,
.AllowZugferd_1_0_Schema = oArgs.AllowZugferd10, .AllowPeppol_3_x_Schema = oArgs.AllowPeppolBISBill3x
.AllowZugferd_2_x_Schema = oArgs.AllowZugferd2x,
.AllowZugferd_2_3_x_Schema = oArgs.AllowZugferd23x,
.AllowPeppol_3_x_Schema = oArgs.AllowPeppolBISBill3x,
.AllowEBInterface_Schema = oArgs.AllowEBInterface
}) })
_logger.Debug("Starting Job {0}", [GetType].Name) _logger.Debug("Starting Job {0}", [GetType].Name)
If oArgs.AllowXRechnung Or oArgs.AllowPeppolBISBill3x Or oArgs.AllowEBInterface Then If oArgs.AllowXRechnung Then
Dim oSQL = "SELECT SQL_COMMAND FROM TBDD_SQL_COMMANDS WITH (NOLOCK) WHERE TITLE = 'VWDD_ZUGFERD_VIEW_RECEIPT_TEMPLATE_ITEMS'" ' TODO - Config-Schalter hat NIX mit XRechnung-Dateien u. Sichtbelegen zu tun, sondern nur mit Dateinamen zu tun.
Dim oSQL = "SELECT SQL_COMMAND FROM TBDD_SQL_COMMANDS WHERE TITLE = 'VWDD_ZUGFERD_VIEW_RECEIPT_TEMPLATE_ITEMS'"
SQL_xRechnung_ItemTemplate = _mssql.GetScalarValue(oSQL) SQL_xRechnung_ItemTemplate = _mssql.GetScalarValue(oSQL)
End If End If
If oArgs.AllowEBInterface Then
Dim oSQL = "SELECT SQL_COMMAND FROM TBDD_SQL_COMMANDS WITH (NOLOCK) WHERE TITLE = 'EBINTERFACE_COMPLETE_MISSING_XML_ITEMS'"
SQL_ebInterface_CompleteXMLItems = _mssql.GetScalarValue(oSQL)
End If
Try Try
'For Each oPath As String In oArgs.WatchDirectory 'For Each oPath As String In oArgs.WatchDirectory
Dim oPath As String = oArgs.WatchDirectory Dim oPath As String = oArgs.WatchDirectory
@@ -220,7 +208,6 @@ Public Class ImportZUGFeRDFiles
Try Try
For Each oFile In oEInvoiceFileGroup For Each oFile In oEInvoiceFileGroup
oSpecification = String.Empty
oFileCounter += 1 oFileCounter += 1
Dim oResult As ProcessFileResult Dim oResult As ProcessFileResult
@@ -234,7 +221,6 @@ Public Class ImportZUGFeRDFiles
_logger.Debug("eInvoice File found") _logger.Debug("eInvoice File found")
oMD5CheckSum = oResult.MD5Checksum oMD5CheckSum = oResult.MD5Checksum
oZUGFeRDCount = oResult.ZugferdFileCount oZUGFeRDCount = oResult.ZugferdFileCount
oSpecification = oResult.XMLSpecification
oEmailAttachmentFiles.AddRange(oResult.EmailAttachmentFiles) oEmailAttachmentFiles.AddRange(oResult.EmailAttachmentFiles)
oEmbeddedAttachmentFiles.AddRange(oResult.EmbeddedAttachmentFiles) oEmbeddedAttachmentFiles.AddRange(oResult.EmbeddedAttachmentFiles)
Else ' No zugferd found! Else ' No zugferd found!
@@ -453,34 +439,21 @@ Public Class ImportZUGFeRDFiles
If oMoveDirectory = DIRECTORY_DONT_MOVE Then If oMoveDirectory = DIRECTORY_DONT_MOVE Then
_logger.Info("Application Error occurred. Files for message Id {0} will not be moved.", oMessageId) _logger.Info("Application Error occurred. Files for message Id {0} will not be moved.", oMessageId)
ElseIf (oArgs.AllowXRechnung Or oArgs.AllowPeppolBISBill3x Or oArgs.AllowEBInterface) And oIsSuccess And ElseIf oArgs.AllowXRechnung And oIsSuccess And
oEInvoiceFileGroup.Item(0).Extension.Equals(".xml", StringComparison.OrdinalIgnoreCase) = True Then oEInvoiceFileGroup.Item(0).Extension.Equals(".xml", StringComparison.OrdinalIgnoreCase) = True Then
_logger.Debug("Before Creating the PDF-File from XML data / Before Commit") _logger.Debug("Before Creating the PDF-File from XML data / Before Commit")
oxRechnungHandle = True oxRechnungHandle = True
If oSQLTransaction IsNot Nothing Then
' Commit Transaction - muss ausgeführt werden, sonst sind keine Daten in der DB vorhanden
oSQLTransaction.Commit()
_logger.Debug("XML commit triggered")
End If
' Vor der Sichtbeleg-Erzeugung, müssen ggf Daten nachberechnet werden.
' Hier wird die Prozedur für EBINTERFACE_61 aufgerufen, falls der Beleg dieses Schema verwendet
If oArgs.AllowEBInterface AndAlso
String.Equals(oSpecification, "EBINTERFACE_61", StringComparison.InvariantCultureIgnoreCase) AndAlso
Not String.IsNullOrEmpty(SQL_ebInterface_CompleteXMLItems) Then
_logger.Debug("Before Calling ebInterface Procedure")
Dim oSQL_MsgIDReplace_1 As String = SQL_ebInterface_CompleteXMLItems.Replace("@MSG_ID", oFileGroup.Key)
Dim oSqlResult = _mssql.ExecuteNonQuery(oSQL_MsgIDReplace_1)
_logger.Debug("Result of ebInterface Procedure: [{0}]", oSqlResult)
End If
' Hier das neue PDF erzeugen ' Hier das neue PDF erzeugen
'but before we need to get all Data we need 'but before we need to get all Data we need
MyTemplateValues_xInvDT = Nothing MyTemplateValues_xInvDT = Nothing
Dim oSQL_MsgIDReplace = SQL_xRechnung_ItemTemplate Dim oSQL_MsgIDReplace = SQL_xRechnung_ItemTemplate
oSQL_MsgIDReplace = oSQL_MsgIDReplace.Replace("@MSG_ID", oFileGroup.Key) oSQL_MsgIDReplace = oSQL_MsgIDReplace.Replace("@MSG_ID", oFileGroup.Key)
If oSQLTransaction IsNot Nothing Then
' Commit Transaction
oSQLTransaction.Commit()
_logger.Debug("XML commit triggered")
End If
MyTemplateValues_xInvDT = _mssql.GetDatatable(oSQL_MsgIDReplace) MyTemplateValues_xInvDT = _mssql.GetDatatable(oSQL_MsgIDReplace)
If Not IsNothing(MyTemplateValues_xInvDT) Then If Not IsNothing(MyTemplateValues_xInvDT) Then
@@ -624,8 +597,6 @@ Public Class ImportZUGFeRDFiles
If oDocument IsNot Nothing Then If oDocument IsNot Nothing Then
sqlResult = StoreXMLItemsInDatabase(pMessageId, oDocument, pFile, pConnections, pArgs, oResult) sqlResult = StoreXMLItemsInDatabase(pMessageId, oDocument, pFile, pConnections, pArgs, oResult)
oResult.XMLSpecification = oDocument.Specification
oResult.XMLSchema = oDocument.UsedXMLSchema
End If End If
Catch ex As Exception Catch ex As Exception
@@ -748,10 +719,6 @@ Public Class ImportZUGFeRDFiles
Dim oPropertyMap As Dictionary(Of String, XmlItemProperty) = _zugferd.FilterPropertyMap(pArgs.PropertyMapList, pDocument.Specification) Dim oPropertyMap As Dictionary(Of String, XmlItemProperty) = _zugferd.FilterPropertyMap(pArgs.PropertyMapList, pDocument.Specification)
Dim oCheckResult = _zugferd.PropertyValues.CheckPropertyValues(pDocument.SchemaObject, oPropertyMap, pMessageId) Dim oCheckResult = _zugferd.PropertyValues.CheckPropertyValues(pDocument.SchemaObject, oPropertyMap, pMessageId)
' root-Attribute falls konfiguriert auslesen, Ergebnis im oCheckResult enthalten
Dim oRootAttributePropertyMap As Dictionary(Of String, XmlItemProperty) = _zugferd.FilterRootPropertyMap(pArgs.PropertyMapList, pDocument.Specification)
oCheckResult = _zugferd.PropertyValues.CheckRootAttributeValues(pDocument, oRootAttributePropertyMap, pMessageId, oCheckResult)
_logger.Info("Properties checked: [{0}] missing properties / [{1}] valid properties found.", oCheckResult.MissingProperties.Count, oCheckResult.ValidProperties.Count) _logger.Info("Properties checked: [{0}] missing properties / [{1}] valid properties found.", oCheckResult.MissingProperties.Count, oCheckResult.ValidProperties.Count)
If oCheckResult.MissingProperties.Count > 0 Then If oCheckResult.MissingProperties.Count > 0 Then
@@ -868,7 +835,6 @@ Public Class ImportZUGFeRDFiles
_logger.Error("Could not save File to Disk!") _logger.Error("Could not save File to Disk!")
Dim oReasonString = "Could not save file " + newAttachmentFilename + " to disk." Dim oReasonString = "Could not save file " + newAttachmentFilename + " to disk."
AddRejectedState(pMessageId, oReasonString, "EMBEDDED FILE CONSISTENCY NOT OK", "Info GUI", pConnections.SQLServerTransaction) AddRejectedState(pMessageId, oReasonString, "EMBEDDED FILE CONSISTENCY NOT OK", "Info GUI", pConnections.SQLServerTransaction)
nextAttachmentIndex += 1
Continue For Continue For
End If End If
@@ -876,11 +842,6 @@ Public Class ImportZUGFeRDFiles
_logger.Error("Could not save File to Disk!") _logger.Error("Could not save File to Disk!")
Dim oReasonString = "Validation of file " + newAttachmentFilename + " on disk was NOT succesfully." Dim oReasonString = "Validation of file " + newAttachmentFilename + " on disk was NOT succesfully."
AddRejectedState(pMessageId, oReasonString, "EMBEDDED FILE CONSISTENCY NOT OK", "Info GUI", pConnections.SQLServerTransaction) AddRejectedState(pMessageId, oReasonString, "EMBEDDED FILE CONSISTENCY NOT OK", "Info GUI", pConnections.SQLServerTransaction)
' Datei ist Murks und muss gelöscht werden, wenn möglich
DeleteFileFromDisk(embeddedFilePath)
nextAttachmentIndex += 1
Continue For Continue For
End If End If
@@ -926,20 +887,6 @@ Public Class ImportZUGFeRDFiles
End Try End Try
End Function End Function
Private Function DeleteFileFromDisk(pEmbeddedFilePath As String) As Boolean
Try
Dim oFile As FileInfo = New FileInfo(pEmbeddedFilePath)
If oFile IsNot Nothing Then
oFile.Delete()
End If
Return True
Catch ex As Exception
_logger.Warn("Coul not delete file {0}.", pEmbeddedFilePath)
Return False
End Try
End Function
Private Function GetEmbeddedFileExtension(pMimeTypeValue As String) As String Private Function GetEmbeddedFileExtension(pMimeTypeValue As String) As String
If pMimeTypeValue.IsNullOrEmpty() Then If pMimeTypeValue.IsNullOrEmpty() Then
@@ -1089,7 +1036,7 @@ Public Class ImportZUGFeRDFiles
''' <returns>Nächster Attachment Index</returns> ''' <returns>Nächster Attachment Index</returns>
Private Function GetNextAttachmentIndex(pMessageId As String) As Integer Private Function GetNextAttachmentIndex(pMessageId As String) As Integer
Try Try
Dim oSQL = $"SELECT count(*) FROM TBEMLP_HISTORY_ATTACHMENT WITH (NOLOCK) WHERE EMAIL_MSGID = '{pMessageId}'" Dim oSQL = $"SELECT count(*) FROM TBEMLP_HISTORY_ATTACHMENT WHERE EMAIL_MSGID = '{pMessageId}'"
Dim sqlResult = _mssql.GetScalarValue(oSQL) Dim sqlResult = _mssql.GetScalarValue(oSQL)
If sqlResult = 0 Then If sqlResult = 0 Then
@@ -1266,7 +1213,7 @@ Public Class ImportZUGFeRDFiles
End Function End Function
Private Function DeleteExistingPropertyValues(pMessageId As String, pConnections As DatabaseConnections) As Boolean Private Function DeleteExistingPropertyValues(pMessageId As String, pConnections As DatabaseConnections) As Boolean
Dim oDelSQL = $"DELETE FROM TBEDMI_ITEM_VALUE where REFERENCE_GUID = N'{pMessageId}'" Dim oDelSQL = $"DELETE FROM TBEDMI_ITEM_VALUE where REFERENCE_GUID = '{pMessageId}'"
Dim oStep As String = "TBEDMI_ITEM_VALUE Delete MessageID Items" Dim oStep As String = "TBEDMI_ITEM_VALUE Delete MessageID Items"
Try Try

View File

@@ -29,10 +29,9 @@ Public Class WorkerArgs
' Feature Flags ' Feature Flags
Public AllowFacturX As Boolean = True Public AllowFacturX As Boolean = True
Public AllowXRechnung As Boolean = True Public AllowXRechnung As Boolean = True
Public AllowZugferd10 As Boolean = False Public AllowZugferd10 As Boolean = True
Public AllowZugferd2x As Boolean = False Public AllowZugferd2x As Boolean = True
Public AllowZugferd23x As Boolean = False Public AllowZugferd23x As Boolean = True
Public AllowPeppolBISBill3x As Boolean = False Public AllowPeppolBISBill3x As Boolean = False
Public AllowEBInterface As Boolean = False
End Class End Class

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -4,36 +4,30 @@
<package id="DocumentFormat.OpenXml" version="3.2.0" targetFramework="net462" /> <package id="DocumentFormat.OpenXml" version="3.2.0" targetFramework="net462" />
<package id="DocumentFormat.OpenXml.Framework" version="3.2.0" targetFramework="net462" /> <package id="DocumentFormat.OpenXml.Framework" version="3.2.0" targetFramework="net462" />
<package id="FirebirdSql.Data.FirebirdClient" version="7.5.0" targetFramework="net461" /> <package id="FirebirdSql.Data.FirebirdClient" version="7.5.0" targetFramework="net461" />
<package id="GdPicture" version="14.4.4" targetFramework="net462" /> <package id="GdPicture" version="14.3.3" targetFramework="net462" />
<package id="GdPicture.runtimes.windows" version="14.4.4" targetFramework="net462" /> <package id="GdPicture.runtimes.windows" version="14.3.3" targetFramework="net462" />
<package id="Google.Protobuf" version="3.33.2" targetFramework="net462" />
<package id="Microsoft.AspNet.WebApi.Client" version="6.0.0" targetFramework="net462" /> <package id="Microsoft.AspNet.WebApi.Client" version="6.0.0" targetFramework="net462" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="10.0.5" targetFramework="net462" /> <package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net462" />
<package id="Microsoft.Bcl.Cryptography" version="10.0.5" targetFramework="net462" />
<package id="Microsoft.Bcl.HashCode" version="6.0.0" targetFramework="net462" />
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net462" /> <package id="Microsoft.CSharp" version="4.7.0" targetFramework="net462" />
<package id="Microsoft.VisualBasic" version="10.3.0" targetFramework="net462" /> <package id="Microsoft.VisualBasic" version="10.3.0" targetFramework="net462" />
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" /> <package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" />
<package id="Newtonsoft.Json.Bson" version="1.0.2" targetFramework="net462" /> <package id="Newtonsoft.Json.Bson" version="1.0.2" targetFramework="net462" />
<package id="NLog" version="5.0.5" targetFramework="net461" /> <package id="NLog" version="5.0.5" targetFramework="net461" />
<package id="OpenMcdf" version="3.1.4" targetFramework="net462" /> <package id="OpenMcdf" version="2.4.1" targetFramework="net462" />
<package id="protobuf-net" version="3.2.46" targetFramework="net462" /> <package id="protobuf-net" version="3.2.46" targetFramework="net462" />
<package id="protobuf-net.Core" version="3.2.46" targetFramework="net462" /> <package id="protobuf-net.Core" version="3.2.46" targetFramework="net462" />
<package id="RtfPipe" version="2.0.7677.4303" targetFramework="net462" /> <package id="RtfPipe" version="2.0.7677.4303" targetFramework="net462" />
<package id="System.Buffers" version="4.6.1" targetFramework="net462" /> <package id="System.Buffers" version="4.6.0" targetFramework="net462" />
<package id="System.CodeDom" version="8.0.0" targetFramework="net462" /> <package id="System.CodeDom" version="8.0.0" targetFramework="net462" />
<package id="System.Collections.Immutable" version="10.0.5" targetFramework="net462" /> <package id="System.Collections.Immutable" version="8.0.0" targetFramework="net462" />
<package id="System.Formats.Asn1" version="10.0.5" targetFramework="net462" /> <package id="System.IO.Packaging" version="8.0.1" targetFramework="net462" />
<package id="System.IO.Packaging" version="10.0.5" targetFramework="net462" />
<package id="System.IO.Pipelines" version="10.0.5" targetFramework="net462" />
<package id="System.Management" version="8.0.0" targetFramework="net462" /> <package id="System.Management" version="8.0.0" targetFramework="net462" />
<package id="System.Memory" version="4.6.3" targetFramework="net462" /> <package id="System.Memory" version="4.6.0" targetFramework="net462" />
<package id="System.Numerics.Vectors" version="4.6.1" targetFramework="net462" /> <package id="System.Numerics.Vectors" version="4.6.0" targetFramework="net462" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.1.2" targetFramework="net462" /> <package id="System.Runtime.CompilerServices.Unsafe" version="6.1.0" targetFramework="net462" />
<package id="System.Security.Cryptography.Pkcs" version="10.0.5" targetFramework="net462" /> <package id="System.Security.Cryptography.Pkcs" version="8.0.1" targetFramework="net462" />
<package id="System.Text.Encodings.Web" version="10.0.5" targetFramework="net462" /> <package id="System.Text.Encodings.Web" version="8.0.0" targetFramework="net462" />
<package id="System.Text.Json" version="10.0.5" targetFramework="net462" /> <package id="System.Text.Json" version="8.0.5" targetFramework="net462" />
<package id="System.Threading.Channels" version="10.0.5" targetFramework="net462" /> <package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net462" />
<package id="System.Threading.Tasks.Extensions" version="4.6.3" targetFramework="net462" /> <package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
<package id="System.ValueTuple" version="4.6.1" targetFramework="net462" />
</packages> </packages>

View File

@@ -1,134 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{5EBACBFA-F11A-4BBF-8D02-91461F2293ED}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>DigitalData.Modules.License</RootNamespace>
<AssemblyName>DigitalData.Modules.License</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>Windows</MyType>
<TargetFrameworkVersion>net462</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>DigitalData.Modules.License.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>DigitalData.Modules.License.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Diagnostics" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup>
<Compile Include="LicenseCreator.vb" />
<Compile Include="LicenseFile.vb" />
<Compile Include="LicenseLegacy.vb" />
<Compile Include="LicenseManagerLegacy.vb" />
<Compile Include="LicenseSchema.vb">
<DependentUpon>LicenseSchema.xsd</DependentUpon>
</Compile>
<Compile Include="LicensesLegacy.vb" />
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="LicenseSchema.xsd">
<SubType>Designer</SubType>
</None>
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
</None>
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Logging\Logging.vbproj">
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
<Name>Logging</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>
</PropertyGroup>
</Project>

View File

@@ -510,6 +510,7 @@ Public Class LogConfig
' Add debug rule, if configured ' Add debug rule, if configured
If _EnableDebugLogging = True Then If _EnableDebugLogging = True Then
_config.AddRule(LogLevel.Debug, LogLevel.Error, TARGET_DEBUG) _config.AddRule(LogLevel.Debug, LogLevel.Error, TARGET_DEBUG)
oLogger.Info("DEBUG Logging is now Enabled.")
Else Else
oLogger.Debug("DEBUG Logging is now Disabled.") oLogger.Debug("DEBUG Logging is now Disabled.")
End If End If

View File

@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyCompany("Digital Data GmbH, Heuchelheim")> <Assembly: AssemblyCompany("Digital Data GmbH, Heuchelheim")>
<Assembly: AssemblyProduct("Modules.Logging")> <Assembly: AssemblyProduct("Modules.Logging")>
<Assembly: AssemblyCopyright("Copyright © 2025")> <Assembly: AssemblyCopyright("Copyright © 2025")>
<Assembly: AssemblyTrademark("2.7.0.0")> <Assembly: AssemblyTrademark("2.6.4.0")>
<Assembly: ComVisible(False)> <Assembly: ComVisible(False)>
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.7.0.0")> <Assembly: AssemblyVersion("2.6.5.0")>
<Assembly: AssemblyFileVersion("2.7.0.0")> <Assembly: AssemblyFileVersion("2.6.5.0")>

View File

@@ -15,7 +15,7 @@ Option Explicit On
Namespace My Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0"), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase Inherits Global.System.Configuration.ApplicationSettingsBase

View File

@@ -31,10 +31,7 @@ Namespace Mail
Public Function Connect(pServer As String, pPort As Integer, pUser As String, pPassword As String, pAuthType As String, pOptions As MailSession.MailSessionOptions) As MailSession.SessionInfo Public Function Connect(pServer As String, pPort As Integer, pUser As String, pPassword As String, pAuthType As String, pOptions As MailSession.MailSessionOptions) As MailSession.SessionInfo
Return MailSession.ConnectToServerWithBasicAuth(pServer, pPort, pUser, pPassword, pAuthType, pOptions) Return MailSession.ConnectToServerWithBasicAuth(pServer, pPort, pUser, pPassword, pAuthType, pOptions)
End Function End Function
Public Function ConnectToO365(pUser As String, pClientId As String, pTenantId As String, pClientSecret As String) As MailSession.SessionInfo
Dim oOptions = New MailSession.MailSessionOptions With {.EnableTls1_2 = True}
Return MailSession.ConnectToServerWithO365OAuth(pUser, pClientId, pTenantId, pClientSecret, oOptions)
End Function
Public Function Disconnect() As Boolean Public Function Disconnect() As Boolean
Return MailSession.DisconnectFromServer() Return MailSession.DisconnectFromServer()
End Function End Function

View File

@@ -11,6 +11,7 @@ Namespace Mail
Inherits BaseClass Inherits BaseClass
Public ReadOnly Client As ClientBase Public ReadOnly Client As ClientBase
Public ReadOnly OAuth2 As OAuth2
Public Const AUTH_SSL = "SSL" Public Const AUTH_SSL = "SSL"
Public Const AUTH_STARTTLS = "STARTTLS" Public Const AUTH_STARTTLS = "STARTTLS"
@@ -18,7 +19,9 @@ Namespace Mail
Public Const AUTH_NONE = "NONE" Public Const AUTH_NONE = "NONE"
Public Const AUTH_OAUTH2 = "OAUTH2" Public Const AUTH_OAUTH2 = "OAUTH2"
Private Const SMTP_IGNORED_ERRORS As SslPolicyErrors = SslPolicyErrors.RemoteCertificateChainErrors Or SslPolicyErrors.RemoteCertificateNameMismatch Private Const SMTP_IGNORED_ERRORS As SslPolicyErrors =
SslPolicyErrors.RemoteCertificateChainErrors Or ' self-signed
SslPolicyErrors.RemoteCertificateNameMismatch ' name mismatch
Private _Session As SessionInfo Private _Session As SessionInfo
@@ -53,7 +56,7 @@ Namespace Mail
Public Property EnableTls1_1 As Boolean = False Public Property EnableTls1_1 As Boolean = False
Public Property EnableTls1_2 As Boolean = False Public Property EnableTls1_2 As Boolean = False
' Not available in .NET4.6.2 ' Not available in .NET 4.6.2
'Public Property EnableTls1_3 As Boolean = False 'Public Property EnableTls1_3 As Boolean = False
End Class End Class
@@ -68,12 +71,12 @@ Namespace Mail
''' <returns></returns> ''' <returns></returns>
Public Function ConnectToServerWithBasicAuth(pServer As String, pPort As Integer, pUser As String, pPassword As String, pAuthType As String, pOptions As MailSessionOptions) As SessionInfo Public Function ConnectToServerWithBasicAuth(pServer As String, pPort As Integer, pUser As String, pPassword As String, pAuthType As String, pOptions As MailSessionOptions) As SessionInfo
Dim oSession = New SessionInfo With { Dim oSession = New SessionInfo With {
.Server = pServer, .Server = pServer,
.Port = pPort, .Port = pPort,
.User = pUser, .User = pUser,
.Password = pPassword, .Password = pPassword,
.AuthType = pAuthType .AuthType = pAuthType
} }
Logger.Debug("Connecting to Server..") Logger.Debug("Connecting to Server..")
Logger.Debug("Server: [{0}]", oSession.Server) Logger.Debug("Server: [{0}]", oSession.Server)
@@ -89,23 +92,17 @@ Namespace Mail
End Function End Function
Public Function ConnectToServerWithO365OAuth(pUser As String, pClientId As String, pTenantId As String, pClientSecret As String, pOptions As MailSessionOptions) As SessionInfo Public Function ConnectToServerWithO365OAuth(pUser As String, pClientId As String, pTenantId As String, pClientSecret As String, pOptions As MailSessionOptions) As SessionInfo
' Choose server/port based on the client type
Dim oServer As String = If(TypeOf Client Is Smtp, "smtp-mail.outlook.com", OAuth2.O365_SERVER_IMAP)
Dim port As Integer = If(TypeOf Client Is Imap, 993, If(TypeOf Client Is Smtp, 587, 993))
Dim oSession = New SessionInfo With { Dim oSession = New SessionInfo With {
.Server = oServer, .Server = OAuth2.O365_SERVER,
.Port = port, .ClientId = pClientId,
.ClientId = pClientId, .ClientSecret = pClientSecret,
.ClientSecret = pClientSecret, .TenantId = pTenantId,
.TenantId = pTenantId, .User = pUser,
.User = pUser, .AuthType = AUTH_OAUTH2
.AuthType = AUTH_OAUTH2 }
}
Logger.Debug("Connecting to Server..") Logger.Debug("Connecting to Server..")
Logger.Debug("Server: [{0}]", oSession.Server) Logger.Debug("Server: [{0}]", oSession.Server)
Logger.Debug("Port: [{0}]", oSession.Port)
Logger.Debug("User: [{0}]", oSession.User) Logger.Debug("User: [{0}]", oSession.User)
Logger.Debug("ClientId: [{0}]", oSession.ClientId) Logger.Debug("ClientId: [{0}]", oSession.ClientId)
Logger.Debug("TenantId: [{0}]", oSession.TenantId) Logger.Debug("TenantId: [{0}]", oSession.TenantId)
@@ -123,52 +120,61 @@ Namespace Mail
If pOptions.EnableDefault Then If pOptions.EnableDefault Then
Logger.Debug("Enabling Default TLS Version") Logger.Debug("Enabling Default TLS Version")
Client.SSLConfiguration.EnabledSslProtocols = System.Security.Authentication.SslProtocols.Default Client.SSLConfiguration.EnabledSslProtocols = Security.Authentication.SslProtocols.Default
Else Else
Logger.Debug("Disabling Default TLS Version") Logger.Debug("Disabling Default TLS Version")
Client.SSLConfiguration.EnabledSslProtocols = System.Security.Authentication.SslProtocols.None Client.SSLConfiguration.EnabledSslProtocols = Security.Authentication.SslProtocols.None
End If End If
' Set TLS Version manually if requested ' Set TLS Version manually if requested
If pOptions.EnableTls1_1 Then If pOptions.EnableTls1_1 Then
Logger.Debug("Enabling TLS Version1.1") Logger.Debug("Enabling TLS Version 1.1")
Client.SSLConfiguration.EnabledSslProtocols = Client.SSLConfiguration.EnabledSslProtocols Or System.Security.Authentication.SslProtocols.Tls11 Client.SSLConfiguration.EnabledSslProtocols = Client.SSLConfiguration.EnabledSslProtocols Or Security.Authentication.SslProtocols.Tls11
End If End If
If pOptions.EnableTls1_2 Then If pOptions.EnableTls1_2 Then
Logger.Debug("Enabling TLS Version1.2") Logger.Debug("Enabling TLS Version 1.2")
Client.SSLConfiguration.EnabledSslProtocols = Client.SSLConfiguration.EnabledSslProtocols Or System.Security.Authentication.SslProtocols.Tls12 Client.SSLConfiguration.EnabledSslProtocols = Client.SSLConfiguration.EnabledSslProtocols Or Security.Authentication.SslProtocols.Tls12
End If End If
' This is not available in .NET 4.6.2, only in .NET 4.7/4.8
'If pOptions.EnableTls1_3 Then
' Logger.Debug("Enabling TLS Version 1.3")
' oSession.SSLConfiguration.EnabledSslProtocols = oSession.SSLConfiguration.EnabledSslProtocols Or Security.Authentication.SslProtocols.Tls13
'End If
Logger.Debug("Enabled Encryption Protocols: [{0}]", Client.SSLConfiguration.EnabledSslProtocols) Logger.Debug("Enabled Encryption Protocols: [{0}]", Client.SSLConfiguration.EnabledSslProtocols)
If pSession.AuthType = AUTH_OAUTH2 Then If pSession.AuthType = AUTH_OAUTH2 Then
Try Try
If TypeOf Client Is Imap Then If TypeOf Client Is Imap Then
Dim oClient As Imap = DirectCast(Client, Imap) Dim oClient As Imap = Client
Logger.Debug("Connecting with [OAuth2/IMAP/ConnectSSL] on [{0}/{1}]", pSession.Server, If(pSession.Port > 0, pSession.Port, 993))
oClient.ConnectSSL(pSession.Server) ', If(pSession.Port > 0, pSession.Port, 993)
ElseIf TypeOf Client Is Smtp Then Logger.Debug("Connecting with [OAuth2/ConnectSSL] on [{0}]", pSession.Server)
Dim s As Smtp = DirectCast(Client, Smtp) oClient.ConnectSSL(pSession.Server)
Logger.Debug("Connecting with [OAuth2/SMTP/STARTTLS] on [{0}/{1}]", pSession.Server, If(pSession.Port > 0, pSession.Port, 587)) Else
s.Connect(pSession.Server, If(pSession.Port > 0, pSession.Port, 587)) Throw New ApplicationException("Only OAuth2 for IMAP is not yet supported!")
s.StartTLS()
End If End If
Catch ex As Exception Catch ex As Exception
Logger.Warn("Unexpected Error in ConnectToServer with Auth type OAuth2!") Logger.Warn("Unexpected Error in ConnectToServer with Auth type OAuth2!")
Logger.Error(ex) Logger.Error(ex)
pSession.Error = ex Session.Error = ex
Return pSession Return Session
End Try End Try
ElseIf pSession.AuthType = AUTH_SSL Then ElseIf pSession.AuthType = AUTH_SSL Then
Try Try
' SSL: always connect with SSL immediately ' Port 465 ist der SMTP-SSL-Port, wird bei der WISAG verwendet, aber veraltet
Logger.Debug("Connecting with [SSL/ConnectSSL] on [{0}/{1}]", pSession.Server, pSession.Port) ' Port 993 ist der IMAP-SSL-Port, zum Abholen der Mails
Client.ConnectSSL(pSession.Server, pSession.Port) If pSession.Port = 465 Or pSession.Port = 993 Then
Logger.Debug("Connecting with [SSL/ConnectSSL] on [{0}/{1}]", pSession.Server, pSession.Port)
Client.ConnectSSL(pSession.Server, pSession.Port)
Else
Logger.Debug("Connecting with [SSL/Connect] on [{0}/{1}]", pSession.Server, pSession.Port)
Client.Connect(pSession.Server, pSession.Port)
End If
Logger.Debug("Connection (AUTH_SSL) Successful!") Logger.Debug("Connection (AUTH_SSL) Successful!")
Catch ex As Exception Catch ex As Exception
@@ -176,41 +182,21 @@ Namespace Mail
Logger.Warn($"Error-message: {ex.Message}") Logger.Warn($"Error-message: {ex.Message}")
Logger.Error(ex) Logger.Error(ex)
pSession.Error = ex Session.Error = ex
Return pSession Return Session
End Try End Try
ElseIf pSession.AuthType = AUTH_SSLTLS Then ElseIf Session.AuthType = AUTH_SSLTLS Or Session.AuthType = AUTH_STARTTLS Then
Try Try
' SSL/TLS: same as SSL, explicit branch for clarity If pSession.Port = 993 Then
Logger.Debug("Connecting with [SSL/TLS/ConnectSSL] on [{0}/{1}]", pSession.Server, pSession.Port) Logger.Debug("Connecting with [STARTTLS/ConnectSSL] on [{0}/{1}]", pSession.Server, pSession.Port)
Client.ConnectSSL(pSession.Server, pSession.Port) Client.ConnectSSL(pSession.Server, pSession.Port)
Logger.Debug("Connection (AUTH_SSLTLS) Successful!") Else
Logger.Debug("Connecting with [STARTTLS/Connect] on [{0}/{1}]", pSession.Server, pSession.Port)
Catch ex As Exception Client.Connect(pSession.Server, pSession.Port)
Logger.Warn("Unexpected Error in ConnectToServer with Auth type SSL/TLS!")
Logger.Error(ex)
pSession.Error = ex
Return pSession
End Try
ElseIf pSession.AuthType = AUTH_STARTTLS Then
Try
' STARTTLS: connect plain and then upgrade
Logger.Debug("Connecting with [STARTTLS/Connect] on [{0}/{1}]", pSession.Server, pSession.Port)
' Für Azure Communication Services: Explizite TLS-Konfiguration
If pSession.Server.Contains("azurecomm.net") Then
Logger.Debug("Azure Communication Services detected - forcing TLS 1.2")
' Überschreibe alle vorherigen Einstellungen
Client.SSLConfiguration.EnabledSslProtocols = System.Security.Authentication.SslProtocols.Tls12
Logger.Debug("Forced Encryption Protocols: [{0}]", Client.SSLConfiguration.EnabledSslProtocols)
End If End If
Logger.Debug("Connection (AUTH_SSLTLS or AUTH_STARTTLS) Successful!")
Client.Connect(pSession.Server, pSession.Port)
Dim oSupportsSTARTTLS As Boolean = SupportsSTARTTLS(Client) Dim oSupportsSTARTTLS As Boolean = SupportsSTARTTLS(Client)
Logger.Debug("Server supports STARTTLS: [{0}]", oSupportsSTARTTLS) Logger.Debug("Server supports STARTTLS: [{0}]", oSupportsSTARTTLS)
@@ -219,7 +205,8 @@ Namespace Mail
DoSTARTTLS(Client) DoSTARTTLS(Client)
Logger.Debug("STARTTLS Successful!") Logger.Debug("STARTTLS Successful!")
Else Else
Throw New ApplicationException("Server does not support STARTTLS on this endpoint.") Logger.Debug("Server does not support STARTTLS. Enabling TLS1.2 instead.")
Client.SSLConfiguration.EnabledSslProtocols = Security.Authentication.SslProtocols.Tls12
End If End If
Catch ex As Exception Catch ex As Exception
@@ -232,11 +219,11 @@ Namespace Mail
Else Else
Try Try
Logger.Debug("Auth type [{0}]. Using PLAINTEXT connection.", pSession.AuthType) Logger.Debug("Auth type [{0}]. Using PLAINTEXT connection.", Session.AuthType)
Client.Connect(pSession.Server, pSession.Port, useSSL:=False) Client.Connect(pSession.Server, pSession.Port, useSSL:=False)
Catch ex As Exception Catch ex As Exception
Logger.Warn("Unexpected Error in ConnectToServer with Auth type [{0}]!", pSession.AuthType) Logger.Warn("Unexpected Error in ConnectToServer with Auth type [{0}]!", Session.AuthType)
Logger.Error(ex) Logger.Error(ex)
pSession.Error = ex pSession.Error = ex
@@ -247,10 +234,11 @@ Namespace Mail
Try Try
If pSession.User <> String.Empty Then If pSession.User <> String.Empty Then
Logger.Debug("Logging in with user [{0}] and Auth Type [{1}]", pSession.User, pSession.AuthType) Logger.Info("Logging in with user [{0}] and Auth Type [{1}]", pSession.User, pSession.AuthType)
If pSession.AuthType = AUTH_OAUTH2 Then If pSession.AuthType = AUTH_OAUTH2 Then
' Use OAuth2 token ' SessionInfo.Password will be the access token that was obtained
' in the OAuth2 flow before
DoUseBestLogin_OAuth2(Client, pSession) DoUseBestLogin_OAuth2(Client, pSession)
Else Else
DoUseBestLogin_BasicAuth(Client, pSession.User, pSession.Password) DoUseBestLogin_BasicAuth(Client, pSession.User, pSession.Password)
@@ -273,10 +261,10 @@ Namespace Mail
Public Function DisconnectFromServer() As Boolean Public Function DisconnectFromServer() As Boolean
Try Try
If Client IsNot Nothing Then If Client IsNot Nothing Then
Logger.Debug("Closing connection to Server [{0}]...", Session.Server) Logger.Debug("Closing connection to Server [{0}].", Session.Server)
DoClose(Client) DoClose(Client)
Session.Connected = False Session.Connected = False
Logger.Debug("Connection to Server [{0}] closed.", Session.Server) Logger.Info("Connection to Server [{0}] closed.", Session.Server)
Else Else
Logger.Debug("No connection currently open. Exiting.") Logger.Debug("No connection currently open. Exiting.")
End If End If
@@ -305,7 +293,7 @@ Namespace Mail
End If End If
End Function End Function
Private Function SupportsSTARTTLS(pClient As ClientBase) As Boolean Private Function SupportsSTARTTLS(pClient As ClientBase)
If TypeOf pClient Is Smtp Then If TypeOf pClient Is Smtp Then
Return DirectCast(pClient, Smtp).SupportedExtensions.Contains(SmtpExtension.StartTLS) Return DirectCast(pClient, Smtp).SupportedExtensions.Contains(SmtpExtension.StartTLS)
ElseIf TypeOf pClient Is Imap Then ElseIf TypeOf pClient Is Imap Then
@@ -328,32 +316,9 @@ Namespace Mail
Private Sub DoUseBestLogin_BasicAuth(pClient As ClientBase, pUserName As String, pPassword As String) Private Sub DoUseBestLogin_BasicAuth(pClient As ClientBase, pUserName As String, pPassword As String)
Logger.Debug("Logging in with Simple Auth") Logger.Debug("Logging in with Simple Auth")
Logger.Debug("Username format: [{0}]", If(pUserName.Contains("@"), "Email format", "Other format"))
If TypeOf pClient Is Smtp Then If TypeOf pClient Is Smtp Then
Dim smtp = DirectCast(pClient, Smtp) DirectCast(pClient, Smtp).UseBestLogin(pUserName, pPassword)
' Zeige unterstützte Auth-Methoden (nur Logging, keine Funktionsänderung)
Try
Dim supportedExtensions = smtp.SupportedExtensions()
Logger.Debug("Server supported extensions count: [{0}]", supportedExtensions.Count)
If supportedExtensions.Count > 0 Then
Logger.Debug("Server supported extensions: [{0}]", String.Join(", ", supportedExtensions.Select(Function(x) x.ToString())))
End If
Catch ex As Exception
Logger.Debug("Could not retrieve supported extensions: {0}", ex.Message)
End Try
' Azure Communication Services Detection (nur Logging)
If _Session?.Server?.Contains("azurecomm.net") Then
Logger.Debug("Azure Communication Services detected")
Logger.Debug("Note: Username should be '<endpoint>.communication.azure.com'")
Logger.Debug("Note: Password should be the Access Key from Azure Portal")
End If
' Ursprüngliche Funktionalität bleibt unverändert
smtp.UseBestLogin(pUserName, pPassword)
ElseIf TypeOf pClient Is Imap Then ElseIf TypeOf pClient Is Imap Then
DirectCast(pClient, Imap).UseBestLogin(pUserName, pPassword) DirectCast(pClient, Imap).UseBestLogin(pUserName, pPassword)
Else Else
@@ -364,61 +329,16 @@ Namespace Mail
Private Sub DoUseBestLogin_OAuth2(pClient As ClientBase, pSession As SessionInfo) Private Sub DoUseBestLogin_OAuth2(pClient As ClientBase, pSession As SessionInfo)
Logger.Debug("Logging in with O365 OAuth2") Logger.Debug("Logging in with O365 OAuth2")
Dim oOAuth = New OAuth2(LogConfig, pSession.TenantId, pSession.ClientId, pSession.ClientSecret)
Dim oAccessToken = oOAuth.GetAccessToken()
' Diagnose token shape (delegated vs app-only)
Try
Dim parts = oAccessToken.Split("."c)
If parts.Length = 3 Then
Dim payloadJson = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(PadBase64(parts(1))))
If payloadJson.Contains("""scp""") Then
Logger.Debug("OAuth2 token contains 'scp' (delegated) – IMAP App-only erwartet 'roles'.")
ElseIf payloadJson.Contains("""roles""") Then
Logger.Debug("OAuth2 token contains 'roles' (application permissions).")
Else
Logger.Debug("OAuth2 token payload hat weder 'scp' noch 'roles'.")
End If
End If
Catch ex As Exception
Logger.Debug("Token-Payload konnte nicht gelesen werden: {0}", ex.Message)
End Try
If TypeOf pClient Is Imap Then If TypeOf pClient Is Imap Then
Dim i = DirectCast(pClient, Imap) Dim oOAuth = New OAuth2(LogConfig, pSession.TenantId, pSession.ClientId, pSession.ClientSecret)
Dim oAccessToken = oOAuth.GetAccessToken()
' Login mit Hilfsmethode; bei Abbruch explizit SASL XOAUTH2 probieren DirectCast(pClient, Imap).LoginOAUTH2(pSession.User, oAccessToken)
Try
' Direkt versuchen, falls die verwendete Version LoginOAUTH2 unterstützt.
i.LoginOAUTH2(pSession.User, oAccessToken)
Catch ex As Exception
Logger.Warn("LoginOAUTH2 (IMAP) fehlgeschlagen: {0}", ex.Message)
Throw
End Try
ElseIf TypeOf pClient Is Smtp Then
Dim s = DirectCast(pClient, Smtp)
Try
s.LoginOAUTH2(pSession.User, oAccessToken)
Catch ex As Exception
Logger.Warn("LoginOAUTH2 (SMTP) fehlgeschlagen: {0}", ex.Message)
Throw
End Try
Else Else
Logger.Error("Unknown session type: [{0}]", pClient.GetType.ToString) Logger.Error("Unknown session type: [{0}]", pClient.GetType.ToString)
End If End If
End Sub End Sub
Private Shared Function PadBase64(input As String) As String
' Normalize Base64 URL-safe and pad to multiple of 4
If input Is Nothing Then Return String.Empty
Dim normalized As String = input.Replace("-", "+").Replace("_", "/")
Dim remainder As Integer = normalized.Length Mod 4
If remainder > 0 Then
normalized &= New String("="c, 4 - remainder)
End If
Return normalized
End Function
Private Sub DoSTARTTLS(pClient As ClientBase) Private Sub DoSTARTTLS(pClient As ClientBase)
If TypeOf pClient Is Smtp Then If TypeOf pClient Is Smtp Then
DirectCast(pClient, Smtp).StartTLS() DirectCast(pClient, Smtp).StartTLS()
@@ -430,13 +350,10 @@ Namespace Mail
End Sub End Sub
Private Sub Session_ServerCertificateValidate(sender As Object, e As ServerCertificateValidateEventArgs) Private Sub Session_ServerCertificateValidate(sender As Object, e As ServerCertificateValidateEventArgs)
Logger.Debug("Certificate validation for: [{0}]", e.Certificate?.Subject) ' i dont know why it works but it does
Logger.Debug("SSL Policy Errors: [{0}]", e.SslPolicyErrors)
If (e.SslPolicyErrors And Not SMTP_IGNORED_ERRORS) = SslPolicyErrors.None Then If (e.SslPolicyErrors And Not SMTP_IGNORED_ERRORS) = SslPolicyErrors.None Then
e.IsValid = True e.IsValid = True
Else Else
Logger.Warn("Certificate validation failed. Errors: [{0}]", e.SslPolicyErrors)
e.IsValid = False e.IsValid = False
End If End If
End Sub End Sub

View File

@@ -1,97 +1,58 @@
Imports DigitalData.Modules.Base Imports DigitalData.Modules.Base
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Messaging.Mail.MailSession
Imports Limilabs.Client.IMAP
Imports Microsoft.Identity.Client Imports Microsoft.Identity.Client
Namespace Mail Public Class OAuth2
Public Class OAuth2 Inherits BaseClass
Inherits BaseClass
Private ReadOnly _tenantId As String Private ReadOnly TenantId As String
Private ReadOnly _clientId As String Private ReadOnly ClientId As String
Private ReadOnly _clientSecret As String Private ReadOnly ClientSecret As String
Public Const O365_SERVER_IMAP As String = "outlook.office365.com" Public Const O365_SCOPE = "https://outlook.office365.com/.default"
Public Const O365_SERVER_SMTP As String = "smtp-mail.outlook.com" Public Const O365_SERVER = "outlook.office365.com"
Public Const O365_SCOPE As String = "https://outlook.office365.com/.default"
Public Const O365_AUTHORITY_PREFIX As String = "https://login.microsoftonline.com/"
Public Sub New(pLogConfig As LogConfig, tenantId As String, clientId As String, clientSecret As String) Private _AccessToken As String
MyBase.New(pLogConfig) Public ReadOnly Property AccessToken
_tenantId = tenantId Get
_clientId = clientId Return _AccessToken
_clientSecret = clientSecret End Get
End Sub End Property
Public Function GetAccessToken() As String Public Sub New(pLogConfig As LogConfig, pTenantId As String, pClientId As String, pClientSecret As String)
' input hardening and better diagnostics MyBase.New(pLogConfig)
Dim tenantId = If(_tenantId, String.Empty).Trim() TenantId = pTenantId
Dim clientId = If(_clientId, String.Empty).Trim() ClientId = pClientId
Dim clientSecret = If(_clientSecret, String.Empty).Trim() ClientSecret = pClientSecret
End Sub
If String.IsNullOrWhiteSpace(tenantId) Then Public Function GetAccessToken() As String
Logger.Error("OAuth2: tenantId is empty.") Logger.Debug("Fetching Access Token..")
Throw New ArgumentException("tenantId is empty")
End If
If String.IsNullOrWhiteSpace(clientId) Then
Logger.Error("OAuth2: clientId is empty.")
Throw New ArgumentException("clientId is empty")
End If
If String.IsNullOrWhiteSpace(clientSecret) Then
Logger.Error("OAuth2: clientSecret is empty.")
Throw New ArgumentException("clientSecret is empty")
End If
' common misconfiguration: using the Secret ID (GUID) instead of the Secret VALUE Try
Dim tmpGuid As Guid ' Create the application, which is defined in
If Guid.TryParse(clientSecret, tmpGuid) Then ' Microsoft.Identity.Client
Logger.Error("OAuth2: clientSecret looks like a GUID (likely the secret ID). Use the secret VALUE instead.") Dim oApp = ConfidentialClientApplicationBuilder.
Throw New ApplicationException("Invalid client secret: looks like Secret ID (GUID), not the secret value.") Create(ClientId).
End If WithTenantId(TenantId).
WithClientSecret(ClientSecret).
Build()
Try ' Request an access token
Dim authority = O365_AUTHORITY_PREFIX & tenantId Dim oScopes = New List(Of String) From {O365_SCOPE}
Dim oResult = oApp.
AcquireTokenForClient(oScopes).
ExecuteAsync().Result
Dim app = ConfidentialClientApplicationBuilder.Create(clientId). Logger.Debug("Access Token fetched.")
WithClientSecret(clientSecret).
WithAuthority(authority).
Build()
Dim scopes = New String() {O365_SCOPE} Return oResult.AccessToken
Dim result = app.AcquireTokenForClient(scopes).ExecuteAsync().GetAwaiter().GetResult() Catch ex As Exception
Logger.Warn("Could not request access token!")
Logger.Info("OAuth2 token acquired for tenant {0}. ExpiresOn={1:u}", tenantId, result.ExpiresOn.UtcDateTime) Logger.Error(ex)
Return result.AccessToken Return Nothing
Catch ex As MsalServiceException End Try
' richer diagnostics without depending on specific MSAL version members End Function
Logger.Error("MSAL service error. Code={0}. Message={1}", ex.ErrorCode, ex.Message) End Class
' Try to log StatusCode, ResponseBody if available (via reflection to avoid version dependency)
Try
Dim t = GetType(MsalServiceException)
Dim scProp = t.GetProperty("StatusCode")
If scProp IsNot Nothing Then
Dim sc = scProp.GetValue(ex, Nothing)
If sc IsNot Nothing Then Logger.Error("MSAL StatusCode={0}", sc)
End If
Dim rbProp = t.GetProperty("ResponseBody")
If rbProp IsNot Nothing Then
Dim rb = rbProp.GetValue(ex, Nothing)
If rb IsNot Nothing Then Logger.Error("MSAL ResponseBody={0}", rb)
End If
Dim ciProp = t.GetProperty("Claims")
If ciProp IsNot Nothing Then
Dim claims = ciProp.GetValue(ex, Nothing)
If claims IsNot Nothing AndAlso claims.ToString().Length > 0 Then Logger.Error("MSAL Claims={0}", claims)
End If
Catch
' ignore reflection diagnostics failures
End Try
Throw
Catch ex As Exception
Logger.Error(ex)
Throw
End Try
End Function
End Class
End Namespace

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
@@ -48,7 +48,8 @@
<HintPath>..\packages\DigitalData.Modules.Logging.2.6.5\lib\net462\DigitalData.Modules.Logging.dll</HintPath> <HintPath>..\packages\DigitalData.Modules.Logging.2.6.5\lib\net462\DigitalData.Modules.Logging.dll</HintPath>
</Reference> </Reference>
<Reference Include="Mail"> <Reference Include="Mail">
<HintPath>M:\Bibliotheken\3rdParty\Limilabs\Mail.dll</HintPath> <HintPath>P:\Visual Studio Projekte\Bibliotheken\Limilabs\Mail.dll\Mail.dll</HintPath>
<EmbedInteropTypes>False</EmbedInteropTypes>
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Identity.Client, Version=4.55.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae, processorArchitecture=MSIL"> <Reference Include="Microsoft.Identity.Client, Version=4.55.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae, processorArchitecture=MSIL">

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.2.0.0")> <Assembly: AssemblyVersion("1.9.8.0")>
<Assembly: AssemblyFileVersion("2.2.0.0")> <Assembly: AssemblyFileVersion("1.9.8.0")>

View File

@@ -15,7 +15,7 @@ Option Explicit On
Namespace My Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0"), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase Inherits Global.System.Configuration.ApplicationSettingsBase

View File

@@ -1,152 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{6EA0C51F-C2B1-4462-8198-3DE0B32B74F8}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>DigitalData.Modules.Base</RootNamespace>
<AssemblyName>DigitalData.Modules.Base</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>Windows</MyType>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>DigitalData.Modules.Base.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>DigitalData.Modules.Base.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup>
<Reference Include="DigitalData.Modules.Logging">
<HintPath>..\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Diagnostics" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup>
<Compile Include="Base\BaseClass.vb" />
<Compile Include="Base\BaseUtils.vb" />
<Compile Include="ECM\ECM.vb" />
<Compile Include="Encryption\Compression.vb" />
<Compile Include="Encryption\Encryption.vb" />
<Compile Include="Encryption\EncryptionLegacy.vb" />
<Compile Include="DatabaseEx.vb" />
<Compile Include="FilesystemEx.vb" />
<Compile Include="FileWatcher\FileWatcher.vb" />
<Compile Include="FileWatcher\FileWatcherFilters.vb" />
<Compile Include="FileWatcher\FileWatcherProperties.vb" />
<Compile Include="IDB\Constants.vb" />
<Compile Include="MimeEx.vb" />
<Compile Include="StringFunctions.vb" />
<Compile Include="WindowsEx.vb" />
<Compile Include="ModuleExtensions.vb" />
<Compile Include="FileEx.vb" />
<Compile Include="NativeMethods.vb" />
<Compile Include="ObjectEx.vb" />
<Compile Include="GraphicsEx.vb" />
<Compile Include="LanguageEx.vb" />
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="ScreenEx.vb" />
<Compile Include="StringEx.vb" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
</None>
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Content Include="README.txt" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>
</PropertyGroup>
</Project>

View File

@@ -1,163 +0,0 @@
<!DOCTYPE html>
<!-- saved from url=(0014)about:internet -->
<html xmlns:msxsl="urn:schemas-microsoft-com:xslt"><head><meta content="en-us" http-equiv="Content-Language" /><meta content="text/html; charset=utf-16" http-equiv="Content-Type" /><title _locID="NuGetUpgradeReportTitle">
NuGetMigrationLog
</title><style>
/* Body style, for the entire document */
body
{
background: #F3F3F4;
color: #1E1E1F;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
font-size: 12pt;
padding: 0;
margin: 0;
}
/* Header1 style, used for the main title */
h1
{
padding: 10px 0px 10px 10px;
font-size: 21pt;
background-color: #E2E2E2;
border-bottom: 1px #C1C1C2 solid;
color: #201F20;
margin: 0;
font-weight: normal;
}
/* Header2 style, used for "Overview" and other sections */
h2
{
font-size: 18pt;
font-weight: normal;
padding: 15px 0 5px 0;
margin: 0;
}
/* Header3 style, used for sub-sections, such as project name */
h3
{
font-weight: normal;
font-size: 15pt;
margin: 0;
padding: 15px 0 5px 0;
background-color: transparent;
}
.info-text
{
margin: 0px 0 0.75em 0;
}
/* Color all hyperlinks one color */
a
{
color: #1382CE;
}
/* Table styles */
table
{
border-spacing: 0 0;
border-collapse: collapse;
font-size: 11pt;
}
table th
{
background: #E7E7E8;
text-align: left;
text-decoration: none;
font-weight: normal;
padding: 3px 6px 3px 6px;
}
table td
{
vertical-align: top;
padding: 3px 6px 5px 5px;
margin: 0px;
border: 1px solid #E7E7E8;
background: #F7F7F8;
}
/* Local link is a style for hyperlinks that link to file:/// content, there are lots so color them as 'normal' text until the user mouse overs */
.localLink
{
color: #1E1E1F;
background: #EEEEED;
text-decoration: none;
}
.localLink:hover
{
color: #1382CE;
background: #FFFF99;
text-decoration: none;
}
.issueCell
{
width: 100%;
}
.packageIssue
{
margin-left: 25px;
}
/* Padding around the content after the h1 */
#content
{
padding: 0px 20px 20px 20px;
}
.issues table
{
width: 97%;
}
/* All Icons */
.IconSuccessEncoded, .IconInfoEncoded, .IconWarningEncoded, .IconErrorEncoded
{
min-width:18px;
min-height:18px;
background-repeat:no-repeat;
background-position:center;
}
.IconSuccessEncoded
{
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABcElEQVR4Xq2TsUsCURzHv15g8ZJcBWlyiYYgCIWcb9DFRRwMW5TA2c0/QEFwFkxxUQdxVlBwCYWOi6IhWgQhBLHJUCkhLr/BW8S7gvrAg+N+v8/v+x68Z8MGy+XSCyABQAXgBgHGALoASkIIDWSLeLBetdHryMjd5IxQPWT4rn1c/P7+xxp72Cs9m5SZ0Bq2vPnbPFafK2zDvmNHypdC0BPkLlQhxJsCAhQoZwdZU5mwxh720qGo8MzTxTTKZDPCx2HoVzp6lz0Q9tKhyx0kGs8Ny+TkWRKk8lCROwEduhyg9l/6lunOPSfmH3NUH6uQ0KHLAe7JYvJjevm+DAMGJHToKtigE+vwvIidxLamb8IBY9e+C5LiXREkfho3TSd06HJA13/oh6T51MTsfQbHrsMynQ5dDihFjiK8JJAU9AKIWTp76dCVN7HWHrajmUEGvyF9nkbAE6gLIS7kTUyuf2gscLoJrElZo/Mvj+nPz/kLTmfnEwP3tB0AAAAASUVORK5CYII=);
}
.IconInfoEncoded
{
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABHElEQVR4Xs2TsUoDQRRF7wwoziokjZUKadInhdhukR9YP8DMX1hYW+QvdsXa/QHBbcXC7W0CamWTQnclFutceIQJwwaWNLlwm5k5d94M76mmaeCrrmsLYOocY12FcxZFUeozCqKqqgYA8uevv1H6VuPxcwlfk5N92KHBxfFeCSAxxswlYAW/Xr989x/mv9gkhtyMDhcAxgzRsp7flj8B/HF1RsMXq+NZMkopaHe7lbKxQUEIGbKsYNoGn969060hZBkQex/W8oRQwsQaW2o3Ago2SVcJUzAgY3N0lTCZZm+zPS8HB51gMmS1DEYyOz9acKO1D8JWTlafKIMxdhvlfdyT94Vv5h7P8Ky7nQzACmhvKq3zk3PjW9asz9D/1oigecsioooAAAAASUVORK5CYII=);
}
.IconWarningEncoded
{
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAx0lEQVR4XpWSMQ7CMAxFf4xAyBMLCxMrO8dhaBcuwdCJS3RJBw7SA/QGTCxdWJgiQYWKXJWKIXHIlyw5lqr34tQgEOdcBsCOx5yZK3hCCKdYXneQkh4pEfqzLfu+wVDSyyzFoJjfz9NB+pAF+eizx2Vruts0k15mPgvS6GYvpVtQhB61IB/dk6AF6fS4Ben0uIX5odtFe8Q/eW1KvFeH4e8khT6+gm5B+t3juyDt7n0jpe+CANTd+oTUjN/U3yVaABnSUjFz/gFq44JaVSCXeQAAAABJRU5ErkJggg==);
}
.IconErrorEncoded
{
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABQElEQVR4XqWTvUoEQRCE6wYPZUA80AfwAQz23uCMjA7MDRQEIzPBVEyNTQUFIw00vcQTTMzuAh/AxEQQT8HF/3G/oGGnEUGuoNnd6qoZuqltyKEsyzVJq5I6rnUp6SjGeGhESikzzlc1eL7opfuVbrqbU1Zw9NCgtQMaZpY0eNnaaL2fHusvTK5vKu7sjSS1Y4y3QUA6K3e3Mau5UFDyMP7tYF9o8cAHZv68vipoIJg971PZIZ5HiwdvYGGvFVFHmGmZ2MxwmQYPXubPl9Up0tfoMQGetXd6mRbvhBw+boZ6WF7Mbv1+GsHRk0fQmPAH1GfmZirbCfDJ61tw3Px8/8pZsPAG4jlVhcPgZ7adwNWBB68lkRQWFiTgFlbnLY3DGGM7izIJIyT/jjIvEJw6fdJTc6krDzh6aMwMP9bvDH4ADSsa9uSWVJkAAAAASUVORK5CYII=);
}
</style></head><body><h1>
NuGet Migration Report - Base</h1><div id="content"><h2 _locID="OverviewTitle">Overview</h2><div class="info-text">Migration to PackageReference was completed successfully. Please build and run your solution to verify that all packages are available.</div><div class="info-text">
If you run into any problems, have feedback, questions, or concerns, please
<a href="https://github.com/NuGet/Home/issues/">file an issue on the NuGet GitHub repository.</a></div><div class="info-text">
Changed files and this report have been backed up here:
<a href="E:\SchreiberM\Visual Studio\GIT\2_DLL Projekte\DDModules\MigrationBackup\56f77a37\Base">E:\SchreiberM\Visual Studio\GIT\2_DLL Projekte\DDModules\MigrationBackup\56f77a37\Base</a></div><div class="info-text"><a href="https://aka.ms/nuget-pc2pr-migrator-rollback">Help me rollback to packages.config</a></div><h2 _locID="PackagesTitle">Packages processed</h2><h3 _locID="IncludePackagesTitle">Top-level dependencies:</h3><div class="issues"><table><tr><th class="issueCell">Package Id</th><th>Version</th></tr><tr><td class="issueCell"><span>NLog</span></td><td><span>
v5.0.5</span></td></tr><tr><td class="issueCell"><span>NuGet.CommandLine</span></td><td><span>
v6.13.2</span></td></tr></table></div><p /><h3 _locID="IncludePackagesTitle">Transitive dependencies:</h3><div class="issues"><table><tr><th class="issueCell">Package Id</th><th>Version</th></tr><tr><td class="issueCell">
No transitive dependencies found.
</td><td /></tr></table></div><h2 _locID="IssuesTitle">Package compatibility issues</h2><div class="issues"><table><tr><th /><th class="issueCell" _locID="DescriptionTableHeader">Description</th></tr><tr><td class="IconInfoEncoded" /><td class="issueCell">
No issues were found.
</td></tr></table></div></div></body></html>

View File

@@ -16,14 +16,13 @@ EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Interfaces", "Interfaces\Interfaces.vbproj", "{AB6F09BF-E794-4F6A-94BB-C97C0BA84D64}" Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Interfaces", "Interfaces\Interfaces.vbproj", "{AB6F09BF-E794-4F6A-94BB-C97C0BA84D64}"
EndProject EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Jobs", "Jobs\Jobs.vbproj", "{39EC839A-3C30-4922-A41E-6B09D1DDE5C3}" Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Jobs", "Jobs\Jobs.vbproj", "{39EC839A-3C30-4922-A41E-6B09D1DDE5C3}"
ProjectSection(ProjectDependencies) = postProject
{AB6F09BF-E794-4F6A-94BB-C97C0BA84D64} = {AB6F09BF-E794-4F6A-94BB-C97C0BA84D64}
EndProjectSection
EndProject EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "License", "License\License.vbproj", "{5EBACBFA-F11A-4BBF-8D02-91461F2293ED}" Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "License", "License\License.vbproj", "{5EBACBFA-F11A-4BBF-8D02-91461F2293ED}"
EndProject EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Logging", "Logging\Logging.vbproj", "{903B2D7D-3B80-4BE9-8713-7447B704E1B0}" Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Logging", "Logging\Logging.vbproj", "{903B2D7D-3B80-4BE9-8713-7447B704E1B0}"
EndProject EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Logging.Test", "Logging.Test\Logging.Test.vbproj", "{3207D8E7-36E3-4714-9B03-7B5B3D6D351A}"
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Patterns", "Patterns\Patterns.vbproj", "{7C3B0C7E-59FE-4E1A-A655-27AE119F9444}" Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Patterns", "Patterns\Patterns.vbproj", "{7C3B0C7E-59FE-4E1A-A655-27AE119F9444}"
EndProject EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Windows", "Windows\Windows.vbproj", "{5EFAEF9B-90B9-4F05-9F70-F79AD77FFF86}" Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Windows", "Windows\Windows.vbproj", "{5EFAEF9B-90B9-4F05-9F70-F79AD77FFF86}"
@@ -38,8 +37,6 @@ Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Database.Test", "Database.T
EndProject EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Filesystem", "Filesystem\Filesystem.vbproj", "{991D0231-4623-496D-8BD0-9CA906029CBC}" Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Filesystem", "Filesystem\Filesystem.vbproj", "{991D0231-4623-496D-8BD0-9CA906029CBC}"
EndProject EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EDMIService", "..\DDMonorepo\Service.EDMIService\EDMIService.vbproj", "{A8C3F298-76AB-4359-AB3C-986E313B4336}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@@ -47,45 +44,63 @@ Global
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6EA0C51F-C2B1-4462-8198-3DE0B32B74F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6EA0C51F-C2B1-4462-8198-3DE0B32B74F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6EA0C51F-C2B1-4462-8198-3DE0B32B74F8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6EA0C51F-C2B1-4462-8198-3DE0B32B74F8}.Release|Any CPU.ActiveCfg = Release|Any CPU {6EA0C51F-C2B1-4462-8198-3DE0B32B74F8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6EA0C51F-C2B1-4462-8198-3DE0B32B74F8}.Release|Any CPU.Build.0 = Release|Any CPU {6EA0C51F-C2B1-4462-8198-3DE0B32B74F8}.Release|Any CPU.Build.0 = Release|Any CPU
{44982F9B-6116-44E2-85D0-F39650B1EF99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {44982F9B-6116-44E2-85D0-F39650B1EF99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{44982F9B-6116-44E2-85D0-F39650B1EF99}.Debug|Any CPU.Build.0 = Debug|Any CPU
{44982F9B-6116-44E2-85D0-F39650B1EF99}.Release|Any CPU.ActiveCfg = Release|Any CPU {44982F9B-6116-44E2-85D0-F39650B1EF99}.Release|Any CPU.ActiveCfg = Release|Any CPU
{44982F9B-6116-44E2-85D0-F39650B1EF99}.Release|Any CPU.Build.0 = Release|Any CPU {44982F9B-6116-44E2-85D0-F39650B1EF99}.Release|Any CPU.Build.0 = Release|Any CPU
{EAF0EA75-5FA7-485D-89C7-B2D843B03A96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EAF0EA75-5FA7-485D-89C7-B2D843B03A96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EAF0EA75-5FA7-485D-89C7-B2D843B03A96}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EAF0EA75-5FA7-485D-89C7-B2D843B03A96}.Release|Any CPU.ActiveCfg = Release|Any CPU {EAF0EA75-5FA7-485D-89C7-B2D843B03A96}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EAF0EA75-5FA7-485D-89C7-B2D843B03A96}.Release|Any CPU.Build.0 = Release|Any CPU {EAF0EA75-5FA7-485D-89C7-B2D843B03A96}.Release|Any CPU.Build.0 = Release|Any CPU
{25017513-0D97-49D3-98D7-BA76D9B251B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {25017513-0D97-49D3-98D7-BA76D9B251B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{25017513-0D97-49D3-98D7-BA76D9B251B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{25017513-0D97-49D3-98D7-BA76D9B251B0}.Release|Any CPU.ActiveCfg = Release|Any CPU {25017513-0D97-49D3-98D7-BA76D9B251B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{25017513-0D97-49D3-98D7-BA76D9B251B0}.Release|Any CPU.Build.0 = Release|Any CPU {25017513-0D97-49D3-98D7-BA76D9B251B0}.Release|Any CPU.Build.0 = Release|Any CPU
{8A8F20FC-C46E-41AC-BEE7-218366CFFF99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8A8F20FC-C46E-41AC-BEE7-218366CFFF99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8A8F20FC-C46E-41AC-BEE7-218366CFFF99}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8A8F20FC-C46E-41AC-BEE7-218366CFFF99}.Release|Any CPU.ActiveCfg = Release|Any CPU {8A8F20FC-C46E-41AC-BEE7-218366CFFF99}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8A8F20FC-C46E-41AC-BEE7-218366CFFF99}.Release|Any CPU.Build.0 = Release|Any CPU {8A8F20FC-C46E-41AC-BEE7-218366CFFF99}.Release|Any CPU.Build.0 = Release|Any CPU
{AB6F09BF-E794-4F6A-94BB-C97C0BA84D64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AB6F09BF-E794-4F6A-94BB-C97C0BA84D64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AB6F09BF-E794-4F6A-94BB-C97C0BA84D64}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AB6F09BF-E794-4F6A-94BB-C97C0BA84D64}.Release|Any CPU.ActiveCfg = Release|Any CPU {AB6F09BF-E794-4F6A-94BB-C97C0BA84D64}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AB6F09BF-E794-4F6A-94BB-C97C0BA84D64}.Release|Any CPU.Build.0 = Release|Any CPU {AB6F09BF-E794-4F6A-94BB-C97C0BA84D64}.Release|Any CPU.Build.0 = Release|Any CPU
{39EC839A-3C30-4922-A41E-6B09D1DDE5C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {39EC839A-3C30-4922-A41E-6B09D1DDE5C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{39EC839A-3C30-4922-A41E-6B09D1DDE5C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{39EC839A-3C30-4922-A41E-6B09D1DDE5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {39EC839A-3C30-4922-A41E-6B09D1DDE5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{39EC839A-3C30-4922-A41E-6B09D1DDE5C3}.Release|Any CPU.Build.0 = Release|Any CPU {39EC839A-3C30-4922-A41E-6B09D1DDE5C3}.Release|Any CPU.Build.0 = Release|Any CPU
{5EBACBFA-F11A-4BBF-8D02-91461F2293ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EBACBFA-F11A-4BBF-8D02-91461F2293ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5EBACBFA-F11A-4BBF-8D02-91461F2293ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5EBACBFA-F11A-4BBF-8D02-91461F2293ED}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EBACBFA-F11A-4BBF-8D02-91461F2293ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5EBACBFA-F11A-4BBF-8D02-91461F2293ED}.Release|Any CPU.Build.0 = Release|Any CPU {5EBACBFA-F11A-4BBF-8D02-91461F2293ED}.Release|Any CPU.Build.0 = Release|Any CPU
{903B2D7D-3B80-4BE9-8713-7447B704E1B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {903B2D7D-3B80-4BE9-8713-7447B704E1B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{903B2D7D-3B80-4BE9-8713-7447B704E1B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{903B2D7D-3B80-4BE9-8713-7447B704E1B0}.Release|Any CPU.ActiveCfg = Release|Any CPU {903B2D7D-3B80-4BE9-8713-7447B704E1B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{903B2D7D-3B80-4BE9-8713-7447B704E1B0}.Release|Any CPU.Build.0 = Release|Any CPU {903B2D7D-3B80-4BE9-8713-7447B704E1B0}.Release|Any CPU.Build.0 = Release|Any CPU
{3207D8E7-36E3-4714-9B03-7B5B3D6D351A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3207D8E7-36E3-4714-9B03-7B5B3D6D351A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3207D8E7-36E3-4714-9B03-7B5B3D6D351A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3207D8E7-36E3-4714-9B03-7B5B3D6D351A}.Release|Any CPU.Build.0 = Release|Any CPU
{7C3B0C7E-59FE-4E1A-A655-27AE119F9444}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7C3B0C7E-59FE-4E1A-A655-27AE119F9444}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7C3B0C7E-59FE-4E1A-A655-27AE119F9444}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7C3B0C7E-59FE-4E1A-A655-27AE119F9444}.Release|Any CPU.ActiveCfg = Release|Any CPU {7C3B0C7E-59FE-4E1A-A655-27AE119F9444}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7C3B0C7E-59FE-4E1A-A655-27AE119F9444}.Release|Any CPU.Build.0 = Release|Any CPU {7C3B0C7E-59FE-4E1A-A655-27AE119F9444}.Release|Any CPU.Build.0 = Release|Any CPU
{5EFAEF9B-90B9-4F05-9F70-F79AD77FFF86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EFAEF9B-90B9-4F05-9F70-F79AD77FFF86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5EFAEF9B-90B9-4F05-9F70-F79AD77FFF86}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5EFAEF9B-90B9-4F05-9F70-F79AD77FFF86}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EFAEF9B-90B9-4F05-9F70-F79AD77FFF86}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5EFAEF9B-90B9-4F05-9F70-F79AD77FFF86}.Release|Any CPU.Build.0 = Release|Any CPU {5EFAEF9B-90B9-4F05-9F70-F79AD77FFF86}.Release|Any CPU.Build.0 = Release|Any CPU
{4C86DF8F-A280-40D4-85B0-10B1BF66C15C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4C86DF8F-A280-40D4-85B0-10B1BF66C15C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4C86DF8F-A280-40D4-85B0-10B1BF66C15C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4C86DF8F-A280-40D4-85B0-10B1BF66C15C}.Release|Any CPU.ActiveCfg = Release|Any CPU {4C86DF8F-A280-40D4-85B0-10B1BF66C15C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4C86DF8F-A280-40D4-85B0-10B1BF66C15C}.Release|Any CPU.Build.0 = Release|Any CPU {4C86DF8F-A280-40D4-85B0-10B1BF66C15C}.Release|Any CPU.Build.0 = Release|Any CPU
{81CAC44F-3711-4C8F-AE98-E02A7448782A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {81CAC44F-3711-4C8F-AE98-E02A7448782A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{81CAC44F-3711-4C8F-AE98-E02A7448782A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{81CAC44F-3711-4C8F-AE98-E02A7448782A}.Release|Any CPU.ActiveCfg = Release|Any CPU {81CAC44F-3711-4C8F-AE98-E02A7448782A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{81CAC44F-3711-4C8F-AE98-E02A7448782A}.Release|Any CPU.Build.0 = Release|Any CPU {81CAC44F-3711-4C8F-AE98-E02A7448782A}.Release|Any CPU.Build.0 = Release|Any CPU
{AF664D85-0A4B-4BAB-A2F8-83110C06553A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AF664D85-0A4B-4BAB-A2F8-83110C06553A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AF664D85-0A4B-4BAB-A2F8-83110C06553A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AF664D85-0A4B-4BAB-A2F8-83110C06553A}.Release|Any CPU.ActiveCfg = Release|Any CPU {AF664D85-0A4B-4BAB-A2F8-83110C06553A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AF664D85-0A4B-4BAB-A2F8-83110C06553A}.Release|Any CPU.Build.0 = Release|Any CPU {AF664D85-0A4B-4BAB-A2F8-83110C06553A}.Release|Any CPU.Build.0 = Release|Any CPU
{91B4DFC0-543C-43A7-A9E0-6817DCA277EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {91B4DFC0-543C-43A7-A9E0-6817DCA277EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
@@ -96,9 +111,6 @@ Global
{991D0231-4623-496D-8BD0-9CA906029CBC}.Debug|Any CPU.Build.0 = Debug|Any CPU {991D0231-4623-496D-8BD0-9CA906029CBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{991D0231-4623-496D-8BD0-9CA906029CBC}.Release|Any CPU.ActiveCfg = Release|Any CPU {991D0231-4623-496D-8BD0-9CA906029CBC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{991D0231-4623-496D-8BD0-9CA906029CBC}.Release|Any CPU.Build.0 = Release|Any CPU {991D0231-4623-496D-8BD0-9CA906029CBC}.Release|Any CPU.Build.0 = Release|Any CPU
{A8C3F298-76AB-4359-AB3C-986E313B4336}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A8C3F298-76AB-4359-AB3C-986E313B4336}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A8C3F298-76AB-4359-AB3C-986E313B4336}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.4.0.0")> <Assembly: AssemblyVersion("1.3.1.0")>
<Assembly: AssemblyFileVersion("1.4.0.0")> <Assembly: AssemblyFileVersion("1.3.1.0")>

View File

@@ -20,7 +20,6 @@ Public Class ClassPatterns
' Complex patterns that rely on a datasource like a Database or Windream ' Complex patterns that rely on a datasource like a Database or Windream
Public Const PATTERN_WMI = "WMI" Public Const PATTERN_WMI = "WMI"
Public Const PATTERN_CTRL = "CTRL" Public Const PATTERN_CTRL = "CTRL"
Public Const PATTERN_TBCOL = "TBCOL"
' Simple patterns that only rely on .NET functions ' Simple patterns that only rely on .NET functions
Public Const PATTERN_INT = "INT" Public Const PATTERN_INT = "INT"
' Simple patterns that rely on Data from the TBDD_USER table ' Simple patterns that rely on Data from the TBDD_USER table
@@ -64,8 +63,8 @@ Public Class ClassPatterns
Private ReadOnly _LogConfig As LogConfig Private ReadOnly _LogConfig As LogConfig
Private ReadOnly _Regex As Regex = New Regex("{#(\w+)#([\w\s_-]+)}+") Private ReadOnly _Regex As Regex = New Regex("{#(\w+)#([\w\s_-]+)}+")
Private ReadOnly _AllPatterns As New List(Of String) From {PATTERN_WMI, PATTERN_CTRL, PATTERN_TBCOL, PATTERN_USER, PATTERN_INT, PATTERN_WMDOCID, PATTERN_IDBOBJID} Private ReadOnly _AllPatterns As New List(Of String) From {PATTERN_WMI, PATTERN_CTRL, PATTERN_USER, PATTERN_INT, PATTERN_WMDOCID, PATTERN_IDBOBJID}
Private ReadOnly _ComplexPatterns As New List(Of String) From {PATTERN_WMI, PATTERN_CTRL, PATTERN_TBCOL} Private ReadOnly _ComplexPatterns As New List(Of String) From {PATTERN_WMI, PATTERN_CTRL}
Private ReadOnly _SimplePatterns As New List(Of String) From {PATTERN_USER, PATTERN_INT} Private ReadOnly _SimplePatterns As New List(Of String) From {PATTERN_USER, PATTERN_INT}
''' <summary> ''' <summary>

View File

@@ -44,13 +44,11 @@
<OptionInfer>On</OptionInfer> <OptionInfer>On</OptionInfer>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="DevExpress.Drawing.v25.2, Version=25.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <Reference Include="DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Printing.v25.2.Core, Version=25.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <Reference Include="DevExpress.Data.Desktop.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Data.v25.2, Version=25.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <Reference Include="DevExpress.Utils.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Data.Desktop.v25.2, Version=25.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <Reference Include="DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Utils.v25.2, Version=25.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <Reference Include="DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.XtraEditors.v25.2, Version=25.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.XtraGrid.v25.2, Version=25.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DigitalData.Controls.LookupGrid, Version=3.3.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="DigitalData.Controls.LookupGrid, Version=3.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDMonorepo\Controls.LookupGrid\bin\Debug\DigitalData.Controls.LookupGrid.dll</HintPath> <HintPath>..\..\DDMonorepo\Controls.LookupGrid\bin\Debug\DigitalData.Controls.LookupGrid.dll</HintPath>
@@ -59,7 +57,7 @@
<HintPath>..\packages\DigitalData.Modules.Logging.2.6.5\lib\net462\DigitalData.Modules.Logging.dll</HintPath> <HintPath>..\packages\DigitalData.Modules.Logging.2.6.5\lib\net462\DigitalData.Modules.Logging.dll</HintPath>
</Reference> </Reference>
<Reference Include="Interop.WINDREAMLib"> <Reference Include="Interop.WINDREAMLib">
<HintPath>M:\Bibliotheken\3rdParty\windream\Interop.WINDREAMLib.dll</HintPath> <HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WINDREAMLib.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes> <EmbedInteropTypes>True</EmbedInteropTypes>
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
@@ -157,8 +155,4 @@
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent> <PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<Analyzer Include="D:\ProgramFiles\DevExpress 25.2\Components\Offline Packages\devexpress.data\25.2.3\analyzers\dotnet\DevExpress.Generator.dll" Visible="false" Condition="Exists('D:\ProgramFiles\DevExpress 25.2\Components\Offline Packages\devexpress.data\25.2.3\analyzers\dotnet\DevExpress.Generator.dll')" />
</ItemGroup>
</Project> </Project>

View File

@@ -1,164 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{7C3B0C7E-59FE-4E1A-A655-27AE119F9444}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>DigitalData.Modules.Patterns</RootNamespace>
<AssemblyName>DigitalData.Modules.Patterns</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>Windows</MyType>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>DigitalData.Modules.Patterns.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>DigitalData.Modules.Patterns.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup>
<Reference Include="DevExpress.Drawing.v26.1, Version=26.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Printing.v26.1.Core, Version=26.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Data.v26.1, Version=26.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Data.Desktop.v26.1, Version=26.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Utils.v26.1, Version=26.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.XtraEditors.v26.1, Version=26.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.XtraGrid.v26.1, Version=26.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DigitalData.Controls.LookupGrid, Version=3.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDMonorepo\Controls.LookupGrid\bin\Debug\DigitalData.Controls.LookupGrid.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DigitalData.Modules.Logging.2.6.5\lib\net462\DigitalData.Modules.Logging.dll</HintPath>
</Reference>
<Reference Include="Interop.WINDREAMLib">
<HintPath>M:\Bibliotheken\3rdParty\windream\Interop.WINDREAMLib.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Diagnostics" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup>
<Compile Include="Constants.vb" />
<Compile Include="Modules\FileInformation.vb" />
<Compile Include="Modules\Globix\GlobixAutomatic.vb" />
<Compile Include="Modules\IDB.vb" />
<Compile Include="Modules\Globix\GlobixManual.vb" />
<Compile Include="Modules\Custom.vb" />
<Compile Include="Modules\Windream.vb" />
<Compile Include="Modules\User.vb" />
<Compile Include="IModule.vb" />
<Compile Include="Modules\Clipboard.vb" />
<Compile Include="Modules\Controls.vb" />
<Compile Include="Modules\Internal.vb" />
<Compile Include="Modules\BaseModule.vb" />
<Compile Include="Pattern.vb" />
<Compile Include="Patterns.vb" />
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="Patterns2.vb" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
</None>
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ZooFlow\ZooFlow.vbproj">
<Project>{81cac44f-3711-4c8f-ae98-e02a7448782a}</Project>
<Name>ZooFlow</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>
</PropertyGroup>
<ItemGroup>
<Analyzer Include="D:\ProgramFiles\DevExpress 26.1\Components\Offline Packages\devexpress.data\26.1.5\analyzers\dotnet\DevExpress.Generator.dll" Visible="false" Condition="Exists('D:\ProgramFiles\DevExpress 26.1\Components\Offline Packages\devexpress.data\26.1.5\analyzers\dotnet\DevExpress.Generator.dll')" />
</ItemGroup>
</Project>

View File

@@ -6,38 +6,6 @@
<assemblyIdentity name="FirebirdSql.Data.FirebirdClient" publicKeyToken="3750abcc3150b00c" culture="neutral" /> <assemblyIdentity name="FirebirdSql.Data.FirebirdClient" publicKeyToken="3750abcc3150b00c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.5.0.0" newVersion="7.5.0.0" /> <bindingRedirect oldVersion="0.0.0.0-7.5.0.0" newVersion="7.5.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.3" newVersion="4.1.1.3" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.1" newVersion="6.0.0.1" />
</dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /></startup></configuration> <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /></startup></configuration>

View File

@@ -44,18 +44,13 @@
<OptionInfer>On</OptionInfer> <OptionInfer>On</OptionInfer>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.CSharp" /> <Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Microsoft.Office.Interop.Outlook"> <HintPath>..\packages\DigitalData.Modules.Logging.2.6.5\lib\net462\DigitalData.Modules.Logging.dll</HintPath>
<HintPath>M:\Bibliotheken\3rdParty\Office\Microsoft.Office.Interop.Outlook.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath> <HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="OFFICE">
<HintPath>M:\Bibliotheken\3rdParty\Office\OFFICE.DLL</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="PresentationCore" /> <Reference Include="PresentationCore" />
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
@@ -146,12 +141,26 @@
<Project>{6ea0c51f-c2b1-4462-8198-3de0b32b74f8}</Project> <Project>{6ea0c51f-c2b1-4462-8198-3de0b32b74f8}</Project>
<Name>Base</Name> <Name>Base</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\Logging\Logging.vbproj">
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
<Name>Logging</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<COMReference Include="Microsoft.Office.Core">
<Guid>{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}</Guid>
<VersionMajor>2</VersionMajor>
<VersionMinor>8</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
<COMReference Include="Microsoft.Office.Interop.Outlook">
<Guid>{00062FFF-0000-0000-C000-000000000046}</Guid>
<VersionMajor>9</VersionMajor>
<VersionMinor>6</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
<COMReference Include="stdole"> <COMReference Include="stdole">
<Guid>{00020430-0000-0000-C000-000000000046}</Guid> <Guid>{00020430-0000-0000-C000-000000000046}</Guid>
<VersionMajor>2</VersionMajor> <VersionMajor>2</VersionMajor>

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.0.0.0")> <Assembly: AssemblyVersion("1.9.7.0")>
<Assembly: AssemblyFileVersion("2.0.0.0")> <Assembly: AssemblyFileVersion("1.9.7.0")>

View File

@@ -182,18 +182,7 @@ Public Class Windream
_sessionPassword = SessionPassword _sessionPassword = SessionPassword
_sessionDomain = SessionDomain _sessionDomain = SessionDomain
End Sub End Sub
Public Sub Disconnect()
Try
If Session IsNot Nothing AndAlso Session.aLoggedin Then
Session.Logout()
_logger.Info("Session successfully logged out.")
Else
_logger.Info("No active session to log out.")
End If
Catch ex As Exception
_logger.Error(ex, "Error while logging out session")
End Try
End Sub
Public Function GetCleanedPath(Path As String) As String Public Function GetCleanedPath(Path As String) As String
Return Regex.Replace(Path, Constants.REGEX_CLEAN_FILENAME, String.Empty) Return Regex.Replace(Path, Constants.REGEX_CLEAN_FILENAME, String.Empty)
End Function End Function
@@ -1244,7 +1233,7 @@ Public Class Windream
Dim oWMObject As IWMObject6 = GetFileByPath(Path) Dim oWMObject As IWMObject6 = GetFileByPath(Path)
If LockObject(oWMObject, WMObjectEditModeIndexEdit) = False Then If LockObject(oWMObject, WMObjectEditModeIndexEdit) = False Then
_logger.Warn("File {0} could not be locked", Path) _logger.Warn("File {0} could not be locked")
Return False Return False
End If End If
@@ -1254,26 +1243,22 @@ Public Class Windream
Try Try
Dim oType As Integer = GetIndexType(pIndexName) Dim oType As Integer = GetIndexType(pIndexName)
If Not IsNothing(oType) Then
Dim oConvertedValue As Object = Helpers.ConvertIndexValue(oType, pStringValue)
' IsNothing() schlägt bei Integer (Werttyp) nie an – stattdessen auf Undefined (0) prüfen oWMObject.SetVariableValue(pIndexName, oConvertedValue)
If oType = WMObjectVariableValueTypeUndefined Then oWMObject.Save()
_logger.Warn("Index '{0}' not found or has undefined type – SetFileIndex aborted for file '{1}'", pIndexName, Path)
UnlockObject(oWMObject) If UnlockObject(oWMObject) = False Then
_logger.Warn("File {0} could not be unlocked", Path)
End If
Return True
Else
Return False Return False
End If End If
Dim oConvertedValue As Object = Helpers.ConvertIndexValue(oType, pStringValue)
oWMObject.SetVariableValue(pIndexName, oConvertedValue)
oWMObject.Save()
If UnlockObject(oWMObject) = False Then
_logger.Warn("File {0} could not be unlocked", Path)
End If
Return True
Catch ex As Exception Catch ex As Exception
_logger.Warn("Could not set value '{0}' for index '{1}' on file '{2}'", pStringValue, pIndexName, Path)
_logger.Error(ex) _logger.Error(ex)
UnlockObject(oWMObject) UnlockObject(oWMObject)
Return False Return False
@@ -1289,7 +1274,6 @@ Public Class Windream
_logger.Warn("File '{0}' does not exist", pPath) _logger.Warn("File '{0}' does not exist", pPath)
Return False Return False
End If End If
Dim oWMObject As IWMObject6 Dim oWMObject As IWMObject6
Try Try
@@ -1300,10 +1284,9 @@ Public Class Windream
_logger.Warn(ex.Message) _logger.Warn(ex.Message)
Return False Return False
End Try End Try
'Lock WMObject for changes 'Lock WMObject for changes
If LockObject(oWMObject, WMObjectEditModeIndexEdit) = False Then If LockObject(oWMObject, WMObjectEditModeIndexEdit) = False Then
_logger.Warn("File '{0}' could not be locked", pPath) _logger.Warn("File {0} could not be locked")
Return False Return False
End If End If
@@ -1313,18 +1296,9 @@ Public Class Windream
Try Try
Dim oType As Integer = GetIndexType(pIndexName) Dim oType As Integer = GetIndexType(pIndexName)
Dim oConvertedValues As New List(Of String)
' Gleicher Bug wie in SetFileIndex: Integer-Werttyp – IsNothing() greift nie
' Stattdessen auf Undefined (0) prüfen
If oType = WMObjectVariableValueTypeUndefined Then
_logger.Warn("Index '{0}' not found or has undefined type – SetFileIndexLoS aborted for file '{1}'", pIndexName, pPath)
UnlockObject(oWMObject)
Return False
End If
_logger.Debug("SetFileIndexLoS '{0}' - Indextype: {1} - Values.Count: {2} ... ", pIndexName, oType, pAttributeValues.Count)
Dim oArray As Object Dim oArray As Object
_logger.Debug("SetFileIndexLoS '{0}' - Indextype: {1} - Values.Count: {2} ... ", pIndexName, oType, pAttributeValues.Count)
ReDim oArray(pAttributeValues.Count - 1) ReDim oArray(pAttributeValues.Count - 1)
For oIndex = 0 To pAttributeValues.Count - 1 For oIndex = 0 To pAttributeValues.Count - 1
@@ -1337,14 +1311,13 @@ Public Class Windream
oWMObject.Save() oWMObject.Save()
If UnlockObject(oWMObject) = False Then If UnlockObject(oWMObject) = False Then
_logger.Warn("File '{0}' could not be unlocked", pPath) _logger.Warn("File {0} could not be unlocked", pPath)
End If End If
Return True Return True
Catch ex As Exception Catch ex As Exception
_logger.Warn("Could not set value for index '{0}' on file '{1}'", pIndexName, pPath)
_logger.Error(ex) _logger.Error(ex)
UnlockObject(oWMObject)
Return False Return False
End Try End Try
End Function End Function

View File

@@ -47,24 +47,26 @@
<Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DigitalData.Modules.Logging.2.6.5\lib\net462\DigitalData.Modules.Logging.dll</HintPath> <HintPath>..\packages\DigitalData.Modules.Logging.2.6.5\lib\net462\DigitalData.Modules.Logging.dll</HintPath>
</Reference> </Reference>
<Reference Include="Interop.WINDREAMLib, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Interop.WINDREAMLib">
<SpecificVersion>False</SpecificVersion> <HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WINDREAMLib.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes> <EmbedInteropTypes>False</EmbedInteropTypes>
<HintPath>M:\Bibliotheken\3rdParty\windream\Interop.WINDREAMLib.dll</HintPath>
</Reference> </Reference>
<Reference Include="Interop.WMCNNCTDLLLib"> <Reference Include="Interop.WMCNNCTDLLLib">
<HintPath>M:\Bibliotheken\3rdParty\windream\Interop.WMCNNCTDLLLib.dll</HintPath> <HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WMCNNCTDLLLib.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes> <EmbedInteropTypes>True</EmbedInteropTypes>
</Reference> </Reference>
<Reference Include="Interop.WMOSRCHLib"> <Reference Include="Interop.WMOSRCHLib">
<HintPath>M:\Bibliotheken\3rdParty\windream\Interop.WMOSRCHLib.dll</HintPath> <HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WMOSRCHLib.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes> <EmbedInteropTypes>True</EmbedInteropTypes>
</Reference> </Reference>
<Reference Include="Interop.WMOTOOLLib"> <Reference Include="Interop.WMOTOOLLib">
<HintPath>M:\Bibliotheken\3rdParty\windream\Interop.WMOTOOLLib.dll</HintPath> <HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WMOTOOLLib.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes> <EmbedInteropTypes>True</EmbedInteropTypes>
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
@@ -78,11 +80,6 @@
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" /> <Reference Include="System.Net.Http" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="NLog">
<Version>5.0.5</Version>
</PackageReference>
</ItemGroup>
<ItemGroup> <ItemGroup>
<Import Include="Microsoft.VisualBasic" /> <Import Include="Microsoft.VisualBasic" />
<Import Include="System" /> <Import Include="System" />

Some files were not shown because too many files have changed in this diff Show More