public void Arrange() { _processor = new Mock <IEventsProcessor>(); _logger = new Mock <ILog>(); _eventsProcessors = new List <IEventsProcessor> { _processor.Object }; _watcher = new EventsWatcher(_eventsProcessors, _logger.Object); }
protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { eventsWatcher?.Dispose(); eventsWatcher = null; } Log.Trace($"Disposed: {ToString()}\n\n"); disposedValue = true; } }
public void Start(CancellationToken cancellationToken) { try { conf.Load(); Log.Info("ConnectionString: " + conf.ConnectionString); Log.Info("ServersUrls Count: " + conf.ServersUrls.Count); eventsWatcher = new EventsWatcher(conf, cancellationToken); } catch (Exception e) { Log.Fatal("Error ocure, while server starting!\n" + e.ToString()); return; } Log.Info("Server started!"); cancellationToken.WaitHandle.WaitOne(); Log.Info("Server has been stopped!"); }
// Use this for initialization private void Start() { Instance = this; _scrollview = GetComponentInChildren <ScrollRect>(); _textContent = _scrollview.GetComponentInChildren <Text>(); _scrollbar = _scrollview.verticalScrollbar; _style = new GUIStyle(); _style.font = _textContent.font; _style.fontStyle = _textContent.fontStyle; _style.fontSize = _textContent.fontSize; _needUpdate = 1; foreach (RectTransform t in GetComponentsInChildren <RectTransform>()) { if (t.name == "Title") { _yDelta = t.rect.height - t.offsetMax.y * 2; break; } } ToogleReduce(); }