Constrain IEntity's TId to IEquatable<TId>

This commit is contained in:
Joe4evr
2016-08-27 19:41:38 +02:00
parent 7f7fe6b3c9
commit a326824cdb
2 changed files with 6 additions and 1 deletions

View File

@@ -1,6 +1,9 @@
using System;
namespace Discord
{
public interface IEntity<TId>
where TId : IEquatable<TId>
{
/// <summary> Gets the unique identifier for this object. </summary>
TId Id { get; }

View File

@@ -1,8 +1,10 @@
using Discord.Rest;
using System;
using Discord.Rest;
namespace Discord.Rest
{
internal abstract class Entity<T> : IEntity<T>
where T : IEquatable<T>
{
public T Id { get; }