/// <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); }
public LogsController(ILogEntriesRepository repository) { _repository = repository; }
public LogService(ILogEntriesRepository logEntriesRepository, IProcessLogRepository processLogRepository) { _logEntriesRepository = logEntriesRepository; _processLogRepository = processLogRepository; }
public LogEntries(ILogEntriesRepository logEntriesRepository) { _logEntriesRepository = logEntriesRepository; }