Skip to content

,System.Collections.Generic.IEnumerable{System.IObservable{System.Object}}})} }})}

ObservableEx.Create(Func, IEnumerable>>) method

Defined in

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

Applies to

netstandard2.0

Overloads

  • 1. public static IObservable<TResult> Create<TResult>(Func<IObserver<TResult>, IEnumerable<IObservable<object>>> iteratorMethod)
  • 2. public static IObservable<Unit> Create(Func<IEnumerable<IObservable<object>>> iteratorMethod)

1. Overload

Attributes: [Experimental]

public static IObservable<TResult> Create<TResult>(Func<IObserver<TResult>, IEnumerable<IObservable<object>>> iteratorMethod)

Summary: Subscribes to each observable sequence returned by the iteratorMethod in sequence and returns the observable sequence of values sent to the observer given to the iteratorMethod.

Type parameters

NameDescription
TResultThe type of the elements in the produced sequence.

Parameters

NameTypeDescription
iteratorMethodFunc, IEnumerable>>Iterator method that produces elements in the resulting sequence by calling the given observer.

Returns: IObservable -- An observable sequence obtained by running the iterator and returning the elements that were sent to the observer.

Exceptions

TypeCondition
System.ArgumentNullExceptioniteratorMethod is null.

2. Overload

Attributes: [Experimental]

public static IObservable<Unit> Create(Func<IEnumerable<IObservable<object>>> iteratorMethod)

Summary: Subscribes to each observable sequence returned by the iteratorMethod in sequence and produces a Unit value on the resulting sequence for each step of the iteration.

Parameters

NameTypeDescription
iteratorMethodFunc>>Iterator method that drives the resulting observable sequence.

Returns: IObservable -- An observable sequence obtained by running the iterator and returning Unit values for each iteration step.

Exceptions

TypeCondition
System.ArgumentNullExceptioniteratorMethod is null.