Export (0) Print
Expand All

Qbservable.Generate<TState, TResult> Method (IQbservableProvider, TState, Expression<Func<TState, Boolean>>, Expression<Func<TState, TState>>, Expression<Func<TState, TResult>>, Expression<Func<TState, TimeSpan>>, IScheduler)

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

Namespace:  System.Reactive.Linq
Assembly:  System.Reactive.Providers (in System.Reactive.Providers.dll)

public static IQbservable<TResult> Generate<TState, TResult>(
	this IQbservableProvider provider,
	TState initialState,
	Expression<Func<TState, bool>> condition,
	Expression<Func<TState, TState>> iterate,
	Expression<Func<TState, TResult>> resultSelector,
	Expression<Func<TState, TimeSpan>> timeSelector,
	IScheduler scheduler
)

Type Parameters

TState

The type of state.

TResult

The type of result.

Parameters

provider
Type: System.Reactive.Linq.IQbservableProvider
The local Qbservable provider.
initialState
Type: TState
The initial state.
condition
Type: System.Linq.Expressions.Expression<Func<TState, Boolean>>
The condition to terminate generation.
iterate
Type: System.Linq.Expressions.Expression<Func<TState, TState>>
The iteration step function.
resultSelector
Type: System.Linq.Expressions.Expression<Func<TState, TResult>>
The selector function for results produced in the sequence.
timeSelector
Type: System.Linq.Expressions.Expression<Func<TState, TimeSpan>>
The time selector function to control the speed of values being produced each iteration.
scheduler
Type: System.Reactive.Concurrency.IScheduler
The scheduler on which to run the generator loop.

Return Value

Type: System.Reactive.Linq.IQbservable<TResult>
The generated sequence.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IQbservableProvider. When you use instance method syntax to call this method, omit the first parameter. For more information, see http://msdn.microsoft.com/en-us/library/bb384936(v=vs.103).aspx or http://msdn.microsoft.com/en-us/library/bb383977(v=vs.103).aspx.
Show:
© 2014 Microsoft