Export (0) Print
Expand All
Expand Minimize

Observable.ToAsync(Of TSource) Method (Action(Of TSource))

Converts the function into an asynchronous function.

Namespace:  System.Reactive.Linq
Assembly:  System.Reactive (in System.Reactive.dll)

'Declaration
<ExtensionAttribute> _
Public Shared Function ToAsync(Of TSource) ( _
	action As Action(Of TSource) _
) As Func(Of TSource, IObservable(Of Unit))
'Usage
Dim action As Action(Of TSource)
Dim returnValue As Func(Of TSource, IObservable(Of Unit))

returnValue = action.ToAsync()

Type Parameters

TSource

The type of source.

Parameters

action
Type: System.Action(Of TSource)
The action used to synchronization.

Return Value

Type: System.Func(Of TSource, IObservable(Of Unit))
The function into an asynchronous function.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Action(Of TSource). When you use instance method syntax to call this method, omit the first parameter. For more information, see http://msdn.microsoft.com/en-us/library/bb384936(v=vs.103).aspx or http://msdn.microsoft.com/en-us/library/bb383977(v=vs.103).aspx.
Show:
© 2014 Microsoft