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

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)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function Generate(Of TState, TResult) ( _
    provider As IQbservableProvider, _
    initialState As TState, _
    condition As Expression(Of Func(Of TState, Boolean)), _
    iterate As Expression(Of Func(Of TState, TState)), _
    resultSelector As Expression(Of Func(Of TState, TResult)) _
) As IQbservable(Of TResult)
'Usage
Dim provider As IQbservableProvider
Dim initialState As TState
Dim condition As Expression(Of Func(Of TState, Boolean))
Dim iterate As Expression(Of Func(Of TState, TState))
Dim resultSelector As Expression(Of Func(Of TState, TResult))
Dim returnValue As IQbservable(Of TResult)

returnValue = provider.Generate(initialState, _
    condition, iterate, resultSelector)
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
)
[ExtensionAttribute]
public:
generic<typename TState, typename TResult>
static IQbservable<TResult>^ Generate(
    IQbservableProvider^ provider, 
    TState initialState, 
    Expression<Func<TState, bool>^>^ condition, 
    Expression<Func<TState, TState>^>^ iterate, 
    Expression<Func<TState, TResult>^>^ resultSelector
)
static member Generate : 
        provider:IQbservableProvider * 
        initialState:'TState * 
        condition:Expression<Func<'TState, bool>> * 
        iterate:Expression<Func<'TState, 'TState>> * 
        resultSelector:Expression<Func<'TState, 'TResult>> -> IQbservable<'TResult> 
JScript does not support generic types and methods.

Type Parameters

  • TState
    The type of state.
  • TResult
    The type of result.

Parameters

  • initialState
    Type: TState
    The initial state.

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 or .

See Also

Reference

Qbservable Class

Generate Overload

System.Reactive.Linq Namespace