Partilhar via


Qbservable.Generate<TState, Método TResult> (IQbservableProvider, TState, Expression<Func<TState, Boolean>>, Expression<Func<TState, TState>>, Expression<Func<TState, TResult>>, Expression<Func<TState, DateTimeOffset>>)

Gera uma sequência observável que pode ser consultada iterando um estado de um estado inicial até que a condição falhe.

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

Sintaxe

'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, DateTimeOffset)) _
) 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, DateTimeOffset))
Dim returnValue As IQbservable(Of TResult)

returnValue = provider.Generate(initialState, _
    condition, iterate, resultSelector, _
    timeSelector)
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, DateTimeOffset>> timeSelector
)
[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, DateTimeOffset>^>^ timeSelector
)
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, DateTimeOffset>> -> IQbservable<'TResult> 
JScript does not support generic types and methods.

Parâmetros de tipo

  • TState
    O tipo de estado.
  • TResult
    O tipo de resultado.

Parâmetros

  • Initialstate
    Tipo: TState
    O estado inicial.

Valor Retornado

Tipo: System.Reactive.Linq.IQbservable<TResult>
A sequência gerada.

Observação de uso

No Visual Basic e no C#, você pode chamar esse método como um método de instância em qualquer objeto do tipo IQbservableProvider. Quando você usar a sintaxe de método de instância para chamar esse método, omita o primeiro parâmetro. Para obter mais informações, consulte ou .

Consulte Também

Referência

Classe Qbservable

Gerar sobrecarga

System.Reactive.Linq Namespace