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.
This commit is contained in:
parent
a845b85a5c
commit
258de6244c
@ -36,6 +36,7 @@ Namespace Jobs.FinalizeDocument
|
|||||||
_pdfBurnerParams = pdfBurnerParams
|
_pdfBurnerParams = pdfBurnerParams
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#Region "Burn PDF"
|
||||||
Public Function BurnAnnotsToPDF(pSourceBuffer As Byte(), pInstantJSONList As List(Of String), envelopeId As Integer) As Byte()
|
Public Function BurnAnnotsToPDF(pSourceBuffer As Byte(), pInstantJSONList As List(Of String), envelopeId As Integer) As Byte()
|
||||||
'read the elements of envelope with their annotations
|
'read the elements of envelope with their annotations
|
||||||
Dim sigRepo = Factory.Shared.Repository(Of Signature)()
|
Dim sigRepo = Factory.Shared.Repository(Of Signature)()
|
||||||
@ -93,7 +94,9 @@ Namespace Jobs.FinalizeDocument
|
|||||||
End Using
|
End Using
|
||||||
End Using
|
End Using
|
||||||
End Function
|
End Function
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
#Region "Add Value"
|
||||||
Private Sub AddInstantJSONAnnotationToPDF(pInstantJSON As String)
|
Private Sub AddInstantJSONAnnotationToPDF(pInstantJSON As String)
|
||||||
Dim oAnnotationData = JsonConvert.DeserializeObject(Of AnnotationData)(pInstantJSON)
|
Dim oAnnotationData = JsonConvert.DeserializeObject(Of AnnotationData)(pInstantJSON)
|
||||||
|
|
||||||
@ -175,7 +178,9 @@ Namespace Jobs.FinalizeDocument
|
|||||||
ant.FontStyle = _pdfBurnerParams.FontStyle
|
ant.FontStyle = _pdfBurnerParams.FontStyle
|
||||||
Manager.SaveAnnotationsToPage()
|
Manager.SaveAnnotationsToPage()
|
||||||
End Sub
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
#Region "Helpers"
|
||||||
Private Function ToPointF(pPoints As List(Of Single)) As PointF
|
Private Function ToPointF(pPoints As List(Of Single)) As PointF
|
||||||
Dim oPoints = pPoints.Select(AddressOf ToInches).ToList()
|
Dim oPoints = pPoints.Select(AddressOf ToInches).ToList()
|
||||||
Return New PointF(oPoints.Item(0), oPoints.Item(1))
|
Return New PointF(oPoints.Item(0), oPoints.Item(1))
|
||||||
@ -188,7 +193,9 @@ Namespace Jobs.FinalizeDocument
|
|||||||
Private Function ToInches(pValue As Single) As Single
|
Private Function ToInches(pValue As Single) As Single
|
||||||
Return pValue / 72
|
Return pValue / 72
|
||||||
End Function
|
End Function
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
#Region "Model"
|
||||||
Friend Class AnnotationData
|
Friend Class AnnotationData
|
||||||
Public Property annotations As List(Of Annotation)
|
Public Property annotations As List(Of Annotation)
|
||||||
|
|
||||||
@ -318,5 +325,6 @@ Namespace Jobs.FinalizeDocument
|
|||||||
Public Property name As String
|
Public Property name As String
|
||||||
Public Property value As String
|
Public Property value As String
|
||||||
End Class
|
End Class
|
||||||
|
#End Region
|
||||||
End Class
|
End Class
|
||||||
End Namespace
|
End Namespace
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user