HiLoValueGeneratorState.NextAsync<TValue> 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得要指派給屬性的值。
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>
要指派給屬性的值。