AsyncEnumerable.DefaultIfEmpty Methode

Definitie

Overloads

Name Description
DefaultIfEmpty<TSource>(IAsyncEnumerable<TSource>)

Retourneert de elementen van de opgegeven reeks of de standaardwaarde van de typeparameter als de reeks leeg is.

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

Retourneert de elementen van de opgegeven reeks of de opgegeven waarde als de reeks leeg is.

DefaultIfEmpty<TSource>(IAsyncEnumerable<TSource>)

Bron:
DefaultIfEmpty.cs
Bron:
DefaultIfEmpty.cs
Bron:
DefaultIfEmpty.cs

Retourneert de elementen van de opgegeven reeks of de standaardwaarde van de typeparameter als de reeks leeg is.

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)

Type parameters

TSource

Het type van de elementen van de bron.

Parameters

source
IAsyncEnumerable<TSource>

De reeks waarvoor een standaardwaarde moet worden geretourneerd als deze leeg is.

Retouren

IAsyncEnumerable<TSource>

Een IAsyncEnumerable<T> object dat de standaardwaarde voor het TSource-type bevat als de bron leeg is, anders bron.

Uitzonderingen

source is null.

Van toepassing op

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

Bron:
DefaultIfEmpty.cs
Bron:
DefaultIfEmpty.cs
Bron:
DefaultIfEmpty.cs

Retourneert de elementen van de opgegeven reeks of de opgegeven waarde als de reeks leeg is.

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)

Type parameters

TSource

Het type van de elementen van de bron.

Parameters

source
IAsyncEnumerable<TSource>

De reeks waarvoor een standaardwaarde moet worden geretourneerd als deze leeg is.

defaultValue
TSource

De waarde die moet worden geretourneerd als de reeks leeg is.

Retouren

IAsyncEnumerable<TSource>

Een IAsyncEnumerable<T> object dat de standaardwaarde voor het TSource-type bevat als de bron leeg is, anders bron.

Uitzonderingen

source is null.

Van toepassing op