Class TemplateModelEqualityComparer
An System.Collections.Generic.IEqualityComparer<> implementation
Inheritance
System.Object
TemplateModelEqualityComparer
Implements
System.Collections.Generic.IEqualityComparer<TemplateModel>
Namespace: EPiServer.DataAbstraction
Assembly: EPiServer.Cms.AspNetCore.Templating.dll
Version: 12.0.3Syntax
public sealed class TemplateModelEqualityComparer : Object, IEqualityComparer<TemplateModel>
Constructors
TemplateModelEqualityComparer()
Declaration
public TemplateModelEqualityComparer()
Fields
Instance
A singleton comparer instance
Declaration
public static readonly TemplateModelEqualityComparer Instance
Field Value
Type | Description |
---|---|
TemplateModelEqualityComparer |
Methods
Equals(TemplateModel, TemplateModel)
Compares the property values of two TemplateModel instances to check for equality.
Declaration
public bool Equals(TemplateModel x, TemplateModel y)
Parameters
Type | Name | Description |
---|---|---|
TemplateModel | x | |
TemplateModel | y |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
The inherited and read only statuses are not considered in the comparison.
GetHashCode(TemplateModel)
Creates a hashcode for a template model
Declaration
public int GetHashCode(TemplateModel obj)
Parameters
Type | Name | Description |
---|---|---|
TemplateModel | obj |
Returns
Type | Description |
---|---|
System.Int32 |
Implements
System.Collections.Generic.IEqualityComparer<>