Refactor Attachments property and syntax
Changed the `Attachments` property type in `EnvelopeNotificationBase.cs` from `List` to `IReadOnlyList` to enhance immutability and thread safety. Updated the `FinalizeEnvelopeCommandHandler` in `FinalizeEnvelopeCommand.cs` to use a single-line syntax for `Attachments` initialization, improving code readability.
This commit is contained in:
@@ -98,9 +98,7 @@ public class FinalizeEnvelopeCommandHandler(IRepository<Envelope> Repo, ISender
|
||||
{
|
||||
DocumentTitle = envelope.Title,
|
||||
NameReceiver = er.Name,
|
||||
Attachments = [
|
||||
($"unterzeichnetes-dokument.pdf", doc)
|
||||
]
|
||||
Attachments = [($"unterzeichnetes-dokument.pdf", doc)]
|
||||
}, cancel);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user