concept Create in category .net

appears as: Create
Rx.NET in Action

This is an excerpt from Manning's book Rx.NET in Action.

As with the ObservableBase you used previously, the Create method does all the boilerplate for you. It creates an observable instance—of type AnonymousObservable—and attaches the delegate you provided (as a lambda expression, in this case) as the observable Subscribe method.

Observable.Create takes it even further, and allows you to return not only an IDisposable that you create, but also an Action. The provided Action can hold your cleanup code, and after it returns, the Create method will wrap the Action inside an IDisposable object that it creates by using Disposable.Create. If you return null, Rx will create an empty disposable for you.

Figure 5.2. The asynchronous version of the Create operator