ArrayStructuralComparer<TElement> Class

Definition

Specifies value comparison for arrays where each element pair is compared. A new array is constructed when snapshotting.

public class ArrayStructuralComparer<TElement> : Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer<TElement[]>
type ArrayStructuralComparer<'Element> = class
    inherit ValueComparer<'Element[]>
Public Class ArrayStructuralComparer(Of TElement)
Inherits ValueComparer(Of TElement())

Type Parameters

TElement

The array element type.

Inheritance
ValueComparer<TElement[]>
ArrayStructuralComparer<TElement>

Remarks

See EF Core value comparers for more information.

Constructors

ArrayStructuralComparer<TElement>()

Creates a comparer instance.

Properties

EqualsExpression

The comparison expression.

(Inherited from ValueComparer<T>)
HashCodeExpression

The hash code expression.

(Inherited from ValueComparer<T>)
SnapshotExpression

The snapshot expression.

Snapshotting is the process of creating a copy of the value into a snapshot so it can later be compared to determine if it has changed. For some types, such as collections, this needs to be a deep copy of the collection rather than just a shallow copy of the reference.

(Inherited from ValueComparer<T>)
Type

The type.

(Inherited from ValueComparer<T>)

Methods

Equals(Object, Object)

Compares the two instances to determine if they are equal.

(Inherited from ValueComparer<T>)
Equals(T, T)

Compares the two instances to determine if they are equal.

(Inherited from ValueComparer<T>)
ExtractEqualsBody(Expression, Expression)

Takes EqualsExpression and replaces the two parameters with the given expressions, returning the transformed body.

(Inherited from ValueComparer)
ExtractHashCodeBody(Expression)

Takes the HashCodeExpression and replaces the parameter with the given expression, returning the transformed body.

(Inherited from ValueComparer)
ExtractSnapshotBody(Expression)

Takes the SnapshotExpression and replaces the parameter with the given expression, returning the transformed body.

(Inherited from ValueComparer)
GetHashCode(Object)

Returns the hash code for the given instance.

(Inherited from ValueComparer<T>)
GetHashCode(T)

Returns the hash code for the given instance.

(Inherited from ValueComparer<T>)
Snapshot(Object)

Creates a snapshot of the given instance.

Snapshotting is the process of creating a copy of the value into a snapshot so it can later be compared to determine if it has changed. For some types, such as collections, this needs to be a deep copy of the collection rather than just a shallow copy of the reference.

(Inherited from ValueComparer<T>)
Snapshot(T)

Creates a snapshot of the given instance.

Snapshotting is the process of creating a copy of the value into a snapshot so it can later be compared to determine if it has changed. For some types, such as collections, this needs to be a deep copy of the collection rather than just a shallow copy of the reference.

(Inherited from ValueComparer<T>)

Extension Methods

IsDefault(ValueComparer)

Returns true if the given ValueComparer is a default EF Core implementation.

Applies to