First Working Version with New parser

This commit is contained in:
Jonathan Jenne
2021-10-15 14:56:46 +02:00
parent 3596786137
commit 12aa22ebdf
33 changed files with 3066 additions and 2533 deletions

View File

@@ -1,28 +1,28 @@
Namespace Schemas.Orders
Public Class Helpers
Public Shared Function GetOrderHead(Of T)(pData As IMesoWebservice) As T
Dim oHead As T = pData.Items.
Where(Function(i) TypeOf i Is T).
FirstOrDefault()
Return oHead
End Function
'Public Class Helpers
' Public Shared Function GetOrderHead(Of T)(pData As IMesoWebservice) As T
' Dim oHead As T = pData.Items.
' Where(Function(i) TypeOf i Is T).
' FirstOrDefault()
' Return oHead
' End Function
Public Shared Sub SetOrderHead(Of T)(pData As IMesoWebservice, pUpdateFunction As Action(Of T))
Dim oHead As T = pData.Items.
Where(Function(i) TypeOf i Is T).
SetValue(Sub(pObject As T)
pUpdateFunction(pObject)
End Sub).
FirstOrDefault()
' Public Shared Sub SetOrderHead(Of T)(pData As IMesoWebservice, pUpdateFunction As Action(Of T))
' Dim oHead As T = pData.Items.
' Where(Function(i) TypeOf i Is T).
' SetValue(Sub(pObject As T)
' pUpdateFunction(pObject)
' End Sub).
' FirstOrDefault()
End Sub
' End Sub
Public Shared Function GetOrderPositions(Of T)(pData As IMesoWebservice) As List(Of T)
Dim oPositions As List(Of T) = pData.Items.
Where(Function(i) TypeOf i Is T).
Select(Of T)(Function(i) i).
ToList()
Return oPositions
End Function
End Class
' Public Shared Function GetOrderPositions(Of T)(pData As IMesoWebservice) As List(Of T)
' Dim oPositions As List(Of T) = pData.Items.
' Where(Function(i) TypeOf i Is T).
' Select(Of T)(Function(i) i).
' ToList()
' Return oPositions
' End Function
'End Class
End Namespace