)} ,System.Linq.Expressions.Expression})}
Qbservable.LongCount(IQbservable) method¶
Defined in
Type: Qbservable
Namespace: System.Reactive.Linq
Assembly: System.Reactive.dll
Applies to
netstandard2.0
Overloads¶
- 1.
public static IQbservable<long> LongCount<TSource>(this IQbservable<TSource> source) - 2.
public static IQbservable<long> LongCount<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, bool>> predicate)
1. Overload¶
public static IQbservable<long> LongCount<TSource>(this IQbservable<TSource> source)
Summary: Returns an observable sequence containing an Int64 that represents the total number of elements in an observable sequence.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
source | [IQbservable | An observable sequence that contains elements to be counted. |
Returns: IQbservable
Remarks
The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source is null. |
| System.OverflowException | (Asynchronous) The number of elements in the source sequence is larger than MaxValue. |
2. Overload¶
public static IQbservable<long> LongCount<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, bool>> predicate)
Summary: Returns an observable sequence containing an Int64 that represents how many elements in the specified observable sequence satisfy a condition.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
source | [IQbservable | An observable sequence that contains elements to be counted. |
predicate | Expression | A function to test each element for a condition. |
Returns: IQbservable
Remarks
The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or predicate is null. |