From ed36015d1e52ea21baf502e698b6781e05d7576b Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Tue, 19 Nov 2024 13:32:38 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20CryptFactory.Instance=20in=20Getter-Meth?= =?UTF-8?q?ode=20f=C3=BCr=20tr=C3=A4ges=20Laden=20umwandeln?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DigitalData.Core.Security/CryptFactory.cs | 4 ++-- DigitalData.Core.Security/DIExtensions.cs | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/DigitalData.Core.Security/CryptFactory.cs b/DigitalData.Core.Security/CryptFactory.cs index 473a45b..32c2c0c 100644 --- a/DigitalData.Core.Security/CryptFactory.cs +++ b/DigitalData.Core.Security/CryptFactory.cs @@ -4,8 +4,8 @@ namespace DigitalData.Core.Security { public class CryptFactory : ICryptFactory { - private static readonly Lazy LazyStaticCryptFactory = new (() => new CryptFactory()); + private static readonly Lazy LazyStaticCryptFactory = new (() => new ()); - public static ICryptFactory Static = LazyStaticCryptFactory.Value; + public static CryptFactory Instance => LazyStaticCryptFactory.Value; } } \ No newline at end of file diff --git a/DigitalData.Core.Security/DIExtensions.cs b/DigitalData.Core.Security/DIExtensions.cs index 649b80d..d1595ec 100644 --- a/DigitalData.Core.Security/DIExtensions.cs +++ b/DigitalData.Core.Security/DIExtensions.cs @@ -1,4 +1,5 @@ -using Microsoft.Extensions.DependencyInjection; +using DigitalData.Core.Abstractions.Security; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; namespace DigitalData.Core.Security @@ -7,7 +8,7 @@ namespace DigitalData.Core.Security { public static IServiceCollection AddSecurity(this IServiceCollection services) { - services.TryAddScoped(_ => CryptFactory.Static); + services.TryAddScoped(_ => CryptFactory.Instance); return services; }