AsyncEnumerable.DefaultIfEmpty メソッド

定義

オーバーロード

名前 説明
DefaultIfEmpty<TSource>(IAsyncEnumerable<TSource>)

シーケンスが空の場合は、指定したシーケンスの要素または型パラメーターの既定値を返します。

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

シーケンスが空の場合は、指定したシーケンスの要素または指定した値を返します。

DefaultIfEmpty<TSource>(IAsyncEnumerable<TSource>)

ソース:
DefaultIfEmpty.cs
ソース:
DefaultIfEmpty.cs
ソース:
DefaultIfEmpty.cs

シーケンスが空の場合は、指定したシーケンスの要素または型パラメーターの既定値を返します。

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)

型パラメーター

TSource

ソースの要素の型。

パラメーター

source
IAsyncEnumerable<TSource>

空の場合に既定値を返すシーケンス。

返品

IAsyncEnumerable<TSource>

ソースが空の場合は TSource 型の既定値を格納する IAsyncEnumerable<T> オブジェクト。それ以外の場合は source。

例外

sourcenullです。

適用対象

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

ソース:
DefaultIfEmpty.cs
ソース:
DefaultIfEmpty.cs
ソース:
DefaultIfEmpty.cs

シーケンスが空の場合は、指定したシーケンスの要素または指定した値を返します。

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)

型パラメーター

TSource

ソースの要素の型。

パラメーター

source
IAsyncEnumerable<TSource>

空の場合に既定値を返すシーケンス。

defaultValue
TSource

シーケンスが空の場合に返す値。

返品

IAsyncEnumerable<TSource>

ソースが空の場合は TSource 型の既定値を格納する IAsyncEnumerable<T> オブジェクト。それ以外の場合は source。

例外

sourcenullです。

適用対象