Exemple #1
0
 public Chat(IServiceProvider provider, ILogger <Chat> logger)
 {
     _visitors        = (IVisitorService)provider.GetService(typeof(IVisitorService));
     _templateService = (ITemplateService)provider.GetService(typeof(ITemplateService));
     _logger          = logger;
     Users            = _visitors.GetUsers();
 }
Exemple #2
0
 public IndexModel(IHubContext <Notify> hub, IServiceProvider provider, IConfiguration configuration, ILogger <IndexModel> logger)
 {
     _hub             = hub;
     _visitors        = (IVisitorService)provider.GetService(typeof(IVisitorService));
     _templateService = (ITemplateService)provider.GetService(typeof(ITemplateService));
     _logger          = logger;
     Users            = _visitors.GetUsers();
 }