Skip to content

Instantly share code, notes, and snippets.

@azyobuzin
Created May 3, 2014 12:18
Show Gist options
  • Save azyobuzin/1bba9e9aaf8ddae87435 to your computer and use it in GitHub Desktop.
Save azyobuzin/1bba9e9aaf8ddae87435 to your computer and use it in GitHub Desktop.
//2本接続
var observable = t.Streaming.StartObservableStream(StreamingType.User);
var disposable1 = observable.OfType<StatusMessage>().Subscribe(s => Console.WriteLine("status"));
var disposable2 = observable.OfType<EventMessage>().Subscribe(e => Console.WriteLine("event"));
//1本接続
var observable = t.Streaming.StartObservableStream(StreamingType.User).Publish();
observable.OfType<StatusMessage>().Subscribe(s => Console.WriteLine("status"));
observable.OfType<EventMessage>().Subscribe(e => Console.WriteLine("event"));
var disposable = observable.Connect();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment