From 74f444a8d624748823889d2d3c6857fb5142c84f Mon Sep 17 00:00:00 2001 From: TekH Date: Tue, 7 Oct 2025 21:54:18 +0200 Subject: [PATCH] feat(PDFBurner): add AnnotationsByReceiver method to AnnotationData --- .../Jobs/FinalizeDocument/PDFBurner.vb | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/EnvelopeGenerator.CommonServices/Jobs/FinalizeDocument/PDFBurner.vb b/EnvelopeGenerator.CommonServices/Jobs/FinalizeDocument/PDFBurner.vb index 83155e46..46db6701 100644 --- a/EnvelopeGenerator.CommonServices/Jobs/FinalizeDocument/PDFBurner.vb +++ b/EnvelopeGenerator.CommonServices/Jobs/FinalizeDocument/PDFBurner.vb @@ -173,18 +173,11 @@ Namespace Jobs.FinalizeDocument Friend Class AnnotationData Public Property annotations As List(Of Annotation) - Public ReadOnly Property SignatureAnnotations As List(Of List(Of Annotation)) + Public ReadOnly Property AnnotationsByReceiver As IEnumerable(Of List(Of Annotation)) Get - Dim result As New List(Of List(Of Annotation))() - - If annotations IsNot Nothing AndAlso annotations.Count > 0 Then - For i As Integer = 0 To annotations.Count - 1 Step 6 - Dim group As List(Of Annotation) = annotations.Skip(i).Take(6).ToList() - result.Add(group) - Next - End If - - Return result + Return annotations _ + .GroupBy(Function(a) a.receiverId) _ + .Select(Function(g) g.ToList()) End Get End Property