add hasStructuredID property isntead of throwing exception and filter it

This commit is contained in:
2025-10-08 00:19:28 +02:00
parent 4fad41bd0b
commit 7d85d59ace
2 changed files with 20 additions and 22 deletions

View File

@@ -180,8 +180,9 @@ Namespace Jobs.FinalizeDocument
Public ReadOnly Property AnnotationsByReceiver As IEnumerable(Of List(Of Annotation))
Get
Return annotations _
.GroupBy(Function(a) a.receiverId) _
.Select(Function(g) g.ToList())
.Where(Function(annot) annot.hasStructuredID).ToList() _
.GroupBy(Function(a) a.receiverId) _
.Select(Function(g) g.ToList())
End Get
End Property
@@ -191,15 +192,17 @@ Namespace Jobs.FinalizeDocument
Friend Class Annotation
Private _id As String
Private _id As String = Nothing
Public envelopeId As Integer
Public envelopeId As Integer = Nothing
Public receiverId As Integer
Public receiverId As Integer = Nothing
Public index As Integer
Public index As Integer = Nothing
Public internalType As String
Public internalType As String = Nothing
Public hasStructuredID As Boolean = True
Public Property id As String
Get
@@ -215,7 +218,9 @@ Namespace Jobs.FinalizeDocument
Dim parts As String() = value.Split("#"c)
If (parts.Length <> 4) Then
Throw New BurnAnnotationException($"The identifier of annotation has more or less than 4 sub-part. Id: {_id}")
hasStructuredID = False
Return
'Throw New BurnAnnotationException($"The identifier of annotation has more or less than 4 sub-part. Id: {_id}")
End If
If Not Integer.TryParse(parts(0), envelopeId) Then