Observable.FromAsyncPattern Method (Func<AsyncCallback, Object, IAsyncResult>, Action<IAsyncResult>)
Converts a Begin/End invoke function pair into an asynchronous function.
Namespace: System.Reactive.Linq
Assembly: System.Reactive (in System.Reactive.dll)
Syntax
'Declaration
Public Shared Function FromAsyncPattern ( _
begin As Func(Of AsyncCallback, Object, IAsyncResult), _
end As Action(Of IAsyncResult) _
) As Func(Of IObservable(Of Unit))
'Usage
Dim begin As Func(Of AsyncCallback, Object, IAsyncResult)
Dim end As Action(Of IAsyncResult)
Dim returnValue As Func(Of IObservable(Of Unit))
returnValue = Observable.FromAsyncPattern(begin, _
end)
public static Func<IObservable<Unit>> FromAsyncPattern(
Func<AsyncCallback, Object, IAsyncResult> begin,
Action<IAsyncResult> end
)
public:
static Func<IObservable<Unit>^>^ FromAsyncPattern(
Func<AsyncCallback^, Object^, IAsyncResult^>^ begin,
Action<IAsyncResult^>^ end
)
static member FromAsyncPattern :
begin:Func<AsyncCallback, Object, IAsyncResult> *
end:Action<IAsyncResult> -> Func<IObservable<Unit>>
public static function FromAsyncPattern(
begin : Func<AsyncCallback, Object, IAsyncResult>,
end : Action<IAsyncResult>
) : Func<IObservable<Unit>>
Parameters
- begin
Type: System.Func<AsyncCallback, Object, IAsyncResult>
The begin invoke function.
- end
Type: System.Action<IAsyncResult>
The end invoke function.
Return Value
Type: System.Func<IObservable<Unit>>
A Begin/End invoke function pair.