Udostępnij za pośrednictwem


IndexComparer Class

Definition

An implementation of IComparer<T> and IEqualityComparer<T> to compare IReadOnlyIndex instances.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public sealed class IndexComparer : System.Collections.Generic.IComparer<Microsoft.EntityFrameworkCore.Metadata.IIndex>, System.Collections.Generic.IEqualityComparer<Microsoft.EntityFrameworkCore.Metadata.IIndex>
public sealed class IndexComparer : System.Collections.Generic.IComparer<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyIndex>, System.Collections.Generic.IEqualityComparer<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyIndex>
type IndexComparer = class
    interface IEqualityComparer<IIndex>
    interface IComparer<IIndex>
type IndexComparer = class
    interface IEqualityComparer<IReadOnlyIndex>
    interface IComparer<IReadOnlyIndex>
Public NotInheritable Class IndexComparer
Implements IComparer(Of IIndex), IEqualityComparer(Of IIndex)
Public NotInheritable Class IndexComparer
Implements IComparer(Of IReadOnlyIndex), IEqualityComparer(Of IReadOnlyIndex)
Inheritance
IndexComparer
Implements

Remarks

See Implementation of database providers and extensions for more information and examples.

Fields

Instance

The singleton instance of the comparer to use.

Methods

Compare(IIndex, IIndex)

Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.

Compare(IReadOnlyIndex, IReadOnlyIndex)

Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.

Equals(IIndex, IIndex)

Determines whether the specified objects are equal.

Equals(IReadOnlyIndex, IReadOnlyIndex)

Determines whether the specified objects are equal.

GetHashCode(IIndex)

Returns a hash code for the specified object.

GetHashCode(IReadOnlyIndex)

Returns a hash code for the specified object.

Applies to