feat(JsonExtensions): create to be able to make fluent Json serilization

This commit is contained in:
2025-09-10 15:55:56 +02:00
parent e990a466aa
commit 95b54fa1f1
6 changed files with 33 additions and 14 deletions

View File

@@ -1,4 +1,5 @@
using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiver;
using EnvelopeGenerator.Application.Common.Extensions;
using EnvelopeGenerator.Domain.Constants;
using MediatR;
using Newtonsoft.Json;
@@ -27,7 +28,7 @@ public record DocSignedNotification(EnvelopeReceiverDto Original) : EnvelopeRece
/// </summary>
public string EmailAddress => Receiver?.EmailAddress
?? throw new InvalidOperationException($"Receiver is null." +
$"DocSignedNotification:\n{JsonConvert.SerializeObject(this, Format.Json.ForDiagnostics)}");
$"DocSignedNotification:\n{this.ToJson(Format.Json.ForDiagnostics)}");
}
/// <summary>