SynchronizedKeyedCollection<K,T> Construtores

Definição

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

Sobrecargas

Nome Description
SynchronizedKeyedCollection<K,T>()

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

SynchronizedKeyedCollection<K,T>(Object)

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

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

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

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

Inicializa uma nova instância da classe com acesso sincronizado por um objeto explicitamente especificado e com chaves comparadas de SynchronizedKeyedCollection<K,T> uma maneira 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 SynchronizedKeyedCollection<K,T> classe 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 forem SynchronizedKeyedCollection<K,T> 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 com acesso sincronizado por um objeto explicitamente especificado e com chaves comparadas de SynchronizedKeyedCollection<K,T> uma maneira 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> tipo K usado para comparar objetos de chave do tipo K para igualdade.

Exceções

syncRoot é null ou 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 de 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 com acesso sincronizado por um objeto explicitamente especificado e com chaves comparadas de SynchronizedKeyedCollection<K,T> uma maneira 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> tipo K usado para comparar objetos de chave do tipo K para igualdade.

dictionaryCreationThreshold
Int32

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

Exceções

syncRoot é null ou comparer é null.

dictionaryCreationThreshold é menor que -1.

Comentários

A configuração dictionaryCreationThreshold para -1 atribui o MaxValue (2.147.483.647; 0x7FFFFFFF hexadecimal) a ele.

Aplica-se a