Observable.FromEventPattern<TEventArgs> Method (Type, String)
Converts a .NET event, conforming to the standard .NET event pattern, to an observable sequence, using reflection to find a static event.
Namespace: System.Reactive.Linq
Assembly: System.Reactive (in System.Reactive.dll)
Syntax
'Declaration
Public Shared Function FromEventPattern(Of TEventArgs As EventArgs) ( _
type As Type, _
eventName As String _
) As IObservable(Of EventPattern(Of TEventArgs))
'Usage
Dim type As Type
Dim eventName As String
Dim returnValue As IObservable(Of EventPattern(Of TEventArgs))
returnValue = Observable.FromEventPattern(type, _
eventName)
public static IObservable<EventPattern<TEventArgs>> FromEventPattern<TEventArgs>(
Type type,
string eventName
)
where TEventArgs : EventArgs
public:
generic<typename TEventArgs>
where TEventArgs : EventArgs
static IObservable<EventPattern<TEventArgs>^>^ FromEventPattern(
Type^ type,
String^ eventName
)
static member FromEventPattern :
type:Type *
eventName:string -> IObservable<EventPattern<'TEventArgs>> when 'TEventArgs : EventArgs
JScript does not support generic types and methods.
Type Parameters
- TEventArgs
The type of event.
Parameters
- type
Type: System.Type
The type that exposes the static event to convert.
- eventName
Type: System.String
The name of the event to convert.
Return Value
Type: System.IObservable<EventPattern<TEventArgs>>
The observable sequence that contains data representations of invocations of the underlying .NET event.