Refactor signature processing in EnvelopeReceiverPageDataService
Refactored the logic to filter and map `elements` to `signatures` before converting them to `UnitOfLength.Point`. Removed the direct return of `elements` and ensured that only the processed `signatures` are converted and returned. Added a `ToList()` call to materialize the `signatures` collection before conversion.
This commit is contained in:
@@ -45,11 +45,12 @@ public class EnvelopeReceiverPageDataService(
|
|||||||
if (document.Elements is not IEnumerable<DocReceiverElementDto> elements)
|
if (document.Elements is not IEnumerable<DocReceiverElementDto> elements)
|
||||||
return [];
|
return [];
|
||||||
|
|
||||||
return elements
|
var signatures = elements
|
||||||
.Where(element => element.ReceiverId == receiverId)
|
.Where(element => element.ReceiverId == receiverId)
|
||||||
.Select(MapSignature)
|
.Select(MapSignature)
|
||||||
.Convert(UnitOfLength.Point)
|
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
return signatures.Convert(UnitOfLength.Point);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user