Member group
ToDictionaryOrException
Declaring type: EnumerableOption<T>
Namespace: System.Linq
Assembly: Raven.Core.dll
Source file: LinqExtensions.rvn
Overloads / Variants
ToDictionaryOrException
func ToDictionaryOrException<T, TKey, TValue>(keySelector: T -> TKey, elementSelector: T -> TValue) -> Result<Dictionary<TKey, TValue>, Exception>
Source file: LinqExtensions.rvn
Extension from EnumerableOption<T>.ToDictionaryOrException
Materializes projected elements as a dictionary and captures any exception as an error.
Parameters
| Name | Type | Description |
|---|---|---|
self |
IEnumerable<T> | |
keySelector |
T -> TKey | |
elementSelector |
T -> TValue |
Return value
Result<Dictionary<TKey, TValue>, Exception>
ToDictionaryOrException
func ToDictionaryOrException<T, TKey>(keySelector: T -> TKey) -> Result<Dictionary<TKey, T>, Exception>
Source file: LinqExtensions.rvn
Extension from EnumerableOption<T>.ToDictionaryOrException
Materializes the sequence as a dictionary and captures any exception as an error.
Parameters
| Name | Type | Description |
|---|---|---|
self |
IEnumerable<T> | |
keySelector |
T -> TKey |
Return value
Result<Dictionary<TKey, T>, Exception>