Partager via


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

Génère une séquence observable interrogeable en itérant un état à partir d’un état initial jusqu’à ce que la condition échoue.

Namespace:System.Reactive.Linq
Assemblée: System.Reactive.Providers (en System.Reactive.Providers.dll)

Syntaxe

'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)), _
    timeSelector As Expression(Of Func(Of TState, TimeSpan)), _
    scheduler As IScheduler _
) 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 timeSelector As Expression(Of Func(Of TState, TimeSpan))
Dim scheduler As IScheduler
Dim returnValue As IQbservable(Of TResult)

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

Paramètres de type

  • TState
    Type d’état.
  • TResult
    Type de résultat.

Paramètres

  • initialState
    Type : TState
    État initial.

Valeur de retour

Type : System.Reactive.Linq.IQbservable<TResult>
Séquence générée.

Remarque sur l'utilisation

Dans Visual Basic et C#, vous pouvez appeler cette méthode en tant que méthode instance sur n’importe quel objet de type IQbservableProvider. Lorsque vous utilisez la syntaxe des méthodes d'instance pour appeler cette méthode, omettez le premier paramètre. Pour plus d'informations, consultez ou .

Voir aussi

Référence

Qbservable, classe

Générer une surcharge

Espace de noms System.Reactive.Linq