From da2967a181212fda937a28ed6fcdd284f0778966 Mon Sep 17 00:00:00 2001 From: sonvister Date: Wed, 7 Mar 2018 14:10:00 -0600 Subject: [PATCH] Update JsonStreamController --- src/Binance/Utility/JsonStreamController.cs | 28 ++++++++++++++++----- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/src/Binance/Utility/JsonStreamController.cs b/src/Binance/Utility/JsonStreamController.cs index dd610e68..53b27242 100644 --- a/src/Binance/Utility/JsonStreamController.cs +++ b/src/Binance/Utility/JsonStreamController.cs @@ -6,15 +6,31 @@ namespace Binance.Utility { - public class JsonStreamController : RetryTaskController, IJsonStreamController - where TStream : IJsonStream + public class JsonStreamController : JsonStreamController, IJsonStreamController { - #region Private Constants + #region Public Constants - private readonly TimeSpan _watchdogTimerIntervalDefault = TimeSpan.FromHours(1); + public static readonly TimeSpan WatchdogTimerIntervalDefault = TimeSpan.FromHours(1); - #endregion Private Constants + #endregion Public Constants + + #region Constructors + /// + /// Constructor. + /// + /// + /// + public JsonStreamController(IJsonStream stream, ILogger logger = null) + : base(stream, logger) + { } + + #endregion Constructors + } + + public class JsonStreamController : RetryTaskController, IJsonStreamController + where TStream : IJsonStream + { #region Public Properties public TStream Stream { get; } @@ -45,7 +61,7 @@ await RestartAsync() .ConfigureAwait(false); }) { - Interval = _watchdogTimerIntervalDefault + Interval = JsonStreamController.WatchdogTimerIntervalDefault }; Stream.Message += (s, e) =>