Exemple #1
0
 public void StartUserStream()
 {
     if (userStream != null)
     {
         StopUserStream();
     }
     userStream = new TwitterUserstream(twCon);
     userStream.StatusArrived += userStream_StatusArrived;
     userStream.Started += userStream_Started;
     userStream.Stopped += userStream_Stopped;
     userStream.Start(this.AllAtReply, this.TrackWord);
 }
Exemple #2
0
 public void StopUserStream()
 {
     if (userStream != null) userStream.Dispose();
     userStream = null;
     if (!MyCommon._endingFlag)
     {
         if (UserStreamStopped != null)
         {
             UserStreamStopped();
         }
     }
 }
Exemple #3
0
 public void StopUserStream()
 {
     if (userStream != null) userStream.Dispose();
     userStream = null;
     if (!MyCommon._endingFlag)
     {
         if (this.UserStreamStopped != null)
             this.UserStreamStopped(this, EventArgs.Empty);
     }
 }
Exemple #4
0
        public void StartUserStream()
        {
            var newStream = new TwitterUserstream(this.Api);

            newStream.StatusArrived += userStream_StatusArrived;
            newStream.Started += userStream_Started;
            newStream.Stopped += userStream_Stopped;

            newStream.Start(this.AllAtReply, this.TrackWord);

            var oldStream = Interlocked.Exchange(ref this.userStream, newStream);
            oldStream?.Dispose();
        }
Exemple #5
0
        public void StopUserStream()
        {
            if (UserStream != null)
            {
                UserStream.Dispose();
            }

            UserStream = null;
            if (!MyCommon.IsEnding)
            {
                if (UserStreamStopped != null)
                {
                    UserStreamStopped();
                }
            }
        }
Exemple #6
0
        public void StartUserStream()
        {
            if (UserStream != null)
            {
                StopUserStream();
            }

            UserStream = new TwitterUserstream(_twitterConnection);
            UserStream.Start(AllAtReply, TrackWord);
        }
Exemple #7
0
 public void StopUserStream()
 {
     userStream?.Dispose();
     userStream = null;
     if (!MyCommon._endingFlag)
     {
         this.UserStreamStopped?.Invoke(this, EventArgs.Empty);
     }
 }