diff --git a/EnvelopeGenerator.Application/Annotations/Commands/CreateAnnotationCommand.cs b/EnvelopeGenerator.Application/Annotations/Commands/CreateAnnotationCommand.cs index dd333602..9dd0b349 100644 --- a/EnvelopeGenerator.Application/Annotations/Commands/CreateAnnotationCommand.cs +++ b/EnvelopeGenerator.Application/Annotations/Commands/CreateAnnotationCommand.cs @@ -15,21 +15,19 @@ namespace EnvelopeGenerator.Application.Annotations.Commands; /// public record CreateAnnotationCommand : EnvelopeReceiverQueryBase, IRequest> { + private static readonly JsonSerializerOptions SerializerOptions = new() + { + PropertyNameCaseInsensitive = true, + PropertyNamingPolicy = null + }; + /// /// /// public CreateAnnotationCommand() { - _lazyPSPDFKitInstant = new(() => - { - var options = new JsonSerializerOptions - { - PropertyNameCaseInsensitive = true, - PropertyNamingPolicy = null - }; - - return JsonSerializer.Deserialize(PSPDFKitInstantJSON, options) ?? new ExpandoObject(); - }); + _lazyPSPDFKitInstant = new(() + => JsonSerializer.Deserialize(PSPDFKitInstantJSON, SerializerOptions) ?? new ExpandoObject()); } ///