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