instantiate AesProvider in service collection

This commit is contained in:
Timothy Schenk 2023-01-02 12:26:21 +01:00
parent 5f69b25950
commit ee2fa602fe

View file

@ -1,6 +1,7 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using ReInject;
using Server;
var services = Injector.GetContainer();
@ -20,7 +21,8 @@ ILoggerFactory loggerFactory = LoggerFactory.Create(builder =>
opts => opts.FormatLogFileName = fileName => String.Format(fileName, DateTime.UtcNow));
});
services.Register<AesProvider>(DependencyStrategy.AtomicInstance, true, new AesProvider(loggerFactory, null, null));
services.Register<ILoggerFactory>(DependencyStrategy.AtomicInstance, true, loggerFactory);
var authServer = services.GetInstance<Server.AuthorizationServer>();
var authServer = services.GetInstance<AuthorizationServer>();
authServer.Start();