From 07de92666866a7af91ff382ac9d21aa46cec3d58 Mon Sep 17 00:00:00 2001 From: Paul Volavsek Date: Tue, 17 Oct 2023 17:40:58 +0200 Subject: [PATCH] review fixes --- .../{DateTimeConverter.cs => CustomDateTimeConverter.cs} | 2 +- src/fiskaltrust.Launcher/Services/HostingService.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename src/fiskaltrust.Launcher/Helpers/{DateTimeConverter.cs => CustomDateTimeConverter.cs} (97%) diff --git a/src/fiskaltrust.Launcher/Helpers/DateTimeConverter.cs b/src/fiskaltrust.Launcher/Helpers/CustomDateTimeConverter.cs similarity index 97% rename from src/fiskaltrust.Launcher/Helpers/DateTimeConverter.cs rename to src/fiskaltrust.Launcher/Helpers/CustomDateTimeConverter.cs index 405fe1c8..b687d014 100644 --- a/src/fiskaltrust.Launcher/Helpers/DateTimeConverter.cs +++ b/src/fiskaltrust.Launcher/Helpers/CustomDateTimeConverter.cs @@ -5,7 +5,7 @@ namespace fiskaltrust.Launcher.Helpers { - sealed class DateTimeConverter : JsonConverter + sealed class CustomDateTimeConverter : JsonConverter { private readonly static JsonConverter DEFAULT_CONVERTER = (JsonConverter)JsonSerializerOptions.Default.GetConverter(typeof(DateTime)); static readonly DateTime EPOCH = new DateTime(1970, 1, 1, 0, 0, 0); diff --git a/src/fiskaltrust.Launcher/Services/HostingService.cs b/src/fiskaltrust.Launcher/Services/HostingService.cs index d3f45a68..102fce31 100644 --- a/src/fiskaltrust.Launcher/Services/HostingService.cs +++ b/src/fiskaltrust.Launcher/Services/HostingService.cs @@ -134,7 +134,7 @@ private WebApplication CreateRestHost(WebApplicationBuilder builder, Uri uri, { options.SerializerOptions.NumberHandling = System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString; options.SerializerOptions.Converters.Add(new NumberToStringConverter()); - options.SerializerOptions.Converters.Add(new DateTimeConverter()); + options.SerializerOptions.Converters.Add(new CustomDateTimeConverter()); options.SerializerOptions.PropertyNamingPolicy = null; options.SerializerOptions.DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull; });