refactor(CreateAnnotationCommand): make JsonSerializerOptions static.
This commit is contained in:
parent
ecc7552951
commit
f13a2434f7
@ -15,21 +15,19 @@ namespace EnvelopeGenerator.Application.Annotations.Commands;
|
||||
/// </summary>
|
||||
public record CreateAnnotationCommand : EnvelopeReceiverQueryBase, IRequest<IEnumerable<Signature>>
|
||||
{
|
||||
private static readonly JsonSerializerOptions SerializerOptions = new()
|
||||
{
|
||||
PropertyNameCaseInsensitive = true,
|
||||
PropertyNamingPolicy = null
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public CreateAnnotationCommand()
|
||||
{
|
||||
_lazyPSPDFKitInstant = new(() =>
|
||||
{
|
||||
var options = new JsonSerializerOptions
|
||||
{
|
||||
PropertyNameCaseInsensitive = true,
|
||||
PropertyNamingPolicy = null
|
||||
};
|
||||
|
||||
return JsonSerializer.Deserialize<dynamic>(PSPDFKitInstantJSON, options) ?? new ExpandoObject();
|
||||
});
|
||||
_lazyPSPDFKitInstant = new(()
|
||||
=> JsonSerializer.Deserialize<dynamic>(PSPDFKitInstantJSON, SerializerOptions) ?? new ExpandoObject());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user