/// <summary> /// Waits for incoming messages on this connection /// </summary> public void Execute() { this.m_state = BackgroundServiceState.Running; this.listening = true; while (this.State == BackgroundServiceState.Running) { byte[] buffer = null; this.Connection.Receive(buffer); } this.listening = false; }
private void Init() { this.m_state = BackgroundServiceState.Idle; }
/// <summary> /// Get's called by Server to stop this thread /// </summary> public void Stop() { this.m_state = BackgroundServiceState.Idle; }
private void OnGetBackgroundServiceState(object obj) { var msg = new BackgroundServiceState(BackgroundService != null && BackgroundService.IsStarted); _messagingCenter.Send <object, BackgroundServiceState>(this, FromBackgroundMessages.BackgroundServiceState, msg); }
private void HandleStop() { this.m_state = BackgroundServiceState.Idle; }
private void HandleStart(string[] args) { this.m_state = BackgroundServiceState.Running; }