Interfaces/Jobs: add new method FilterPropertyMap
This commit is contained in:
@@ -5,6 +5,7 @@ Imports System.Xml.XPath
|
||||
Imports System.Xml.Xsl
|
||||
Imports DigitalData.Modules.Interfaces.Exceptions
|
||||
Imports DigitalData.Modules.Interfaces.ZUGFeRD
|
||||
Imports DigitalData.Modules.Interfaces.ZUGFeRDInterface
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports GdPicture14
|
||||
|
||||
@@ -101,6 +102,17 @@ Public Class ZUGFeRDInterface
|
||||
AllowedFilenames = oAllowedFilenames
|
||||
End Sub
|
||||
|
||||
Public Function FilterPropertyMap(pPropertyMap As Dictionary(Of String, XmlItemProperty), pSpecification As String) As Dictionary(Of String, XmlItemProperty)
|
||||
If pSpecification = ZUGFERD_SPEC_10 Then
|
||||
Return pPropertyMap.
|
||||
Where(Function(kv) kv.Value.Specification = pSpecification Or kv.Value.Specification = ZUGFERD_SPEC_DEFAULT).
|
||||
ToDictionary(Function(kv) kv.Key, Function(kv) kv.Value)
|
||||
Else
|
||||
Return pPropertyMap.
|
||||
Where(Function(kv) kv.Value.Specification = pSpecification).
|
||||
ToDictionary(Function(kv) kv.Key, Function(kv) kv.Value)
|
||||
End If
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Validates a ZUGFeRD File and extracts the XML Document from it
|
||||
|
||||
Reference in New Issue
Block a user