Concrete class prototype

This commit is contained in:
RogueException
2016-09-22 21:15:37 -03:00
parent ab42129eb9
commit 6319933ed0
394 changed files with 3648 additions and 3224 deletions

View File

@@ -0,0 +1,27 @@
using System.Diagnostics;
using Model = Discord.API.Ban;
namespace Discord.Rest
{
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
public class RestBan : IBan
{
public RestUser User { get; }
public string Reason { get; }
internal RestBan(RestUser user, string reason)
{
User = user;
Reason = reason;
}
internal static RestBan Create(DiscordRestClient client, Model model)
{
return new RestBan(RestUser.Create(client, model.User), model.Reason);
}
public override string ToString() => User.ToString();
private string DebuggerDisplay => $"{User}: {Reason}";
IUser IBan.User => User;
}
}