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