public void Dispose()
 {
     if (_userStream != null)
     {
         _userStream.StreamIsReady       -= OnStreamIsReady;
         _userStream.MessageSent         -= OnMessageSent;
         _userStream.MessageReceived     -= OnMessageReceived;
         _userStream.TweetFavouritedByMe -= OnTweetFavouritedByMe;
         _userStream.StopStream();
         _userStream = null;
     }
 }
Exemple #2
0
 public void Stop()
 {
     log.LogInformation("Stop");
     stream?.StopStream();
 }