Jazyk

AsyncEnumerable.DefaultIfEmpty Metoda

Definice

Přetížení

Název Description
DefaultIfEmpty<TSource>(IAsyncEnumerable<TSource>)

Vrátí prvky zadané sekvence nebo výchozí hodnotu parametru typu, pokud je sekvence prázdná.

DefaultIfEmpty<TSource>(IAsyncEnumerable<TSource>, TSource)

Vrátí prvky zadané sekvence nebo zadané hodnoty, pokud je sekvence prázdná.

DefaultIfEmpty<TSource>(IAsyncEnumerable<TSource>)

Zdroj:
DefaultIfEmpty.cs
Zdroj:
DefaultIfEmpty.cs
Zdroj:
DefaultIfEmpty.cs

Vrátí prvky zadané sekvence nebo výchozí hodnotu parametru typu, pokud je sekvence prázdná.

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

Parametry typu

TSource

Typ prvků zdroje.

Parametry

source
IAsyncEnumerable<TSource>

Sekvence, která vrátí výchozí hodnotu, pokud je prázdná.

Návraty

IAsyncEnumerable<TSource>

Objekt IAsyncEnumerable<T> , který obsahuje výchozí hodnotu pro typ TSource, pokud je zdroj prázdný; jinak zdroj.

Výjimky

source je null.

Platí pro

DefaultIfEmpty<TSource>(IAsyncEnumerable<TSource>, TSource)

Zdroj:
DefaultIfEmpty.cs
Zdroj:
DefaultIfEmpty.cs
Zdroj:
DefaultIfEmpty.cs

Vrátí prvky zadané sekvence nebo zadané hodnoty, pokud je sekvence prázdná.

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

Parametry typu

TSource

Typ prvků zdroje.

Parametry

source
IAsyncEnumerable<TSource>

Sekvence, která vrátí výchozí hodnotu, pokud je prázdná.

defaultValue
TSource

Hodnota, která se má vrátit, pokud je sekvence prázdná.

Návraty

IAsyncEnumerable<TSource>

Objekt IAsyncEnumerable<T> , který obsahuje výchozí hodnotu pro typ TSource, pokud je zdroj prázdný; jinak zdroj.

Výjimky

source je null.

Platí pro