Inits the workflow configuration
This commit is contained in:
parent
f66dac31c9
commit
e6e098b32e
286 changed files with 33660 additions and 64632 deletions
|
|
@ -44,17 +44,15 @@ namespace Yavsc
|
|||
|
||||
public HubInputValidator InputValidator { get; }
|
||||
|
||||
public ChatHub()
|
||||
public ChatHub(ApplicationDbContext dbContext,
|
||||
ILoggerFactory loggerFactory,
|
||||
IStringLocalizerFactory stringLocalizerFactory,
|
||||
IConnexionManager connexionManager)
|
||||
{
|
||||
var scope = Startup.Services.GetRequiredService<IServiceScopeFactory>().CreateScope();
|
||||
|
||||
_dbContext = scope.ServiceProvider.GetService<ApplicationDbContext>();
|
||||
var loggerFactory = scope.ServiceProvider.GetService<ILoggerFactory>();
|
||||
|
||||
var stringLocFactory = scope.ServiceProvider.GetService<IStringLocalizerFactory>();
|
||||
_localizer = stringLocFactory.Create(typeof(ChatHub));
|
||||
_dbContext = dbContext;
|
||||
_localizer = stringLocalizerFactory.Create(typeof(ChatHub));
|
||||
|
||||
_cxManager = scope.ServiceProvider.GetService<IConnexionManager>();
|
||||
_cxManager = connexionManager;
|
||||
_cxManager.SetErrorHandler ((context, error) =>
|
||||
{
|
||||
NotifyUser(NotificationTypes.Error, context, error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue