I'm looking to create an extension method with the following signature:
public static IObservable<DialogResult> ShowDialog(this Form form);
I don't know how to get this to work. This is what I have so far:
Task<DialogResult> task = Task.Factory.StartNew(() =>
{
return form.ShowDialog();
});
return task.ToObservable();
Edit: Cool, thanks guys. I really need to read up on this stuff some more!
I imagine this would work, though I don't understand the point.