Browse Source

Merge pull request #234 from Joe4evr/IEquatable

Constrain IEntity's TId to IEquatable<TId>
tags/1.0-rc
RogueException GitHub 8 years ago
parent
commit
92e86525e0
2 changed files with 6 additions and 1 deletions
  1. +3
    -0
      src/Discord.Net/Entities/IEntity.cs
  2. +3
    -1
      src/Discord.Net/Rest/Entities/Entity.cs

+ 3
- 0
src/Discord.Net/Entities/IEntity.cs 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; }


+ 3
- 1
src/Discord.Net/Rest/Entities/Entity.cs 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; }



Loading…
Cancel
Save