EDMIService: Turn Postprocessing Steps into list

This commit is contained in:
Jonathan Jenne
2021-12-13 10:50:09 +01:00
parent c322beb4d7
commit 957d7a3986
6 changed files with 79 additions and 27 deletions

View File

@@ -143,7 +143,7 @@ Namespace Methods.GlobalIndexer
End Try
End Function
Public Function LoadPostProcessingSteps(pManualIndexes As List(Of ManualIndex)) As DataTable
Public Function LoadPostProcessingSteps(pManualIndexes As List(Of ManualIndex)) As List(Of PostProcessingStep)
Logger.Debug("Start of Method [LoadPostProcessingSteps]")
Try
@@ -169,7 +169,26 @@ Namespace Methods.GlobalIndexer
LogAndThrow(oPostProcessingSteps.ErrorMessage)
End If
Return oPostProcessingSteps.Table
Dim oSteps As New List(Of PostProcessingStep)
For Each oRow As DataRow In oPostProcessingSteps.Table.Rows
Dim oStep As New PostProcessingStep With {
.Id = oRow.ItemEx(Of Integer)("GUID"),
.IndexId = oRow.ItemEx(Of Integer)("IDXMAN_ID"),
.[Variant] = oRow.ItemEx(Of String)("VARIANT"),
.Type = oRow.ItemEx(Of String)("TYPE"),
.Function1 = oRow.ItemEx(Of String)("FUNCTION1"),
.Function2 = oRow.ItemEx(Of String)("FUNCTION2"),
.Text1 = oRow.ItemEx(Of String)("Text1"),
.Text2 = oRow.ItemEx(Of String)("Text2"),
.Text3 = oRow.ItemEx(Of String)("Text3"),
.Sequence = oRow.ItemEx(Of Integer)("SEQUENCE")
}
oSteps.Add(oStep)
Next
Return oSteps
Catch ex As Exception
LogAndThrow(ex, "Error while loading post processing steps!")
Return Nothing