feat(Core.Security.DIExtensions): Arrangierte DI-Erweiterung
This commit is contained in:
parent
1a941b4728
commit
9396f48f46
@ -6,11 +6,10 @@ namespace DigitalData.Core.Security
|
|||||||
{
|
{
|
||||||
public static class DIExtensions
|
public static class DIExtensions
|
||||||
{
|
{
|
||||||
public static IServiceCollection AddSecurity(this IServiceCollection services)
|
public static IServiceCollection AddAsymCryptService<TAsymCryptParams>(this IServiceCollection services)
|
||||||
|
where TAsymCryptParams : AsymCryptParams
|
||||||
{
|
{
|
||||||
services.TryAddScoped<IRSAFactory>(sp => RSAFactory.Static);
|
services.TryAddScoped<IAsymCryptService<TAsymCryptParams>, AsymCryptService<TAsymCryptParams>>();
|
||||||
services.TryAddScoped<IAsymCryptService, AsymCryptService>();
|
|
||||||
|
|
||||||
return services;
|
return services;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user