ICustomStorageInterface<TState,TDelta>.ApplyUpdatesToStorage 方法

定义

将给定的增量数组应用于存储,如果存储中的版本与预期版本匹配,则返回 true。 否则,不执行任何操作并返回 false。 如果成功,则存储版本必须增加增量数。

public System.Threading.Tasks.Task<bool> ApplyUpdatesToStorage (System.Collections.Generic.IReadOnlyList<TDelta> updates, int expectedversion);
public System.Threading.Tasks.Task<bool> ApplyUpdatesToStorage (System.Collections.Generic.IReadOnlyList<TDelta> updates, int expectedVersion);
abstract member ApplyUpdatesToStorage : System.Collections.Generic.IReadOnlyList<'Delta> * int -> System.Threading.Tasks.Task<bool>
abstract member ApplyUpdatesToStorage : System.Collections.Generic.IReadOnlyList<'Delta> * int -> System.Threading.Tasks.Task<bool>
Public Function ApplyUpdatesToStorage (updates As IReadOnlyList(Of TDelta), expectedversion As Integer) As Task(Of Boolean)
Public Function ApplyUpdatesToStorage (updates As IReadOnlyList(Of TDelta), expectedVersion As Integer) As Task(Of Boolean)

参数

updates
IReadOnlyList<TDelta>
expectedversionexpectedVersion
Int32

返回

如果应用增量,则为 true;否则为 false

适用于