Consolidate parameter format and logic
This commit is contained in:
@@ -93,8 +93,8 @@ Namespace Templates
|
||||
Dim oParam1 As String = Utils.NotNull(Parameter1, String.Empty)
|
||||
Dim oParam2 As String = Utils.NotNull(Parameter2, String.Empty)
|
||||
|
||||
Dim oParamValue1 = TryGetParameter(oParam1, pName)
|
||||
Dim oParamValue2 = TryGetParameter(oParam2, pName)
|
||||
Dim oParamValue1 = Parameters.TryGet(oParam1, pName)
|
||||
Dim oParamValue2 = Parameters.TryGet(oParam2, pName)
|
||||
|
||||
If oParamValue1 IsNot Nothing AndAlso oParamValue1.Item1 = pName Then
|
||||
Return oParamValue1.Item2
|
||||
@@ -107,22 +107,6 @@ Namespace Templates
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
Private Function TryGetParameter(pParameterString As String, pName As String) As Tuple(Of String, String)
|
||||
If pParameterString <> String.Empty Then
|
||||
For Each oParameter In pParameterString.Split(",")
|
||||
Dim oSplit = oParameter.Split("=").ToList()
|
||||
|
||||
If oSplit.Count = 2 AndAlso oSplit.First = pName Then
|
||||
Return New Tuple(Of String, String)(oSplit.First, oSplit.Last)
|
||||
End If
|
||||
Next
|
||||
|
||||
Return Nothing
|
||||
Else
|
||||
Return Nothing
|
||||
End If
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Table from XSD
|
||||
''' </summary>
|
||||
|
||||
Reference in New Issue
Block a user