AsyncEnumerable.DefaultIfEmpty 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
오버로드
| 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<T> 원본이 비어 있으면 TSource 형식의 기본값이 들어 있는 개체이고, 그렇지 않으면 원본입니다.
예외
source은 null입니다.
적용 대상
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<T> 원본이 비어 있으면 TSource 형식의 기본값이 들어 있는 개체이고, 그렇지 않으면 원본입니다.
예외
source은 null입니다.