返回源可观测序列中的值,直到另一个可观测序列生成值。
Namespace:System.Reactive.Linq
装配: System.Reactive.dll) 中的 System.Reactive (
语法
'Declaration
<ExtensionAttribute> _
Public Shared Function TakeUntil(Of TSource, TOther) ( _
source As IObservable(Of TSource), _
other As IObservable(Of TOther) _
) As IObservable(Of TSource)
'Usage
Dim source As IObservable(Of TSource)
Dim other As IObservable(Of TOther)
Dim returnValue As IObservable(Of TSource)
returnValue = source.TakeUntil(other)
public static IObservable<TSource> TakeUntil<TSource, TOther>(
this IObservable<TSource> source,
IObservable<TOther> other
)
[ExtensionAttribute]
public:
generic<typename TSource, typename TOther>
static IObservable<TSource>^ TakeUntil(
IObservable<TSource>^ source,
IObservable<TOther>^ other
)
static member TakeUntil :
source:IObservable<'TSource> *
other:IObservable<'TOther> -> IObservable<'TSource>
JScript does not support generic types and methods.
类型参数
- TSource
源的类型。
- TOther
另一种类型。
参数
- source
类型: System.IObservable<TSource>
要为其传播元素的源序列。
- 其他
类型: System.IObservable<TOther>
终止源序列元素传播的可观测序列。
返回值
类型: System.IObservable<TSource>
一个可观测序列,包含源序列的元素,一直持续到另一个序列中断了进一步传播的点。
使用说明
在 Visual Basic 和 C# 中,可以在 IObservable<TSource> 类型的任何对象上调用此方法作为实例方法。 当使用实例方法语法调用此方法时,请省略第一个参数。 有关详细信息,请参阅或。