AsyncEnumerable.OfType<TResult>(IAsyncEnumerable<Object>) Metod

Definition

Filtrerar elementen i en IAsyncEnumerable<T> baserat på en angiven typ TResult.

public:
generic <typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IAsyncEnumerable<TResult> ^ OfType(System::Collections::Generic::IAsyncEnumerable<System::Object ^> ^ source);
public static System.Collections.Generic.IAsyncEnumerable<TResult> OfType<TResult>(this System.Collections.Generic.IAsyncEnumerable<object?> source);
static member OfType : System.Collections.Generic.IAsyncEnumerable<obj> -> System.Collections.Generic.IAsyncEnumerable<'Result>
<Extension()>
Public Function OfType(Of TResult) (source As IAsyncEnumerable(Of Object)) As IAsyncEnumerable(Of TResult)

Typparametrar

TResult

Den typ som elementen i sekvensen ska filtreras på.

Parametrar

source
IAsyncEnumerable<Object>

Vars IAsyncEnumerable<T> element ska filtreras.

Returer

IAsyncEnumerable<TResult>

En IAsyncEnumerable<T> som innehåller element från indatasekvensen av typen TResult.

Gäller för