使用 .NET 事件将可观测序列公开为对象。
              Namespace:System.Reactive.Linq
              装配: System.Reactive.dll) 中的 System.Reactive (
语法
'Declaration
<ExtensionAttribute> _
Public Shared Function ToEventPattern(Of TEventArgs As EventArgs) ( _
    source As IObservable(Of EventPattern(Of TEventArgs)) _
) As IEventPatternSource(Of TEventArgs)
'Usage
Dim source As IObservable(Of EventPattern(Of TEventArgs))
Dim returnValue As IEventPatternSource(Of TEventArgs)
returnValue = source.ToEventPattern()
public static IEventPatternSource<TEventArgs> ToEventPattern<TEventArgs>(
    this IObservable<EventPattern<TEventArgs>> source
)
where TEventArgs : EventArgs
[ExtensionAttribute]
public:
generic<typename TEventArgs>
where TEventArgs : EventArgs
static IEventPatternSource<TEventArgs>^ ToEventPattern(
    IObservable<EventPattern<TEventArgs>^>^ source
)
static member ToEventPattern : 
        source:IObservable<EventPattern<'TEventArgs>> -> IEventPatternSource<'TEventArgs>  when 'TEventArgs : EventArgs
JScript does not support generic types and methods.
类型参数
- TEventArgs
事件的类型。 
参数
- source
类型: System.IObservable<EventPattern<TEventArgs>>
可观测源序列。 
返回值
类型: System.Reactive.IEventPatternSource<TEventArgs>
事件源对象。
使用说明
在 Visual Basic 和 C# 中,可以在 任何类型为 IObservable<EventPattern<TEventArgs>> 的对象上调用此方法作为实例方法。 当使用实例方法语法调用此方法时,请省略第一个参数。 有关详细信息,请参阅或。