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