Skip to content

,System.Func{--0,System.Boolean})} ,System.Func{--0,System.Int32,System.Boolean})}

Observable.TakeWhile(IObservable, Func) method

Defined in

Type: Observable Namespace: System.Reactive.Linq Assembly: System.Reactive.dll

Applies to

net8.0, net8.0-windows10.0.19041, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.0

Overloads

  • 1. public static IObservable<TSource> TakeWhile<TSource>(this IObservable<TSource> source, Func<TSource, bool> predicate)
  • 2. public static IObservable<TSource> TakeWhile<TSource>(this IObservable<TSource> source, Func<TSource, int, bool> predicate)

1. Overload

public static IObservable<TSource> TakeWhile<TSource>(this IObservable<TSource> source, Func<TSource, bool> predicate)

Type parameters

NameDescription
TSource--

Parameters

NameTypeDescription
sourceIObservable--
predicateFunc--

Returns: IObservable

2. Overload

public static IObservable<TSource> TakeWhile<TSource>(this IObservable<TSource> source, Func<TSource, int, bool> predicate)

Type parameters

NameDescription
TSource--

Parameters

NameTypeDescription
sourceIObservable--
predicateFunc--

Returns: IObservable