ConcurrentDictionary<TKey,TValue>.TryGetAlternateLookup<TAlternateKey> Método

Definición

Obtiene una instancia de un tipo que se puede usar para realizar operaciones en un ConcurrentDictionary<TKey,TValue> mediante como TAlternateKey clave en lugar de .TKey

public:
generic <typename TAlternateKey>
 bool TryGetAlternateLookup([Runtime::InteropServices::Out] System::Collections::Concurrent::ConcurrentDictionary<TKey, TValue>::AlternateLookup<TAlternateKey> % lookup);
public bool TryGetAlternateLookup<TAlternateKey>(out System.Collections.Concurrent.ConcurrentDictionary<TKey,TValue>.AlternateLookup<TAlternateKey> lookup) where TAlternateKey : allows ref struct;
member this.TryGetAlternateLookup : AlternateLookup -> bool
Public Function TryGetAlternateLookup(Of TAlternateKey) (ByRef lookup As ConcurrentDictionary(Of TKey, TValue).AlternateLookup(Of TAlternateKey)) As Boolean

Parámetros de tipo

TAlternateKey

Tipo alternativo de una clave para realizar búsquedas.

Parámetros

lookup
ConcurrentDictionary<TKey,TValue>.AlternateLookup<TAlternateKey>

Instancia de búsqueda creada cuando el método devuelve trueo una instancia predeterminada que no se debe usar si el método devuelve false.

Devoluciones

true si se puede crear una búsqueda; de lo contrario, false.

Comentarios

Esta instancia debe usar un comparador que implemente IAlternateEqualityComparer<TAlternate,T> con TAlternateKey y TKey. Si no es así, el método devolverá false.

Se aplica a