AsyncEnumerable.DefaultIfEmpty 메서드

정의

오버로드

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

시퀀스가 비어 있는 경우 지정된 시퀀스의 요소 또는 형식 매개 변수의 기본값을 반환합니다.

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

지정된 시퀀스의 요소를 반환하거나 시퀀스가 비어 있는 경우 지정된 값을 반환합니다.

DefaultIfEmpty<TSource>(IAsyncEnumerable<TSource>)

Source:
DefaultIfEmpty.cs
Source:
DefaultIfEmpty.cs
Source:
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>

IAsyncEnumerable<T> 원본이 비어 있으면 TSource 형식의 기본값이 들어 있는 개체이고, 그렇지 않으면 원본입니다.

예외

sourcenull입니다.

적용 대상

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

Source:
DefaultIfEmpty.cs
Source:
DefaultIfEmpty.cs
Source:
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>

IAsyncEnumerable<T> 원본이 비어 있으면 TSource 형식의 기본값이 들어 있는 개체이고, 그렇지 않으면 원본입니다.

예외

sourcenull입니다.

적용 대상