feat(DIExtensions): Die Methode AddCryptographerConverter wurde entfernt.

This commit is contained in:
Developer 02 2024-12-18 13:17:18 +01:00
parent 0235c83075
commit a8403087f6

View File

@ -4,20 +4,11 @@ using DigitalData.Core.Security.Cryptographer;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace DigitalData.Core.Security
{
public static class DIExtensions
{
public static JsonSerializerOptions AddCryptographerConverter(this JsonSerializerOptions options)
{
if (!options.Converters.OfType<JsonStringEnumConverter>().Any())
options.Converters.Add(new JsonStringEnumConverter());
return options;
}
private static IServiceCollection AddParamsConfigureOptions<TParams>(this IServiceCollection services) where TParams : RSAFactoryParams
=> services.AddSingleton<IConfigureOptions<TParams>, ParamsConfigureOptions<TParams>>();