[]
        
(Showing Draft Content)

C1.DataCollection.IDataCollectionEx.ReplaceRangeAsync

ReplaceRangeAsync Method

ReplaceRangeAsync<T>(IDataCollection<T>, int, IEnumerable<T>, CancellationToken)

Replaces the items at the specified index by the specified items.

Declaration
[UnconditionalSuppressMessage("Trimming", "IL2075", Justification = "The members of ISupportRangeEditing<> class were explicitly annotated so this method can use them safely.")]
[DynamicDependency(DynamicallyAccessedMemberTypes.PublicMethods, typeof(ISupportRangeEditing<>))]
[UnconditionalSuppressMessage("AOT", "IL3050", Justification = "The generic type is obtained from analyzing the ISupportRangeEditing<> interface at runtime, therefore the IEnumerable<T> must be present at runtime too because it is used as a parameter in at least one of the method of that interface")]
public static Task ReplaceRangeAsync<T>(this IDataCollection<T> dataCollection, int startingIndex, IEnumerable<T> items, CancellationToken cancellationToken = default) where T : class?
<UnconditionalSuppressMessage("Trimming", "IL2075", Justification:="The members of ISupportRangeEditing<> class were explicitly annotated so this method can use them safely.")>
<DynamicDependency(DynamicallyAccessedMemberTypes.PublicMethods, GetType(ISupportRangeEditing(Of )))>
<UnconditionalSuppressMessage("AOT", "IL3050", Justification:="The generic type is obtained from analyzing the ISupportRangeEditing<> interface at runtime, therefore the IEnumerable<T> must be present at runtime too because it is used as a parameter in at least one of the method of that interface")>
Public Shared Function ReplaceRangeAsync(Of T As Class)(dataCollection As IDataCollection(Of T), startingIndex As Integer, items As IEnumerable(Of T), Optional cancellationToken As CancellationToken = Nothing) As Task
Parameters
Type Name Description
IDataCollection<T> dataCollection

The data collection.

int startingIndex

The index.

IEnumerable<T> items

The items.

CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
Task
Type Parameters
Name Description
T