public static Task<bool> SortAsync<TKeyFrom, TKeyTo, TValueFrom, TValueTo>(
CastArray<TKeyFrom, TKeyTo> keys,
CastArray<TValueFrom, TValueTo> values,
IComparer<TKeyTo>? comparer = null,
TaskConfig? asyncConfig = null
)
where TKeyFrom : struct, new()
where TKeyTo : struct, new()
where TValueFrom : struct, new()
where TValueTo : struct, new()
Public Shared Function SortAsync(Of TKeyFrom As {Structure, New}, TKeyTo As {Structure, New}, TValueFrom As {Structure, New}, TValueTo As {Structure, New}) (
keys As CastArray(Of TKeyFrom, TKeyTo),
values As CastArray(Of TValueFrom, TValueTo),
Optional comparer As IComparer(Of TKeyTo) = Nothing,
Optional asyncConfig As TaskConfig = Nothing
) As Task(Of Boolean)public:
generic<typename TKeyFrom, typename TKeyTo, typename TValueFrom, typename TValueTo>
where TKeyFrom : value class, gcnew()
where TKeyTo : value class, gcnew()
where TValueFrom : value class, gcnew()
where TValueTo : value class, gcnew()
static Task<bool>^ SortAsync(
CastArray<TKeyFrom, TKeyTo> keys,
CastArray<TValueFrom, TValueTo> values,
IComparer<TKeyTo>^ comparer = nullptr,
TaskConfig^ asyncConfig = nullptr
)static member SortAsync :
keys : CastArray<'TKeyFrom, 'TKeyTo> *
values : CastArray<'TValueFrom, 'TValueTo> *
?comparer : IComparer<'TKeyTo> *
?asyncConfig : TaskConfig
(* Defaults:
let _comparer = defaultArg comparer null
let _asyncConfig = defaultArg asyncConfig null
*)
-> Task<bool> when 'TKeyFrom : struct, new() when 'TKeyTo : struct, new() when 'TValueFrom : struct, new() when 'TValueTo : struct, new()This method is not a blocking call even if the MaxDegreeOfParallelism property of the asyncConfig parameter is 1.
| ArgumentException | The IsNull property of values is and values has fewer elements than keys.
-or- The comparer returned inconsistent results. |
| InvalidOperationException | comparer is , and an element does not implement the IComparableT interface. |
| TaskCanceledException | The operation has been canceled and ThrowIfCanceled in asyncConfig was . This exception is thrown when the result is awaited. |