importzugferdfiles: fix conversion error

This commit is contained in:
Jonathan Jenne
2019-05-10 15:31:03 +02:00
parent 15c33b843e
commit 2e19d878e0
2 changed files with 10 additions and 14 deletions

View File

@@ -6,18 +6,7 @@ Public Class PropertyValues
Private Shared _indexPattern = "\((\d+)\)"
Private Shared _indexRegex As New Regex(_indexPattern)
Public Shared Function GetPropValues(Obj As Object, PropertyName As String)
Dim oResult As Object = GetPropValue(Obj, PropertyName)
' Wrap the result of `GetPropValue` in a list if a single Value is returned
If TypeOf oResult Is List(Of Object) Then
Return oResult
Else
Return New List(Of Object) From {oResult}
End If
End Function
Public Shared Function GetPropValue(Obj As Object, PropertyName As String)
Public Shared Function GetPropValue(Obj As Object, PropertyName As String) As List(Of Object)
Dim oNameParts As String() = PropertyName.Split("."c)
If IsNothing(Obj) Then
@@ -78,7 +67,7 @@ Public Class PropertyValues
End If
Next
Return Obj
Return New List(Of Object) From {Obj}
End Function
Private Shared Function GetIndex(Prop As String) As Integer