AsyncEnumerable.Shuffle<TSource> Método

Definição

Embaralha a ordem dos elementos de uma sequência.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IAsyncEnumerable<TSource> ^ Shuffle(System::Collections::Generic::IAsyncEnumerable<TSource> ^ source);
public static System.Collections.Generic.IAsyncEnumerable<TSource> Shuffle<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource> source);
static member Shuffle : System.Collections.Generic.IAsyncEnumerable<'Source> -> System.Collections.Generic.IAsyncEnumerable<'Source>
<Extension()>
Public Function Shuffle(Of TSource) (source As IAsyncEnumerable(Of TSource)) As IAsyncEnumerable(Of TSource)

Parâmetros de tipo

TSource

O tipo dos elementos de source.

Parâmetros

source
IAsyncEnumerable<TSource>

Uma sequência de valores a serem embaralhados.

Retornos

IAsyncEnumerable<TSource>

Uma sequência cujos elementos correspondem aos da sequência de entrada em ordem aleatória.

Comentários

A randomização é executada usando um gerador de número aleatório não criptograficamente seguro.

Aplica-se a