Constrain IEntity's TId to IEquatable<TId>
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
namespace Discord
|
namespace Discord
|
||||||
{
|
{
|
||||||
public interface IEntity<TId>
|
public interface IEntity<TId>
|
||||||
|
where TId : IEquatable<TId>
|
||||||
{
|
{
|
||||||
/// <summary> Gets the unique identifier for this object. </summary>
|
/// <summary> Gets the unique identifier for this object. </summary>
|
||||||
TId Id { get; }
|
TId Id { get; }
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
using Discord.Rest;
|
using System;
|
||||||
|
using Discord.Rest;
|
||||||
|
|
||||||
namespace Discord.Rest
|
namespace Discord.Rest
|
||||||
{
|
{
|
||||||
internal abstract class Entity<T> : IEntity<T>
|
internal abstract class Entity<T> : IEntity<T>
|
||||||
|
where T : IEquatable<T>
|
||||||
{
|
{
|
||||||
public T Id { get; }
|
public T Id { get; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user