Dil

AsyncEnumerable.DefaultIfEmpty Yöntem

Tanım

Aşırı Yüklemeler

Veri Akışı Adı Description
DefaultIfEmpty<TSource>(IAsyncEnumerable<TSource>)

Belirtilen dizinin öğelerini veya dizi boşsa tür parametresinin varsayılan değerini döndürür.

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

Belirtilen dizinin öğelerini veya dizi boşsa belirtilen değeri döndürür.

DefaultIfEmpty<TSource>(IAsyncEnumerable<TSource>)

Kaynak:
DefaultIfEmpty.cs
Kaynak:
DefaultIfEmpty.cs
Kaynak:
DefaultIfEmpty.cs

Belirtilen dizinin öğelerini veya dizi boşsa tür parametresinin varsayılan değerini döndürür.

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)

Tür Parametreleri

TSource

Kaynağın öğelerinin türü.

Parametreler

source
IAsyncEnumerable<TSource>

Boşsa için varsayılan değer döndürülecek sıra.

Döndürülenler

IAsyncEnumerable<TSource>

IAsyncEnumerable<T> Kaynak boşsa TSource türü için varsayılan değeri içeren nesne; aksi takdirde kaynak.

Özel durumlar

source, null'e eşittir.

Şunlara uygulanır

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

Kaynak:
DefaultIfEmpty.cs
Kaynak:
DefaultIfEmpty.cs
Kaynak:
DefaultIfEmpty.cs

Belirtilen dizinin öğelerini veya dizi boşsa belirtilen değeri döndürür.

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)

Tür Parametreleri

TSource

Kaynağın öğelerinin türü.

Parametreler

source
IAsyncEnumerable<TSource>

Boşsa için varsayılan değer döndürülecek sıra.

defaultValue
TSource

Dizi boşsa döndürülecek değer.

Döndürülenler

IAsyncEnumerable<TSource>

IAsyncEnumerable<T> Kaynak boşsa TSource türü için varsayılan değeri içeren nesne; aksi takdirde kaynak.

Özel durumlar

source, null'e eşittir.

Şunlara uygulanır