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; }