public LightWeightTimerTimeClass(LightWeightTimerScheduler scheduler, TimeSpan timeClassInterval) { _timers = new List <LightWeightTimer>(); _watch = new Stopwatch(); _watch.Start(); _scheduler = scheduler; Interval = timeClassInterval; }
public WoopsaSubscriptionServiceImplementation(WoopsaContainer root, bool isServerSide) { _root = root; _isServerSide = isServerSide; _channels = new Dictionary <int, WoopsaSubscriptionChannel>(); TimerScheduler = new LightWeightTimerScheduler(); TimerScheduler.Started += (sender, e) => { _currentService = this; }; TimerScheduler.Start(); _timerCheckChannelTimedOut = TimerScheduler.AllocateTimer( WoopsaSubscriptionServiceConst.SubscriptionChannelLifeTimeCheckInterval); _timerCheckChannelTimedOut.Elapsed += _timerCheckChannelTimedOut_Elapsed; _timerCheckChannelTimedOut.IsEnabled = true; }
public WoopsaSubscriptionServiceImplementation(WoopsaContainer root, bool isServerSide) { _root = root; _isServerSide = isServerSide; _channels = new Dictionary<int, WoopsaSubscriptionChannel>(); TimerScheduler = new LightWeightTimerScheduler(); TimerScheduler.Started += (sender, e) => { _currentService = this; }; TimerScheduler.Start(); _timerCheckChannelTimedOut = TimerScheduler.AllocateTimer( WoopsaSubscriptionServiceConst.SubscriptionChannelLifeTimeCheckInterval); _timerCheckChannelTimedOut.Elapsed += _timerCheckChannelTimedOut_Elapsed; _timerCheckChannelTimedOut.IsEnabled = true; }
internal LightWeightTimer(LightWeightTimerTimeClass timeClass, LightWeightTimerScheduler scheduler) { TimeClass = timeClass; Scheduler = scheduler; }
public LightWeightTimerTimeClass(LightWeightTimerScheduler scheduler, TimeSpan timeClassInterval) { _timers = new List<LightWeightTimer>(); _watch = new Stopwatch(); _watch.Start(); _scheduler = scheduler; Interval = timeClassInterval; }
protected virtual void Dispose(bool disposing) { if (disposing) { if (TimerScheduler!= null) { TimerScheduler.Dispose(); TimerScheduler = null; } if (_timerCheckChannelTimedOut != null) { _timerCheckChannelTimedOut.Dispose(); _timerCheckChannelTimedOut = null; } if (_channels != null) { foreach (var item in _channels.Values) item.Dispose(); _channels = null; } } }