From 0e13c67887ed6f6330f3736fecca62f09c92a4b8 Mon Sep 17 00:00:00 2001 From: Developer01 Date: Thu, 27 Aug 2026 17:40:32 +0200 Subject: [PATCH] Entfernung von SetVariableValue und DLL-Refactoring MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Die Funktion `SetVariableValue` wurde aus `Client.vb` entfernt, da sie umfangreiche, aber nicht mehr benötigte Logik zur Attributverarbeitung enthielt. In `EDMI.API.vbproj` wurden Projektreferenzen durch DLL-Referenzen ersetzt (`DigitalData.Modules.Base`, `Config`, `Database`, `Logging`), um die Modularität zu verbessern. Die Assembly-Metadaten in `AssemblyInfo.vb` wurden aktualisiert, einschließlich Copyright (2026), Trademark (2.0.0) und Assembly-Version (2.0.0.0), um die neue Hauptversion zu reflektieren. --- EDMIAPI/Client.vb | 119 ----------------------------- EDMIAPI/EDMI.API.vbproj | 34 ++++----- EDMIAPI/My Project/AssemblyInfo.vb | 6 +- 3 files changed, 19 insertions(+), 140 deletions(-) diff --git a/EDMIAPI/Client.vb b/EDMIAPI/Client.vb index 0f0f5f5d..a6cd4227 100644 --- a/EDMIAPI/Client.vb +++ b/EDMIAPI/Client.vb @@ -331,125 +331,6 @@ Public Class Client Return Nothing End Try End Function - - ''' - ''' Sets a value to an attribute - ''' - ''' IDB ObjectId - ''' Name of the attribute - ''' - ''' - ''' - 'Public Function SetVariableValue(pObjectId As Long, pAttributeName As String, pValue As Object, Optional pOptions As Options.SetVariableValueOptions = Nothing) As Boolean - ' Try - ' ' Set default options - ' If pOptions Is Nothing Then - ' pOptions = New Options.SetVariableValueOptions() - ' End If - - ' Dim oOptions As New Options.GetVariableValueOptions With { - ' .Language = pOptions.Language, - ' .Username = pOptions.Username - ' } - - ' Try - ' Dim oResponse = Channel.TestObjectIdExists(New TestObjectIdExistsRequest With {.ObjectId = pObjectId}) - ' If oResponse.Exists = False Then - ' Return False - ' End If - - ' Catch ex As Exception - ' Logger.Error(ex) - ' Return False - ' End Try - - ' Dim oType = pValue.GetType.Name - - ' If oType = GetType(DataTable).Name Then - ' Dim oValueTable As DataTable = pValue - ' Dim oCurrentValue As VariableValue - - ' ' Get current value - ' oCurrentValue = GetVariableValue(pObjectId, pAttributeName, oOptions) - - ' ' If current value is datatable - ' If oCurrentValue.Type = GetType(DataTable) Then - - ' ' Convert value to Datatable - ' Dim oTable As DataTable = oCurrentValue.Value - - ' If oTable.Rows.Count > 1 Then - - ' 'now Checking whether the old row still remains in Vector? If not it will be deleted as it cannot be replaced in multivalues - ' For Each oRow As DataRow In oTable.Rows - ' Dim oExists As Boolean = False - ' For Each oNewValueRow As DataRow In oValueTable.Rows - ' Logger.Debug($"Checking oldValue[{oCurrentValue}] vs NewValue [{oNewValueRow.Item(1)}]") - - ' If oNewValueRow.Item(1).ToString.ToUpper = oRow.Item(0).ToString.ToUpper Then - ' oExists = True - ' Exit For - ' End If - ' Next - - ' If oExists = False Then - ' Logger.Debug($"Value [{oRow.Item(0)}] no longer existing in Vector-Attribute [{pAttributeName}] - will be deleted!") - ' DeleteTermObjectFromMetadata(pObjectId, pAttributeName, oRow.Item(0)) - ' End If - - ' Next - ' End If - ' Else - ' If oValueTable.Rows.Count > 1 Then - - ' 'now Checking whether the old row still remains in Vector? If not it will be deleted as it cannot be replaced in multivalues - ' Dim oExists As Boolean = False - ' For Each oNewValueRow As DataRow In oValueTable.Rows - ' Logger.Debug($"Checking oldValue[{oCurrentValue}] vs NewValue [{oNewValueRow.Item(1)}]") - - ' If oNewValueRow.Item(1).ToString.ToUpper = oCurrentValue.ToString.ToUpper Then - ' oExists = True - ' Exit For - ' End If - - ' Next - ' If oExists = False Then - ' Logger.Debug($"Value [{oCurrentValue}] no longer existing in Vector-Attribute [{pAttributeName}] - will be deleted!") - ' DeleteTermObjectFromMetadata(pObjectId, pAttributeName, oCurrentValue.Value) - ' End If - - ' Else - ' Logger.Debug($"Value [{oCurrentValue}] of Attribute [{pAttributeName}] obviously was updated during runtime - will be deleted!") - ' DeleteTermObjectFromMetadata(pObjectId, pAttributeName, oCurrentValue.Value) - - ' End If - - ' End If - - ' For Each oNewValueRow As DataRow In oValueTable.Rows - ' Dim oResult As Boolean = NewObjectData(pObjectId, pAttributeName, pValue, New Options.NewObjectOptions With { - ' .Language = pOptions.Language, - ' .Username = pOptions.Username - ' }) - - ' If oResult = False Then - ' Return False - ' End If - ' Next - ' Return True - ' Else - ' Return NewObjectData(pObjectId, pAttributeName, pValue, New Options.NewObjectOptions With { - ' .Language = pOptions.Language, - ' .Username = pOptions.Username - ' }) - ' End If - - ' Catch ex As Exception - ' Logger.Error(ex) - ' Return False - ' End Try - 'End Function - ''' ''' ''' diff --git a/EDMIAPI/EDMI.API.vbproj b/EDMIAPI/EDMI.API.vbproj index 262ecaaa..aa4c619a 100644 --- a/EDMIAPI/EDMI.API.vbproj +++ b/EDMIAPI/EDMI.API.vbproj @@ -44,6 +44,22 @@ On + + False + ..\Base\bin\Debug\DigitalData.Modules.Base.dll + + + False + ..\Config\bin\Debug\DigitalData.Modules.Config.dll + + + False + ..\Database\bin\Debug\DigitalData.Modules.Database.dll + + + False + ..\Logging\bin\Debug\DigitalData.Modules.Logging.dll + ..\packages\NLog.5.0.5\lib\net46\NLog.dll @@ -295,24 +311,6 @@ Reference.vb - - - {6ea0c51f-c2b1-4462-8198-3de0b32b74f8} - Base - - - {44982f9b-6116-44e2-85d0-f39650b1ef99} - Config - - - {eaf0ea75-5fa7-485d-89c7-b2d843b03a96} - Database - - - {903b2d7d-3b80-4be9-8713-7447b704e1b0} - Logging - - powershell.exe -command "& { &'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }" diff --git a/EDMIAPI/My Project/AssemblyInfo.vb b/EDMIAPI/My Project/AssemblyInfo.vb index 26e930b1..553314f0 100644 --- a/EDMIAPI/My Project/AssemblyInfo.vb +++ b/EDMIAPI/My Project/AssemblyInfo.vb @@ -12,8 +12,8 @@ Imports System.Runtime.InteropServices - - + + @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - +