Beispiel #1
0
 /// <summary>
 /// Enqueues a response.
 /// </summary>
 /// <param name="response">The response.</param>
 public void OnNext(Object response)
 {
     if (!IsCompleted)
     {
         _dispatcher.Enqueue(() =>
         {
             ContinuousObservable.OnNext(response);
         });
     }
 }
Beispiel #2
0
        /// <summary>
        /// Enqueues a completion signal.
        /// </summary>
        public void OnCompleted()
        {
            if (!IsCompleted)
            {
                IsCompleted = true;

                _dispatcher.Enqueue(() =>
                {
                    ContinuousObservable.OnCompleted();
                });

                _dispatcher.Dispose();
            }
        }
Beispiel #3
0
        /// <summary>
        /// Enqueues an error response.
        /// </summary>
        /// <param name="exception">The exception.</param>
        public void OnError(Exception exception)
        {
            if (!IsCompleted)
            {
                IsCompleted = true;

                _dispatcher.Enqueue(() =>
                {
                    ContinuousObservable.OnError(exception);
                });

                _dispatcher.Dispose();
            }
        }