Skip to content

,System.Linq.Expressions.Expression}},System.Linq.Expressions.Expression{System.Func{System.IObservable{--1},System.IObservable{--2}}})}

Qbservable.Multicast(IQbservable, Expression>>, Expression, IObservable>>) method

Defined in

Type: Qbservable Namespace: System.Reactive.Linq Assembly: System.Reactive.dll

Applies to

netstandard2.0

public static IQbservable<TResult> Multicast<TSource, TIntermediate, TResult>(this IQbservable<TSource> source, Expression<Func<ISubject<TSource, TIntermediate>>> subjectSelector, Expression<Func<IObservable<TIntermediate>, IObservable<TResult>>> selector)

Summary: Multicasts the source sequence notifications through an instantiated subject into all uses of the sequence within a selector function. Each subscription to the resulting sequence causes a separate multicast invocation, exposing the sequence resulting from the selector function's invocation. For specializations with fixed subject types, see Publish, PublishLast, and Replay.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequence.
TIntermediateThe type of the elements produced by the intermediate subject.
TResultThe type of the elements in the result sequence.

Parameters

NameTypeDescription
source[IQbservable](#Source sequence which will be multicasted in the specified selector function.
subjectSelectorExpression>>Factory function to create an intermediate subject through which the source sequence's elements will be multicast to the selector function.
selectorExpression, IObservable>>Selector function which can use the multicasted source sequence subject to the policies enforced by the created subject.

Returns: IQbservable -- An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource or subjectSelector or selector is null.