傳播可查詢的可觀察序列,其會先回應指定的第一個和第二個序列。
Namespace:System.Reactive.Linq
裝配: System.Reactive.Providers.dll) 中的 System.Reactive.Providers (
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function Amb(Of TSource) ( _
first As IQbservable(Of TSource), _
second As IObservable(Of TSource) _
) As IQbservable(Of TSource)
'Usage
Dim first As IQbservable(Of TSource)
Dim second As IObservable(Of TSource)
Dim returnValue As IQbservable(Of TSource)
returnValue = first.Amb(second)
public static IQbservable<TSource> Amb<TSource>(
this IQbservable<TSource> first,
IObservable<TSource> second
)
[ExtensionAttribute]
public:
generic<typename TSource>
static IQbservable<TSource>^ Amb(
IQbservable<TSource>^ first,
IObservable<TSource>^ second
)
static member Amb :
first:IQbservable<'TSource> *
second:IObservable<'TSource> -> IQbservable<'TSource>
JScript does not support generic types and methods.
類型參數
- TSource
來源的類型。
參數
- first
類型:System.Reactive.Linq.IQbservable< TSource>
第一個可查詢的可觀察序列。
- second
類型:System.IObservable< TSource>
第二個可查詢的可觀察序列。
傳回值
類型:System.Reactive.Linq.IQbservable< TSource>
可查詢的可觀察序列,可呈現其中一個給定序列,無論哪一個序列都先做出回應。
使用注意事項
在 Visual Basic 和 C# 中,您可以在IQbservable< TSource > 類型的任何物件上呼叫這個方法作為實例方法。 使用執行個體方法語法呼叫這個方法時,請省略第一個參數。 如需詳細資訊,請參閱 或 。