3 Commits

Author SHA1 Message Date
8d672b4b49 Base: Warnings bearbeitet 2024-02-02 10:14:27 +01:00
ec876ca518 Zugferd Interface: Warnings bearbeitet 2024-02-02 10:13:57 +01:00
cf2e2161cf Base Module: Extension Methods ergänzt 2024-02-02 10:08:00 +01:00
3 changed files with 26 additions and 2 deletions

View File

@@ -177,7 +177,6 @@ Public Class FilesystemEx
''' somestring~3 --> somestring~3 --> ['somestring', '3'] --> version 3
''' </example>
''' <param name="pString">The string to versioned</param>
''' <param name="pSeparator">The character to split at</param>
''' <returns>Tuple of string and version</returns>
Public Function GetVersionedString(pString As String) As Tuple(Of String, Integer)
Dim oSplitString = pString.Split(VERSION_SEPARATOR).ToList()
@@ -265,7 +264,7 @@ Public Class FilesystemEx
_Logger.Warn("Deleting files was aborted at file {0}.", oFile.FullName)
Return False
End If
oUnableToDeleteCounter = oUnableToDeleteCounter + 1
oUnableToDeleteCounter += 1
_Logger.Warn("File {0} could not be deleted!")
End Try
Next

View File

@@ -65,6 +65,30 @@ Public Module ModuleExtensions
Return (pString.Trim().ToLower() = "true") OrElse (pString.Trim() = "1")
End Function
''' <summary>
''' Checks if a string is null or empty
''' </summary>
''' <param name="pString">The input string</param>
''' <returns>True string is null or empty, otherwise false.</returns>
<Extension()>
Public Function IsNullOrEmpty(pString As String) As Boolean
Return String.IsNullOrEmpty(pString)
End Function
''' <summary>
''' Checks if a string is NOT null or empty
''' </summary>
''' <param name="pString">The input string</param>
''' <returns>True string is null or empty, otherwise false.</returns>
<Extension()>
Public Function IsNotNullOrEmpty(pString As String) As Boolean
If String.IsNullOrEmpty(pString) Then
Return False
Else
Return True
End If
End Function
' ======================================================
' === DICTIONARY
' ======================================================

View File

@@ -149,6 +149,7 @@ Public Class PDFEmbeds
GDPicturePDF.DeleteEmbeddedFile(0)
End While
Return True
End Function
Private Function DoExtract(GDPicturePDF As GdPicturePDF, pExtensions As List(Of String)) As List(Of EmbeddedFile)