This project is read-only.

Tracing

Trace each call on the Rx interfaces IObservable, IObserver and IDisposable.
Source code directory: ObservableTrace
Rx Forum links:
A simple trace method
Marble Diagram Generator

Example 1

Trace the interfaces on a single trace point.
Observable.Range(0, 2).Trace(x => Console.WriteLine(x)).Repeat(2).Subscribe();
1: Subscribe()
1: OnNext(0)
1: OnNext(1)
1: OnCompleted()
1: Dispose()
2: Subscribe()
2: OnNext(0)
2: OnNext(1)
2: OnCompleted()
2: Dispose()

Example 2

Trace all the Rx interfaces on an observable expression.
ObservableTrace.Trace( () => Observable.Range(0, 2).Repeat(2) )
.Subscribe(x => Console.WriteLine(x));
Repeat 0: Subscribe()
Range 1: Subscribe()
Range 1: OnNext(0)
Repeat 0: OnNext(0)
Range 1: OnNext(1)
Repeat 0: OnNext(1)
Range 1: OnCompleted()
Range 2: Subscribe()
Range 2: OnNext(0)
Repeat 0: OnNext(0)
Range 2: OnNext(1)
Range 1: Dispose()
Repeat 0: OnNext(1)
Range 2: OnCompleted()
Range 2: Dispose()
Repeat 0: OnCompleted()

Last edited Feb 1, 2010 at 8:06 AM by SteffenZeidler, version 5

Comments

No comments yet.