Class EntityKeyComparer
Implements the IEqualityComparer<T> for all IBaseEntity. Compares on type, canvas and ID
Implements
Inherited Members
Namespace: LemonEdge.API.Entities
Assembly: LemonEdge.API.dll
Syntax
public class EntityKeyComparer : IEqualityComparer<IBaseEntity>
Constructors
EntityKeyComparer()
Declaration
public EntityKeyComparer()
Methods
Equals(IBaseEntity, IBaseEntity)
Indicates items are equal if the type, canvas and id matches
Declaration
public bool Equals(IBaseEntity x, IBaseEntity y)
Parameters
Type | Name | Description |
---|---|---|
IBaseEntity | x | First item to compare |
IBaseEntity | y | Second item to compare |
Returns
Type | Description |
---|---|
bool | True if the type, canvas and id matches |
GetHashCode(IBaseEntity)
Hashcode for comparrison
Declaration
public int GetHashCode(IBaseEntity obj)
Parameters
Type | Name | Description |
---|---|---|
IBaseEntity | obj | The item to retrieve a hashcode for on what we compare for equality |
Returns
Type | Description |
---|---|
int | Hashcode for comparrison |