共用方式為


HiLoValueGeneratorState.NextAsync<TValue> 方法

定義

取得要指派給屬性的值。

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)

類型參數

TValue

正在產生之值的型別。

參數

getNewLowValue
Func<CancellationToken,Task<Int64>>

需要取得下一個低值的函式。

cancellationToken
CancellationToken

CancellationToken等候工作完成時要觀察的 。

傳回

Task<TValue>
ValueTask<TValue>

要指派給屬性的值。

例外狀況

適用於