This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
Repositories
Datasets
Forum
实训
竞赛
大数据
应用
Register
Sign In
youys
/
Discord.Net
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
34
Wiki
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
Browse Source
Constrain IEntity's TId to IEquatable<TId>
pull/234/head
Joe4evr
8 years ago
parent
7f7fe6b3c9
commit
a326824cdb
2 changed files
with
6 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+3
-0
src/Discord.Net/Entities/IEntity.cs
+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; }
Write
Preview
Loading…
Cancel
Save