Observable.Generate<TState, TResult> Method (TState, Func<TState, Boolean>, Func<TState, TResult>, Func<TState, TState>)

March 22, 2012

Generates an observable sequence by iterating a state from an initial state until the condition fails.

Namespace:  Microsoft.Phone.Reactive
Assembly:  Microsoft.Phone.Reactive (in Microsoft.Phone.Reactive.dll)

public static IObservable<TResult> Generate<TState, TResult>(
	TState initialState,
	Func<TState, bool> condition,
	Func<TState, TResult> resultSelector,
	Func<TState, TState> iterate
)

Type Parameters

TState
TResult

Parameters

initialState
Type: TState
condition
Type: System.Func<TState, Boolean>
resultSelector
Type: System.Func<TState, TResult>
iterate
Type: System.Func<TState, TState>

Return Value

Type: System.IObservable<TResult>
Returns IObservable<T>.

Windows Phone OS

Supported in: 7.1, 7.0

Windows Phone

Show: