Comparteix a través de


ImmutableArrayExtensions.ToDictionary Método

Definición

Sobrecargas

ToDictionary<TKey,T>(ImmutableArray<T>, Func<T,TKey>)

Crea un diccionario basado en el contenido de esta matriz.

ToDictionary<TKey,T>(ImmutableArray<T>, Func<T,TKey>, IEqualityComparer<TKey>)

Crea un diccionario basado en el contenido de esta matriz.

ToDictionary<TKey,TElement,T>(ImmutableArray<T>, Func<T,TKey>, Func<T,TElement>, IEqualityComparer<TKey>)

Crea un diccionario basado en el contenido de esta matriz.

ToDictionary<TKey,TElement,T>(ImmutableArray<T>, Func<T,TKey>, Func<T,TElement>)

Crea un diccionario basado en el contenido de esta matriz.

ToDictionary<TKey,T>(ImmutableArray<T>, Func<T,TKey>)

Source:
ImmutableArrayExtensions.cs
Source:
ImmutableArrayExtensions.cs
Source:
ImmutableArrayExtensions.cs

Crea un diccionario basado en el contenido de esta matriz.

public:
generic <typename TKey, typename T>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::Dictionary<TKey, T> ^ ToDictionary(System::Collections::Immutable::ImmutableArray<T> immutableArray, Func<T, TKey> ^ keySelector);
public static System.Collections.Generic.Dictionary<TKey,T> ToDictionary<TKey,T> (this System.Collections.Immutable.ImmutableArray<T> immutableArray, Func<T,TKey> keySelector);
static member ToDictionary : System.Collections.Immutable.ImmutableArray<'T> * Func<'T, 'Key> -> System.Collections.Generic.Dictionary<'Key, 'T>
<Extension()>
Public Function ToDictionary(Of TKey, T) (immutableArray As ImmutableArray(Of T), keySelector As Func(Of T, TKey)) As Dictionary(Of TKey, T)

Parámetros de tipo

TKey

Tipo de la clave.

T

Tipo de elemento incluido en la colección.

Parámetros

immutableArray
ImmutableArray<T>

Matriz desde la que crear un diccionario.

keySelector
Func<T,TKey>

Selector de claves.

Devoluciones

Dictionary<TKey,T>

Diccionario recién inicializado.

Se aplica a

ToDictionary<TKey,T>(ImmutableArray<T>, Func<T,TKey>, IEqualityComparer<TKey>)

Source:
ImmutableArrayExtensions.cs
Source:
ImmutableArrayExtensions.cs
Source:
ImmutableArrayExtensions.cs

Crea un diccionario basado en el contenido de esta matriz.

public:
generic <typename TKey, typename T>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::Dictionary<TKey, T> ^ ToDictionary(System::Collections::Immutable::ImmutableArray<T> immutableArray, Func<T, TKey> ^ keySelector, System::Collections::Generic::IEqualityComparer<TKey> ^ comparer);
public static System.Collections.Generic.Dictionary<TKey,T> ToDictionary<TKey,T> (this System.Collections.Immutable.ImmutableArray<T> immutableArray, Func<T,TKey> keySelector, System.Collections.Generic.IEqualityComparer<TKey> comparer);
public static System.Collections.Generic.Dictionary<TKey,T> ToDictionary<TKey,T> (this System.Collections.Immutable.ImmutableArray<T> immutableArray, Func<T,TKey> keySelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer);
static member ToDictionary : System.Collections.Immutable.ImmutableArray<'T> * Func<'T, 'Key> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Collections.Generic.Dictionary<'Key, 'T>
<Extension()>
Public Function ToDictionary(Of TKey, T) (immutableArray As ImmutableArray(Of T), keySelector As Func(Of T, TKey), comparer As IEqualityComparer(Of TKey)) As Dictionary(Of TKey, T)

Parámetros de tipo

TKey

Tipo de la clave.

T

Tipo de elemento incluido en la colección.

Parámetros

immutableArray
ImmutableArray<T>

Matriz desde la que crear un diccionario.

keySelector
Func<T,TKey>

Selector de claves.

comparer
IEqualityComparer<TKey>

Comparador con el que inicializar el diccionario.

Devoluciones

Dictionary<TKey,T>

Diccionario recién inicializado.

Se aplica a

ToDictionary<TKey,TElement,T>(ImmutableArray<T>, Func<T,TKey>, Func<T,TElement>, IEqualityComparer<TKey>)

Source:
ImmutableArrayExtensions.cs
Source:
ImmutableArrayExtensions.cs
Source:
ImmutableArrayExtensions.cs

Crea un diccionario basado en el contenido de esta matriz.

public:
generic <typename TKey, typename TElement, typename T>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::Dictionary<TKey, TElement> ^ ToDictionary(System::Collections::Immutable::ImmutableArray<T> immutableArray, Func<T, TKey> ^ keySelector, Func<T, TElement> ^ elementSelector, System::Collections::Generic::IEqualityComparer<TKey> ^ comparer);
public static System.Collections.Generic.Dictionary<TKey,TElement> ToDictionary<TKey,TElement,T> (this System.Collections.Immutable.ImmutableArray<T> immutableArray, Func<T,TKey> keySelector, Func<T,TElement> elementSelector, System.Collections.Generic.IEqualityComparer<TKey> comparer);
public static System.Collections.Generic.Dictionary<TKey,TElement> ToDictionary<TKey,TElement,T> (this System.Collections.Immutable.ImmutableArray<T> immutableArray, Func<T,TKey> keySelector, Func<T,TElement> elementSelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer);
static member ToDictionary : System.Collections.Immutable.ImmutableArray<'T> * Func<'T, 'Key> * Func<'T, 'Element> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Collections.Generic.Dictionary<'Key, 'Element>
<Extension()>
Public Function ToDictionary(Of TKey, TElement, T) (immutableArray As ImmutableArray(Of T), keySelector As Func(Of T, TKey), elementSelector As Func(Of T, TElement), comparer As IEqualityComparer(Of TKey)) As Dictionary(Of TKey, TElement)

Parámetros de tipo

TKey

Tipo de la clave.

TElement

El tipo del elemento.

T

Tipo de elemento incluido en la colección.

Parámetros

immutableArray
ImmutableArray<T>

Matriz desde la que crear un diccionario.

keySelector
Func<T,TKey>

Selector de claves.

elementSelector
Func<T,TElement>

Selector de elementos.

comparer
IEqualityComparer<TKey>

Comparador con el que inicializar el diccionario.

Devoluciones

Dictionary<TKey,TElement>

Diccionario recién inicializado.

Se aplica a

ToDictionary<TKey,TElement,T>(ImmutableArray<T>, Func<T,TKey>, Func<T,TElement>)

Source:
ImmutableArrayExtensions.cs
Source:
ImmutableArrayExtensions.cs
Source:
ImmutableArrayExtensions.cs

Crea un diccionario basado en el contenido de esta matriz.

public:
generic <typename TKey, typename TElement, typename T>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::Dictionary<TKey, TElement> ^ ToDictionary(System::Collections::Immutable::ImmutableArray<T> immutableArray, Func<T, TKey> ^ keySelector, Func<T, TElement> ^ elementSelector);
public static System.Collections.Generic.Dictionary<TKey,TElement> ToDictionary<TKey,TElement,T> (this System.Collections.Immutable.ImmutableArray<T> immutableArray, Func<T,TKey> keySelector, Func<T,TElement> elementSelector);
static member ToDictionary : System.Collections.Immutable.ImmutableArray<'T> * Func<'T, 'Key> * Func<'T, 'Element> -> System.Collections.Generic.Dictionary<'Key, 'Element>
<Extension()>
Public Function ToDictionary(Of TKey, TElement, T) (immutableArray As ImmutableArray(Of T), keySelector As Func(Of T, TKey), elementSelector As Func(Of T, TElement)) As Dictionary(Of TKey, TElement)

Parámetros de tipo

TKey

Tipo de la clave.

TElement

El tipo del elemento.

T

Tipo de elemento incluido en la colección.

Parámetros

immutableArray
ImmutableArray<T>

Matriz desde la que crear un diccionario.

keySelector
Func<T,TKey>

Selector de claves.

elementSelector
Func<T,TElement>

Selector de elementos.

Devoluciones

Dictionary<TKey,TElement>

Diccionario recién inicializado.

Se aplica a