Merge pull request #234 from Joe4evr/IEquatable
Constrain IEntity's TId to IEquatable<TId>
This commit is contained in:
@@ -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; }
|
||||
|
||||
@@ -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; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user