Class MapOperator
Extension methods implementing the map operator.
public static class MapOperator
- Inheritance
-
System.ObjectMapOperator
Methods
Map<TSource, TResult>(Observable<TSource>, Func<TSource, int, TResult>)
Applies project to each value emitted by source, along with the
zero-based index of that emission, and emits the resulting value in its place. Errors and completion
are passed through unchanged.
public static Observable<TResult> Map<TSource, TResult>(this Observable<TSource> source, Func<TSource, int, TResult> project)
Parameters
sourceObservable<TSource>The source sequence.
projectFunc<TSource, int, TResult>A transform function applied to each source value and its index (starting at 0).
Returns
- Observable<TResult>
An observable of the projected values.
Type Parameters
TSourceThe type of values emitted by
source.TResultThe type of values produced by
project.
Remarks
If project throws, the exception is forwarded to the subscriber via OnError
instead of propagating synchronously out of Subscribe.
Map<TSource, TResult>(Observable<TSource>, Func<TSource, TResult>)
Applies project to each value emitted by source and emits the
resulting value in its place. Errors and completion are passed through unchanged.
public static Observable<TResult> Map<TSource, TResult>(this Observable<TSource> source, Func<TSource, TResult> project)
Parameters
sourceObservable<TSource>The source sequence.
projectFunc<TSource, TResult>A transform function applied to each source value.
Returns
- Observable<TResult>
An observable of the projected values.
Type Parameters
TSourceThe type of values emitted by
source.TResultThe type of values produced by
project.
Remarks
If project throws, the exception is forwarded to the subscriber via OnError
instead of propagating synchronously out of Subscribe.