Class ListOfNullableValueTypesComparer<TConcreteCollection, TElement>
- Namespace
- MongoDB.EntityFrameworkCore.ChangeTracking
- Assembly
- MongoDB.EntityFrameworkCore.dll
A ValueComparer<T> for lists of primitive items. The list can be typed as IEnumerable<T>, but can only be used with instances that implement IList<T>.
public sealed class ListOfNullableValueTypesComparer<TConcreteCollection, TElement> : ValueComparer<IEnumerable<TElement?>>, IEqualityComparer, IEqualityComparer<object>, IEqualityComparer<IEnumerable<TElement?>> where TElement : struct
Type Parameters
TConcreteCollection
The collection type to create an index of, if needed.
TElement
The element type.
- Inheritance
-
ValueComparer<IEnumerable<TElement?>>ListOfNullableValueTypesComparer<TConcreteCollection, TElement>
- Implements
-
IEqualityComparer<IEnumerable<TElement?>>
- Inherited Members
Remarks
This comparer should be used for nullable value types. Use ListOfNullableValueTypesComparer<TConcreteCollection, TElement> for reference types and non-nullable value types.
See EF Core value comparers for more information and examples.
Constructors
- ListOfNullableValueTypesComparer(ValueComparer)
Creates a new instance of the list comparer.
Properties
- ElementComparer
The comparer to use for comparing elements.