SynchronizedKeyedCollection<K,T> Construtores

Definição

Inicializa uma nova instância da classe SynchronizedKeyedCollection<K,T>.

Sobrecargas

SynchronizedKeyedCollection<K,T>()

Inicializa uma nova instância da classe SynchronizedKeyedCollection<K,T>.

SynchronizedKeyedCollection<K,T>(Object)

Inicializa uma nova instância da classe SynchronizedKeyedCollection<K,T> com acesso sincronizado por um objeto especificado explicitamente.

SynchronizedKeyedCollection<K,T>(Object, IEqualityComparer<K>)

Inicializa uma nova instância da classe SynchronizedKeyedCollection<K,T> com acesso sincronizado por um objeto explicitamente especificado e com chaves comparadas de uma forma especificada.

SynchronizedKeyedCollection<K,T>(Object, IEqualityComparer<K>, Int32)

Inicializa uma nova instância da classe SynchronizedKeyedCollection<K,T> com acesso sincronizado por um objeto explicitamente especificado e com chaves comparadas de uma forma especificada.

SynchronizedKeyedCollection<K,T>()

Origem:
SynchronizedKeyedCollection.cs
Origem:
SynchronizedKeyedCollection.cs
Origem:
SynchronizedKeyedCollection.cs

Inicializa uma nova instância da classe SynchronizedKeyedCollection<K,T>.

protected:
 SynchronizedKeyedCollection();
protected SynchronizedKeyedCollection ();
Protected Sub New ()

Aplica-se a

SynchronizedKeyedCollection<K,T>(Object)

Origem:
SynchronizedKeyedCollection.cs
Origem:
SynchronizedKeyedCollection.cs
Origem:
SynchronizedKeyedCollection.cs

Inicializa uma nova instância da classe SynchronizedKeyedCollection<K,T> com acesso sincronizado por um objeto especificado explicitamente.

protected:
 SynchronizedKeyedCollection(System::Object ^ syncRoot);
protected SynchronizedKeyedCollection (object syncRoot);
new System.Collections.Generic.SynchronizedKeyedCollection<'K, 'T> : obj -> System.Collections.Generic.SynchronizedKeyedCollection<'K, 'T>
Protected Sub New (syncRoot As Object)

Parâmetros

syncRoot
Object

O objeto usado para sincronizar o acesso à coleção thread-safe.

Exceções

syncRoot é null.

Comentários

Se várias instâncias do SynchronizedKeyedCollection<K,T> forem criadas usando o mesmo syncRoot, o acesso será protegido em todas as instâncias.

Aplica-se a

SynchronizedKeyedCollection<K,T>(Object, IEqualityComparer<K>)

Origem:
SynchronizedKeyedCollection.cs
Origem:
SynchronizedKeyedCollection.cs
Origem:
SynchronizedKeyedCollection.cs

Inicializa uma nova instância da classe SynchronizedKeyedCollection<K,T> com acesso sincronizado por um objeto explicitamente especificado e com chaves comparadas de uma forma especificada.

protected:
 SynchronizedKeyedCollection(System::Object ^ syncRoot, System::Collections::Generic::IEqualityComparer<K> ^ comparer);
protected SynchronizedKeyedCollection (object syncRoot, System.Collections.Generic.IEqualityComparer<K> comparer);
new System.Collections.Generic.SynchronizedKeyedCollection<'K, 'T> : obj * System.Collections.Generic.IEqualityComparer<'K> -> System.Collections.Generic.SynchronizedKeyedCollection<'K, 'T>
Protected Sub New (syncRoot As Object, comparer As IEqualityComparer(Of K))

Parâmetros

syncRoot
Object

O objeto usado para sincronizar o acesso à coleção thread-safe.

comparer
IEqualityComparer<K>

O IEqualityComparer<T> do tipo K usado para comparar a igualdade de objetos chave do tipo K.

Exceções

O syncRoot é null ou o comparer é null.

Comentários

O parâmetro K genérico usado pelo IEqualityComparer<T> parâmetro de entrada é o primeiro parâmetro genérico para essa classe. Isso nos permite comparar chaves quanto à igualdade de uma maneira personalizada que pode ser usada, por exemplo, para otimizar os aspectos mais críticos da comparação.

Aplica-se a

SynchronizedKeyedCollection<K,T>(Object, IEqualityComparer<K>, Int32)

Origem:
SynchronizedKeyedCollection.cs
Origem:
SynchronizedKeyedCollection.cs
Origem:
SynchronizedKeyedCollection.cs

Inicializa uma nova instância da classe SynchronizedKeyedCollection<K,T> com acesso sincronizado por um objeto explicitamente especificado e com chaves comparadas de uma forma especificada.

protected:
 SynchronizedKeyedCollection(System::Object ^ syncRoot, System::Collections::Generic::IEqualityComparer<K> ^ comparer, int dictionaryCreationThreshold);
protected SynchronizedKeyedCollection (object syncRoot, System.Collections.Generic.IEqualityComparer<K> comparer, int dictionaryCreationThreshold);
new System.Collections.Generic.SynchronizedKeyedCollection<'K, 'T> : obj * System.Collections.Generic.IEqualityComparer<'K> * int -> System.Collections.Generic.SynchronizedKeyedCollection<'K, 'T>
Protected Sub New (syncRoot As Object, comparer As IEqualityComparer(Of K), dictionaryCreationThreshold As Integer)

Parâmetros

syncRoot
Object

O objeto usado para sincronizar o acesso à coleção thread-safe.

comparer
IEqualityComparer<K>

O IEqualityComparer<T> do tipo K usado para comparar a igualdade de objetos chave do tipo K.

dictionaryCreationThreshold
Int32

O número de itens necessários para criar um dicionário para a coleção.

Exceções

O syncRoot é null ou o comparer é null.

dictionaryCreationThreshold é menor que -1.

Comentários

Definir dictionaryCreationThreshold como -1 atribui o MaxValue (2.147.483.647; 0x7FFFFFFF hexadecimal) a ele.

Aplica-se a