[]
This method is called when an item is replaced in the collection.
[UnconditionalSuppressMessage("Trimming", "IL2072", Justification = "The properties of the items can not be trimmed since they are generated at runtime.")]
protected override Task<int> ReplaceAsyncOverride(int index, T item, CancellationToken cancellationToken)
<UnconditionalSuppressMessage("Trimming", "IL2072", Justification:="The properties of the items can not be trimmed since they are generated at runtime.")>
Protected Overrides Function ReplaceAsyncOverride(index As Integer, item As T, cancellationToken As CancellationToken) As Task(Of Integer)
| Type | Name | Description |
|---|---|---|
| int | index | The index of the replaced item. |
| T | item | The replaced item. |
| CancellationToken | cancellationToken | The cancellation token. |
| Type | Description |
|---|---|
| Task<int> |
CanReplace(int, T) must return true to enable this method.