Condividi tramite


HiLoValueGeneratorState.NextAsync<TValue> Metodo

Definizione

Ottiene un valore da assegnare a una proprietà.

public virtual System.Threading.Tasks.Task<TValue> NextAsync<TValue> (Func<System.Threading.CancellationToken,System.Threading.Tasks.Task<long>> getNewLowValue, System.Threading.CancellationToken cancellationToken = default);
public virtual System.Threading.Tasks.ValueTask<TValue> NextAsync<TValue> (Func<System.Threading.CancellationToken,System.Threading.Tasks.Task<long>> getNewLowValue, System.Threading.CancellationToken cancellationToken = default);
abstract member NextAsync : Func<System.Threading.CancellationToken, System.Threading.Tasks.Task<int64>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Value>
override this.NextAsync : Func<System.Threading.CancellationToken, System.Threading.Tasks.Task<int64>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Value>
abstract member NextAsync : Func<System.Threading.CancellationToken, System.Threading.Tasks.Task<int64>> * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<'Value>
override this.NextAsync : Func<System.Threading.CancellationToken, System.Threading.Tasks.Task<int64>> * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<'Value>
Public Overridable Function NextAsync(Of TValue) (getNewLowValue As Func(Of CancellationToken, Task(Of Long)), Optional cancellationToken As CancellationToken = Nothing) As Task(Of TValue)
Public Overridable Function NextAsync(Of TValue) (getNewLowValue As Func(Of CancellationToken, Task(Of Long)), Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of TValue)

Parametri di tipo

TValue

Tipo di valori generati.

Parametri

getNewLowValue
Func<CancellationToken,Task<Int64>>

Funzione per ottenere il valore basso successivo, se necessario.

cancellationToken
CancellationToken

Oggetto CancellationToken da osservare durante l'attesa del completamento dell'attività.

Restituisce

Task<TValue>
ValueTask<TValue>

Valore da assegnare a una proprietà.

Eccezioni

Si applica a