Neue Features, Optimierungen und Bugfixes

- Neues Projekt `EDMI.API` zur Solution hinzugefügt.
- `App.config`: Abhängigkeiten und `bindingRedirect` aktualisiert.
- Verbesserte Thread-Sicherheit mit `ReaderWriterLockSlim`.
- SQL-Abfragen mit `WITH (NOLOCK)` für bessere Parallelität.
- Robuste Verarbeitung von `DataRow`-Werten mit `IIf(IsDBNull(...))`.
- Neue Sicherheitsprüfung für `JobListener` initialisiert.
- `SaveDataTables` optimiert, Performance-Warnungen hinzugefügt.
- Versionsnummer auf `2.5.0.0` aktualisiert, Copyright auf 2026.
- Paket `NLog` aus `packages.config` entfernt.
This commit is contained in:
Developer01
2026-08-28 12:19:34 +02:00
parent 9d5e022562
commit 0f9e7c55ec
15 changed files with 292 additions and 175 deletions

View File

@@ -1,7 +1,6 @@
Imports System.Data.SqlClient
Imports System.Runtime.Serialization
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Language
Imports DigitalData.Modules.Logging
Public Class GlobalState
@@ -13,8 +12,9 @@ Public Class GlobalState
Public Property ObjectStores As New List(Of ObjectStore)
Public Property Connections As New List(Of DatabaseConnection)
Public Property Doctypes As New List(Of Doctype)
Public Property ClientConfig As ClientConfiguration = New ClientConfiguration()
Public Property ClientConfig As New ClientConfiguration
Public Property JobListener As JobListener
Public Property TableStore As New DataSet
@@ -123,7 +123,7 @@ Public Class GlobalState
Public Sub LoadConnections()
_Logger.Info("Loading Database Connections")
Try
Dim oSQL As String = "SELECT * FROM TBDD_CONNECTION"
Dim oSQL As String = "SELECT * FROM TBDD_CONNECTION WITH (NOLOCK)"
Dim oTable As DataTable = _MSSQL_ECM.GetDatatable(oSQL)
_Logger.Info("Found [{0}] Connections", oTable.Rows.Count)
@@ -132,14 +132,14 @@ Public Class GlobalState
For Each oRow As DataRow In oTable.Rows
Dim oConnection As New DatabaseConnection() With {
.Id = oRow.ItemEx(Of Integer)("GUID"),
.Active = oRow.ItemEx(Of Boolean)("AKTIV"),
.Database = oRow.ItemEx(Of String)("DATENBANK"),
.Title = oRow.ItemEx(Of String)("BEZEICHNUNG"),
.Password = oRow.ItemEx(Of String)("PASSWORD"),
.Provider = oRow.ItemEx(Of String)("SQL_PROVIDER"),
.Server = oRow.ItemEx(Of String)("SERVER"),
.Username = oRow.ItemEx(Of String)("USERNAME")
.Id = IIf(IsDBNull(oRow.Item("GUID")), 0, oRow.Item("GUID")),
.Active = IIf(IsDBNull(oRow.Item("AKTIV")), False, oRow.Item("AKTIV")),
.Database = IIf(IsDBNull(oRow.Item("DATENBANK")), String.Empty, oRow.Item("DATENBANK")),
.Title = IIf(IsDBNull(oRow.Item("BEZEICHNUNG")), String.Empty, oRow.Item("BEZEICHNUNG")),
.Password = IIf(IsDBNull(oRow.Item("PASSWORD")), String.Empty, oRow.Item("PASSWORD")),
.Provider = IIf(IsDBNull(oRow.Item("SQL_PROVIDER")), String.Empty, oRow.Item("SQL_PROVIDER")),
.Server = IIf(IsDBNull(oRow.Item("SERVER")), String.Empty, oRow.Item("SERVER")),
.Username = IIf(IsDBNull(oRow.Item("USERNAME")), String.Empty, oRow.Item("USERNAME"))
}
_Logger.Info("New Connection [{0}]", oConnection.Title)
oConnections.Add(oConnection)