From 258de6244c462afd0f9ace8fe1fcac161caf809b Mon Sep 17 00:00:00 2001 From: TekH Date: Fri, 24 Oct 2025 12:30:16 +0200 Subject: [PATCH] refactor(pdf-burner): organize code with regions for better readability - Grouped related methods and classes into logical #Region blocks: - "Burn PDF" - "Add Value" - "Helpers" - "Model" - Improved code structure and readability without changing functionality. - No logic or behavior modifications were made. --- .../Jobs/FinalizeDocument/PDFBurner.vb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/EnvelopeGenerator.CommonServices/Jobs/FinalizeDocument/PDFBurner.vb b/EnvelopeGenerator.CommonServices/Jobs/FinalizeDocument/PDFBurner.vb index ccda7b83..a969da8b 100644 --- a/EnvelopeGenerator.CommonServices/Jobs/FinalizeDocument/PDFBurner.vb +++ b/EnvelopeGenerator.CommonServices/Jobs/FinalizeDocument/PDFBurner.vb @@ -36,6 +36,7 @@ Namespace Jobs.FinalizeDocument _pdfBurnerParams = pdfBurnerParams End Sub +#Region "Burn PDF" Public Function BurnAnnotsToPDF(pSourceBuffer As Byte(), pInstantJSONList As List(Of String), envelopeId As Integer) As Byte() 'read the elements of envelope with their annotations Dim sigRepo = Factory.Shared.Repository(Of Signature)() @@ -93,7 +94,9 @@ Namespace Jobs.FinalizeDocument End Using End Using End Function +#End Region +#Region "Add Value" Private Sub AddInstantJSONAnnotationToPDF(pInstantJSON As String) Dim oAnnotationData = JsonConvert.DeserializeObject(Of AnnotationData)(pInstantJSON) @@ -175,7 +178,9 @@ Namespace Jobs.FinalizeDocument ant.FontStyle = _pdfBurnerParams.FontStyle Manager.SaveAnnotationsToPage() End Sub +#End Region +#Region "Helpers" Private Function ToPointF(pPoints As List(Of Single)) As PointF Dim oPoints = pPoints.Select(AddressOf ToInches).ToList() Return New PointF(oPoints.Item(0), oPoints.Item(1)) @@ -188,7 +193,9 @@ Namespace Jobs.FinalizeDocument Private Function ToInches(pValue As Single) As Single Return pValue / 72 End Function +#End Region +#Region "Model" Friend Class AnnotationData Public Property annotations As List(Of Annotation) @@ -318,5 +325,6 @@ Namespace Jobs.FinalizeDocument Public Property name As String Public Property value As String End Class +#End Region End Class End Namespace