diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-03 18:53:02 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-03 18:53:02 -0400 |
| commit | 8ef442c2e8f39307f72bc98d6c79a9b5f09e6d72 (patch) | |
| tree | e830632342c9b9c5da81f86e382d131c4cda50c5 /MediaBrowser.Server.Implementations/Connect/ConnectEntryPoint.cs | |
| parent | f52373609eac871c2883e1052020ff5327b19707 (diff) | |
move classes
Diffstat (limited to 'MediaBrowser.Server.Implementations/Connect/ConnectEntryPoint.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Connect/ConnectEntryPoint.cs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/MediaBrowser.Server.Implementations/Connect/ConnectEntryPoint.cs b/MediaBrowser.Server.Implementations/Connect/ConnectEntryPoint.cs index 769b7821a..565eeb259 100644 --- a/MediaBrowser.Server.Implementations/Connect/ConnectEntryPoint.cs +++ b/MediaBrowser.Server.Implementations/Connect/ConnectEntryPoint.cs @@ -14,13 +14,13 @@ using System.Threading.Tasks; using MediaBrowser.Common.IO; using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; -using MediaBrowser.Server.Implementations.Threading; +using MediaBrowser.Model.Threading; namespace MediaBrowser.Server.Implementations.Connect { public class ConnectEntryPoint : IServerEntryPoint { - private PeriodicTimer _timer; + private ITimer _timer; private readonly IHttpClient _httpClient; private readonly IApplicationPaths _appPaths; private readonly ILogger _logger; @@ -29,8 +29,9 @@ namespace MediaBrowser.Server.Implementations.Connect private readonly INetworkManager _networkManager; private readonly IApplicationHost _appHost; private readonly IFileSystem _fileSystem; + private readonly ITimerFactory _timerFactory; - public ConnectEntryPoint(IHttpClient httpClient, IApplicationPaths appPaths, ILogger logger, INetworkManager networkManager, IConnectManager connectManager, IApplicationHost appHost, IFileSystem fileSystem) + public ConnectEntryPoint(IHttpClient httpClient, IApplicationPaths appPaths, ILogger logger, INetworkManager networkManager, IConnectManager connectManager, IApplicationHost appHost, IFileSystem fileSystem, ITimerFactory timerFactory) { _httpClient = httpClient; _appPaths = appPaths; @@ -39,13 +40,14 @@ namespace MediaBrowser.Server.Implementations.Connect _connectManager = connectManager; _appHost = appHost; _fileSystem = fileSystem; + _timerFactory = timerFactory; } public void Run() { LoadCachedAddress(); - _timer = new PeriodicTimer(TimerCallback, null, TimeSpan.FromSeconds(5), TimeSpan.FromHours(1)); + _timer = _timerFactory.Create(TimerCallback, null, TimeSpan.FromSeconds(5), TimeSpan.FromHours(1)); ((ConnectManager)_connectManager).Start(); } |
