KeyComparer Classe
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Implementazione di IComparer<T> e IEqualityComparer<T> per confrontare IReadOnlyKey le istanze.
Questo tipo viene in genere usato dai provider di database (e da altre estensioni). In genere non viene usato nel codice dell'applicazione.
[System.Runtime.CompilerServices.Nullable(0)]
public sealed class KeyComparer : System.Collections.Generic.IComparer<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey>, System.Collections.Generic.IEqualityComparer<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey>
public sealed class KeyComparer : System.Collections.Generic.IComparer<Microsoft.EntityFrameworkCore.Metadata.IKey>, System.Collections.Generic.IEqualityComparer<Microsoft.EntityFrameworkCore.Metadata.IKey>
public sealed class KeyComparer : System.Collections.Generic.IComparer<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey>, System.Collections.Generic.IEqualityComparer<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey>
[<System.Runtime.CompilerServices.Nullable(0)>]
type KeyComparer = class
interface IEqualityComparer<IReadOnlyKey>
interface IComparer<IReadOnlyKey>
type KeyComparer = class
interface IEqualityComparer<IKey>
interface IComparer<IKey>
type KeyComparer = class
interface IEqualityComparer<IReadOnlyKey>
interface IComparer<IReadOnlyKey>
Public NotInheritable Class KeyComparer
Implements IComparer(Of IReadOnlyKey), IEqualityComparer(Of IReadOnlyKey)
Public NotInheritable Class KeyComparer
Implements IComparer(Of IKey), IEqualityComparer(Of IKey)
- Ereditarietà
-
KeyComparer
- Attributi
- Implementazioni
Commenti
Per altre informazioni ed esempi, vedere Implementazione di provider di database ed estensioni .
Campi
| Nome | Descrizione |
|---|---|
| Instance |
Istanza singleton dell'operatore di confronto da usare. |
Metodi
| Nome | Descrizione |
|---|---|
| Compare(IKey, IKey) |
Confronta due oggetti e restituisce un valore che indica se uno è minore, uguale o maggiore dell'altro. |
| Compare(IReadOnlyKey, IReadOnlyKey) |
Confronta due oggetti e restituisce un valore che indica se uno è minore, uguale o maggiore dell'altro. |
| Equals(IKey, IKey) |
Determina se gli oggetti specificati sono uguali. |
| Equals(IReadOnlyKey, IReadOnlyKey) |
Determina se gli oggetti specificati sono uguali. |
| GetHashCode(IKey) |
Restituisce un codice hash per l'oggetto specificato. |
| GetHashCode(IReadOnlyKey) |
Restituisce un codice hash per l'oggetto specificato. |