Skip to content

Instantly share code, notes, and snippets.

@neuecc
Created May 10, 2016 08:13
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neuecc/6cf487ea4e894783ec5a8bc7676f3de3 to your computer and use it in GitHub Desktop.
Save neuecc/6cf487ea4e894783ec5a8bc7676f3de3 to your computer and use it in GitHub Desktop.
public class Hoge
{
public Action<int, string> onSomethingWithArgs2;
public void Hoge2()
{
var source = Observable.FromEvent<Action<int, string>, Tuple<int, string>>(
h => (x, y) => h(Tuple.Create(x, y)),
h => onSomethingWithArgs2 += h,
h => onSomethingWithArgs2 -= h);
source.Select(x => x.Item1 + x.Item2).Subscribe();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment