/// <summary>
 /// Initializes a new instance of the <see cref="LiveMessageTicker"/> class.
 /// </summary>
 /// <param name="repository">The database repository to use.</param>
 /// <exception cref="System.ArgumentNullException"></exception>
 public LiveMessageTicker(ILogEntriesRepository repository)
 {
     if (repository == null)
     {
         throw new ArgumentNullException(nameof(repository));
     }
     this.repository = repository;
     // Register this instance to in ASP to free it up on shutdown
     HostingEnvironment.RegisterObject(this);
     // Get the server-side SignalR hub
     hub = GlobalHost.ConnectionManager.GetHubContext <ServerMonitoringHub>();
     // Configure a Timer that calls CheckForNewMessages all 2 sec's
     checkTimer = new Timer(CheckForNewMessages, null, TimeSpan.Zero, updateInterval);
 }
Example #2
0
 public LogsController(ILogEntriesRepository repository)
 {
     _repository = repository;
 }
Example #3
0
 public LogService(ILogEntriesRepository logEntriesRepository, IProcessLogRepository processLogRepository)
 {
     _logEntriesRepository = logEntriesRepository;
     _processLogRepository = processLogRepository;
 }
Example #4
0
 public LogEntries(ILogEntriesRepository logEntriesRepository)
 {
     _logEntriesRepository = logEntriesRepository;
 }