Qbservable.MostRecent(IQbservable, TSource) method¶
Defined in
Type: Qbservable
Namespace: System.Reactive.Linq
Assembly: System.Reactive.dll
Applies to
netstandard2.0
public static IQueryable<TSource> MostRecent<TSource>(this IQbservable<TSource> source, TSource initialValue)
Summary: Returns an enumerable sequence whose enumeration returns the most recently observed element in the source observable sequence, using the specified initial value in case no element has been sampled yet. Enumerators on the resulting sequence never block and can produce the same element repeatedly.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
source | [IQbservable | Source observable sequence. |
initialValue | TSource | Initial value that will be yielded by the enumerable sequence if no element has been sampled yet. |
Returns: IQueryable
Remarks
This operator requires the source's IQbservableProvider object (see Provider) to implement IQueryProvider.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source is null. |