語言

DbRawSqlQuery<TElement>.ToDictionaryAsync 方法

定義

多載

名稱 Description
ToDictionaryAsync<TKey,TResult>(Func<TElement,TKey>, Func<TElement,TResult>, IEqualityComparer<TKey>, CancellationToken)

Dictionary<TKey,TValue>根據指定的索引鍵選取器函式、比較子和元素選取器函式,以非同步方式列舉查詢來建立 。

ToDictionaryAsync<TKey,TResult>(Func<TElement,TKey>, Func<TElement,TResult>, CancellationToken)

Dictionary<TKey,TValue>根據指定的索引鍵選取器和元素選取器函式,以非同步方式列舉查詢來建立 。

ToDictionaryAsync<TKey,TResult>(Func<TElement,TKey>, Func<TElement,TResult>, IEqualityComparer<TKey>)

Dictionary<TKey,TValue>根據指定的索引鍵選取器函式、比較子和元素選取器函式,以非同步方式列舉查詢來建立 。

ToDictionaryAsync<TKey,TResult>(Func<TElement,TKey>, Func<TElement,TResult>)

Dictionary<TKey,TValue>根據指定的索引鍵選取器和元素選取器函式,以非同步方式列舉查詢來建立 。

ToDictionaryAsync<TKey>(Func<TElement,TKey>, IEqualityComparer<TKey>, CancellationToken)

Dictionary<TKey,TValue>根據指定的索引鍵選取器函式和比較子,以非同步方式列舉查詢來建立 。

ToDictionaryAsync<TKey>(Func<TElement,TKey>)

Dictionary<TKey,TValue>根據指定的索引鍵選取器函式,以非同步方式列舉查詢來建立 。

ToDictionaryAsync<TKey>(Func<TElement,TKey>, IEqualityComparer<TKey>)

Dictionary<TKey,TValue>根據指定的索引鍵選取器函式和比較子,以非同步方式列舉查詢來建立 。

ToDictionaryAsync<TKey>(Func<TElement,TKey>, CancellationToken)

Dictionary<TKey,TValue>根據指定的索引鍵選取器函式,以非同步方式列舉查詢來建立 。

ToDictionaryAsync<TKey,TResult>(Func<TElement,TKey>, Func<TElement,TResult>, IEqualityComparer<TKey>, CancellationToken)

Dictionary<TKey,TValue>根據指定的索引鍵選取器函式、比較子和元素選取器函式,以非同步方式列舉查詢來建立 。

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<TKey,TResult>> ToDictionaryAsync<TKey,TResult> (Func<TElement,TKey> keySelector, Func<TElement,TResult> elementSelector, System.Collections.Generic.IEqualityComparer<TKey> comparer, System.Threading.CancellationToken cancellationToken);
member this.ToDictionaryAsync : Func<'Element, 'Key> * Func<'Element, 'Result> * System.Collections.Generic.IEqualityComparer<'Key> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<'Key, 'Result>>

類型參數

TKey

所 keySelector 傳回之索引鍵的類型。

TResult

elementSelector 所傳回值的型別。

參數

keySelector
Func<TElement,TKey>

用來從各個項目擷取索引鍵的函式。

elementSelector
Func<TElement,TResult>

用來從每個項目產生結果項目值的轉換函式。

comparer
IEqualityComparer<TKey>

用來比較金鑰的 IEqualityComparer<T>。

cancellationToken
CancellationToken

等候 CancellationToken 工作完成時要觀察的 。

傳回

Task<Dictionary<TKey,TResult>>

代表非同步作業的工作。 工作結果包含 , Dictionary<TKey,TValue> 其中包含從輸入序列選取的類型 TResult 值。

屬性

備註

不支援相同內容實例上的多個作用中作業。 使用 'await' 來確保任何非同步作業都已完成,然後再在此內容上呼叫另一個方法。

適用於

ToDictionaryAsync<TKey,TResult>(Func<TElement,TKey>, Func<TElement,TResult>, CancellationToken)

Dictionary<TKey,TValue>根據指定的索引鍵選取器和元素選取器函式,以非同步方式列舉查詢來建立 。

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<TKey,TResult>> ToDictionaryAsync<TKey,TResult> (Func<TElement,TKey> keySelector, Func<TElement,TResult> elementSelector, System.Threading.CancellationToken cancellationToken);
member this.ToDictionaryAsync : Func<'Element, 'Key> * Func<'Element, 'Result> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<'Key, 'Result>>

類型參數

TKey

所 keySelector 傳回之索引鍵的類型。

TResult

elementSelector 所傳回值的型別。

參數

keySelector
Func<TElement,TKey>

用來從各個項目擷取索引鍵的函式。

elementSelector
Func<TElement,TResult>

用來從每個項目產生結果項目值的轉換函式。

cancellationToken
CancellationToken

等候 CancellationToken 工作完成時要觀察的 。

傳回

Task<Dictionary<TKey,TResult>>

代表非同步作業的工作。 工作結果包含 , Dictionary<TKey,TValue> 其中包含從查詢選取的類型 TResult 值。

屬性

備註

不支援相同內容實例上的多個作用中作業。 使用 'await' 來確保任何非同步作業都已完成,然後再在此內容上呼叫另一個方法。

適用於

ToDictionaryAsync<TKey,TResult>(Func<TElement,TKey>, Func<TElement,TResult>, IEqualityComparer<TKey>)

Dictionary<TKey,TValue>根據指定的索引鍵選取器函式、比較子和元素選取器函式,以非同步方式列舉查詢來建立 。

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<TKey,TResult>> ToDictionaryAsync<TKey,TResult> (Func<TElement,TKey> keySelector, Func<TElement,TResult> elementSelector, System.Collections.Generic.IEqualityComparer<TKey> comparer);
member this.ToDictionaryAsync : Func<'Element, 'Key> * Func<'Element, 'Result> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<'Key, 'Result>>
Public Function ToDictionaryAsync(Of TKey, TResult) (keySelector As Func(Of TElement, TKey), elementSelector As Func(Of TElement, TResult), comparer As IEqualityComparer(Of TKey)) As Task(Of Dictionary(Of TKey, TResult))

類型參數

TKey

所 keySelector 傳回之索引鍵的類型。

TResult

elementSelector 所傳回值的型別。

參數

keySelector
Func<TElement,TKey>

用來從各個項目擷取索引鍵的函式。

elementSelector
Func<TElement,TResult>

用來從每個項目產生結果項目值的轉換函式。

comparer
IEqualityComparer<TKey>

用來比較金鑰的 IEqualityComparer<T>。

傳回

Task<Dictionary<TKey,TResult>>

代表非同步作業的工作。 工作結果包含 , Dictionary<TKey,TValue> 其中包含從輸入序列選取的類型 TResult 值。

屬性

備註

不支援相同內容實例上的多個作用中作業。 使用 'await' 來確保任何非同步作業都已完成,然後再在此內容上呼叫另一個方法。

適用於

ToDictionaryAsync<TKey,TResult>(Func<TElement,TKey>, Func<TElement,TResult>)

Dictionary<TKey,TValue>根據指定的索引鍵選取器和元素選取器函式,以非同步方式列舉查詢來建立 。

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<TKey,TResult>> ToDictionaryAsync<TKey,TResult> (Func<TElement,TKey> keySelector, Func<TElement,TResult> elementSelector);
member this.ToDictionaryAsync : Func<'Element, 'Key> * Func<'Element, 'Result> -> System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<'Key, 'Result>>
Public Function ToDictionaryAsync(Of TKey, TResult) (keySelector As Func(Of TElement, TKey), elementSelector As Func(Of TElement, TResult)) As Task(Of Dictionary(Of TKey, TResult))

類型參數

TKey

所 keySelector 傳回之索引鍵的類型。

TResult

elementSelector 所傳回值的型別。

參數

keySelector
Func<TElement,TKey>

用來從各個項目擷取索引鍵的函式。

elementSelector
Func<TElement,TResult>

用來從每個項目產生結果項目值的轉換函式。

傳回

Task<Dictionary<TKey,TResult>>

代表非同步作業的工作。 工作結果包含 , Dictionary<TKey,TValue> 其中包含從查詢選取的類型 TResult 值。

屬性

備註

不支援相同內容實例上的多個作用中作業。 使用 'await' 來確保任何非同步作業都已完成,然後再在此內容上呼叫另一個方法。

適用於

ToDictionaryAsync<TKey>(Func<TElement,TKey>, IEqualityComparer<TKey>, CancellationToken)

Dictionary<TKey,TValue>根據指定的索引鍵選取器函式和比較子,以非同步方式列舉查詢來建立 。

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<TKey,TElement>> ToDictionaryAsync<TKey> (Func<TElement,TKey> keySelector, System.Collections.Generic.IEqualityComparer<TKey> comparer, System.Threading.CancellationToken cancellationToken);
member this.ToDictionaryAsync : Func<'Element, 'Key> * System.Collections.Generic.IEqualityComparer<'Key> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<'Key, 'Element>>

類型參數

TKey

所 keySelector 傳回之索引鍵的類型。

參數

keySelector
Func<TElement,TKey>

用來從各個項目擷取索引鍵的函式。

comparer
IEqualityComparer<TKey>

用來比較金鑰的 IEqualityComparer<T>。

cancellationToken
CancellationToken

等候 CancellationToken 工作完成時要觀察的 。

傳回

Task<Dictionary<TKey,TElement>>

代表非同步作業的工作。 工作結果包含 Dictionary<TKey,TValue> ,其中包含選取的索引鍵和值。

屬性

備註

不支援相同內容實例上的多個作用中作業。 使用 'await' 來確保任何非同步作業都已完成,然後再在此內容上呼叫另一個方法。

適用於

ToDictionaryAsync<TKey>(Func<TElement,TKey>)

Dictionary<TKey,TValue>根據指定的索引鍵選取器函式,以非同步方式列舉查詢來建立 。

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<TKey,TElement>> ToDictionaryAsync<TKey> (Func<TElement,TKey> keySelector);
member this.ToDictionaryAsync : Func<'Element, 'Key> -> System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<'Key, 'Element>>
Public Function ToDictionaryAsync(Of TKey) (keySelector As Func(Of TElement, TKey)) As Task(Of Dictionary(Of TKey, TElement))

類型參數

TKey

所 keySelector 傳回之索引鍵的類型。

參數

keySelector
Func<TElement,TKey>

用來從各個項目擷取索引鍵的函式。

傳回

Task<Dictionary<TKey,TElement>>

代表非同步作業的工作。 工作結果包含 Dictionary<TKey,TValue> ,其中包含選取的索引鍵和值。

屬性

備註

不支援相同內容實例上的多個作用中作業。 使用 'await' 來確保任何非同步作業都已完成,然後再在此內容上呼叫另一個方法。

適用於

ToDictionaryAsync<TKey>(Func<TElement,TKey>, IEqualityComparer<TKey>)

Dictionary<TKey,TValue>根據指定的索引鍵選取器函式和比較子,以非同步方式列舉查詢來建立 。

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<TKey,TElement>> ToDictionaryAsync<TKey> (Func<TElement,TKey> keySelector, System.Collections.Generic.IEqualityComparer<TKey> comparer);
member this.ToDictionaryAsync : Func<'Element, 'Key> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<'Key, 'Element>>
Public Function ToDictionaryAsync(Of TKey) (keySelector As Func(Of TElement, TKey), comparer As IEqualityComparer(Of TKey)) As Task(Of Dictionary(Of TKey, TElement))

類型參數

TKey

所 keySelector 傳回之索引鍵的類型。

參數

keySelector
Func<TElement,TKey>

用來從各個項目擷取索引鍵的函式。

comparer
IEqualityComparer<TKey>

用來比較金鑰的 IEqualityComparer<T>。

傳回

Task<Dictionary<TKey,TElement>>

代表非同步作業的工作。 工作結果包含 Dictionary<TKey,TValue> ,其中包含選取的索引鍵和值。

屬性

備註

不支援相同內容實例上的多個作用中作業。 使用 'await' 來確保任何非同步作業都已完成,然後再在此內容上呼叫另一個方法。

適用於

ToDictionaryAsync<TKey>(Func<TElement,TKey>, CancellationToken)

Dictionary<TKey,TValue>根據指定的索引鍵選取器函式,以非同步方式列舉查詢來建立 。

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<TKey,TElement>> ToDictionaryAsync<TKey> (Func<TElement,TKey> keySelector, System.Threading.CancellationToken cancellationToken);
member this.ToDictionaryAsync : Func<'Element, 'Key> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<'Key, 'Element>>

類型參數

TKey

所 keySelector 傳回之索引鍵的類型。

參數

keySelector
Func<TElement,TKey>

用來從各個項目擷取索引鍵的函式。

cancellationToken
CancellationToken

等候 CancellationToken 工作完成時要觀察的 。

傳回

Task<Dictionary<TKey,TElement>>

代表非同步作業的工作。 工作結果包含 Dictionary<TKey,TValue> ,其中包含選取的索引鍵和值。

屬性

備註

不支援相同內容實例上的多個作用中作業。 使用 'await' 來確保任何非同步作業都已完成,然後再在此內容上呼叫另一個方法。

適用於