internal void Disconnect() { CloseExcel(); client.Disconnect(); monitor.Stop(); fservice.Stop(); Console.WriteLine("Disconnecting..."); }
public void OnServiceStopped_Raised_When_ServiceStopped() { var eventRaised = false; _followerService = new FollowerService(_api); _followerService.SetChannelsById(Utils.CreateListWithEmptyString()); _followerService.OnServiceStopped += (sender, e) => eventRaised = true; _followerService.Start(); _followerService.Stop(); Assert.True(eventRaised); }
public void Dispose() { try { Service.Stop(); } catch (Exception e) { Console.WriteLine("Service.Stop(); failed"); } try { Monitor.Stop(); } catch (Exception) { Console.WriteLine("Monitor.Stop(); failed"); } }
protected virtual void StopFollowerService() { if (_followerService != null) { try { _followerService.OnNewFollowersDetected -= OnNewFollowerDetected; _followerService.Stop(); _followerService = null; } catch { } } }
public void Stop_Throws_InvalidOperationException_When_ServiceAlreadyStopped() { _followerService = new FollowerService(_api); AssertException.Throws <InvalidOperationException>(AlreadyStoppedExceptionMessage, () => _followerService.Stop()); }
public void Stop() { followerService?.Stop(); }