Let’s say, we have a class:
public class Foo
{
public string Do(int param)
{
}
}
I’d like to create an observable of values that are being produced by Do method. One way to do it would be to create an event which is being called from Do and use Observable.FromEvent to create the observable. But somehow I don’t feel good about creation of an event just for the sake of the task. Is there a better way to do it?
Matt’s answer made me thinking about this: