TaskObservableExtensions.ToObservable Method (Task)

Returns an observable sequence that signals when the task completes.

Namespace:  System.Reactive.Threading.Tasks
Assembly:  System.Reactive (in System.Reactive.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function ToObservable ( _
    task As Task _
) As IObservable(Of Unit)
'Usage
Dim task As Task
Dim returnValue As IObservable(Of Unit)

returnValue = task.ToObservable()
public static IObservable<Unit> ToObservable(
    this Task task
)
[ExtensionAttribute]
public:
static IObservable<Unit>^ ToObservable(
    Task^ task
)
static member ToObservable : 
        task:Task -> IObservable<Unit> 
public static function ToObservable(
    task : Task
) : IObservable<Unit>

Parameters

Return Value

Type: System.IObservable<Unit>
An observable sequence that produces a unit value when the task completes, or propagates the exception produced by the task.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Task. When you use instance method syntax to call this method, omit the first parameter. For more information, see or .

See Also

Reference

TaskObservableExtensions Class

ToObservable Overload

System.Reactive.Threading.Tasks Namespace