public void PauseTweetStream()
 {
     if (_filteredStream.StreamState != StreamState.Pause)
     {
         _logger.LogInformation("Pausing tweet stream.");
         _filteredStream.PauseStream();
     }
 }
 private void StopStreams()
 {
     if (threadStream != null && stream != null)
     {
         threadStream.Abort();
         threadShow.Abort();
         threadShow   = null;
         threadStream = null;
         stream.PauseStream();
         stream = null;
     }
 }
        private void OnUserAddedToDataStore(object sender, UserChangedEventArgs args)
        {
            _stream.PauseStream();

            if (args.NewUser != null)
            {
                _stream.AddFollow(args.NewUser.Id);
            }

            if (args.OldUser != null)
            {
                _stream.RemoveFollow(args.OldUser.Id);
            }

            _stream.ResumeStream();
        }
Ejemplo n.º 4
0
 public void Pause()
 {
     _stream.PauseStream();
 }