)} ,System.Collections.Generic.IEqualityComparer{--0})} ,System.Linq.Expressions.Expression{System.Func{--0,--1}})} ,System.Linq.Expressions.Expression{System.Func{--0,--1}},System.Collections.Generic.IEqualityComparer{--1})}
Qbservable.DistinctUntilChanged(IQbservable) method¶
Defined in
Type: Qbservable
Namespace: System.Reactive.Linq
Assembly: System.Reactive.dll
Applies to
netstandard2.0
Overloads¶
- 1.
public static IQbservable<TSource> DistinctUntilChanged<TSource>(this IQbservable<TSource> source) - 2.
public static IQbservable<TSource> DistinctUntilChanged<TSource>(this IQbservable<TSource> source, IEqualityComparer<TSource> comparer) - 3.
public static IQbservable<TSource> DistinctUntilChanged<TSource, TKey>(this IQbservable<TSource> source, Expression<Func<TSource, TKey>> keySelector) - 4.
public static IQbservable<TSource> DistinctUntilChanged<TSource, TKey>(this IQbservable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey> comparer)
1. Overload¶
public static IQbservable<TSource> DistinctUntilChanged<TSource>(this IQbservable<TSource> source)
Summary: Returns an observable sequence that contains only distinct contiguous elements.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
source | [IQbservable | An observable sequence to retain distinct contiguous elements for. |
Returns: IQbservable
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source is null. |
2. Overload¶
public static IQbservable<TSource> DistinctUntilChanged<TSource>(this IQbservable<TSource> source, IEqualityComparer<TSource> comparer)
Summary: Returns an observable sequence that contains only distinct contiguous elements according to the comparer.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
source | [IQbservable | An observable sequence to retain distinct contiguous elements for. |
comparer | IEqualityComparer | Equality comparer for source elements. |
Returns: IQbservable
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or comparer is null. |
3. Overload¶
public static IQbservable<TSource> DistinctUntilChanged<TSource, TKey>(this IQbservable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
Summary: Returns an observable sequence that contains only distinct contiguous elements according to the keySelector.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
TKey | The type of the discriminator key computed for each element in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
source | [IQbservable | An observable sequence to retain distinct contiguous elements for, based on a computed key value. |
keySelector | Expression | A function to compute the comparison key for each element. |
Returns: IQbservable
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or keySelector is null. |
4. Overload¶
public static IQbservable<TSource> DistinctUntilChanged<TSource, TKey>(this IQbservable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey> comparer)
Summary: Returns an observable sequence that contains only distinct contiguous elements according to the keySelector and the comparer.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
TKey | The type of the discriminator key computed for each element in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
source | [IQbservable | An observable sequence to retain distinct contiguous elements for, based on a computed key value. |
keySelector | Expression | A function to compute the comparison key for each element. |
comparer | IEqualityComparer | Equality comparer for computed key values. |
Returns: IQbservable
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or keySelector or comparer is null. |