Skip to content

,System.Func,ReactiveUI.Extensions.Async.IObservableAsync{--0}})}

SubjectMixins.MapValues(ISubjectAsync, Func, IObservableAsync>) method

Defined in

Type: SubjectMixins Namespace: ReactiveUI.Extensions.Async Assembly: ReactiveUI.Extensions.dll

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481

public static ISubjectAsync<T> MapValues<T>(this ISubjectAsync<T> @this, Func<IObservableAsync<T>, IObservableAsync<T>> mapper)

View source

Summary: Creates a new subject that applies a transformation to the values of the source subject using the specified mapping function.

Type parameters

NameDescription
TThe type of the elements processed by the subject.

Parameters

NameTypeDescription
this[ISubjectAsync](#The source subject whose values are to be mapped.
mapperFunc, IObservableAsync>A function that takes an asynchronous observable of type T and returns a transformed asynchronous observable of type T. This function defines how the values are mapped.

Returns: ISubjectAsync -- A subject that emits values transformed by the specified mapping function.

Remarks

The returned subject reflects the mapped values of the original subject. Subscribers to the returned subject will observe the transformed sequence as defined by the mapper function. The mapping is applied to all values published by the source subject.