public ReportAccessHub(IUserQueryService userQuerySvc, IReportQueueService reportQueueService) { _userQuerySvc = userQuerySvc; _reportQueueService = reportQueueService; // Get cached user information. // TODO: Determine how to handle cache expiration. _reportUsers = Cache.Get <ConcurrentDictionary <Guid, List <Guid> > >("reportUsers"); if (_reportUsers == null) { _reportUsers = new ConcurrentDictionary <Guid, List <Guid> >(); Cache.AddOrUpdate(_reportUsers, "reportUsers"); } _userConnections = Cache.Get <ConcurrentDictionary <Guid, List <string> > >("reportUserConnections"); if (_userConnections == null) { _userConnections = new ConcurrentDictionary <Guid, List <string> >(); Cache.AddOrUpdate(_userConnections, "reportUserConnections"); } _reportMonitors = Cache.Get <ConcurrentDictionary <string, List <Guid> > >("reportMonitors"); if (_reportMonitors == null) { _reportMonitors = new ConcurrentDictionary <string, List <Guid> >(); Cache.AddOrUpdate(_reportMonitors, "reportMonitors"); } }
public ReportQueuesController(IReportQueueService reportQueueService) { _reportQueueService = reportQueueService; }