Started converting websocket and rpc classes

This commit is contained in:
RogueException
2016-09-28 04:12:17 -03:00
parent 0c4641ac68
commit dd86f03306
107 changed files with 1836 additions and 1882 deletions

View File

@@ -0,0 +1,23 @@
using Model = Discord.API.Presence;
namespace Discord.WebSocket
{
//TODO: C#7 Candidate for record type
internal struct SocketPresence : IPresence
{
public Game? Game { get; }
public UserStatus Status { get; }
internal SocketPresence(Game? game, UserStatus status)
{
Game = game;
Status = status;
}
internal SocketPresence Create(Model model)
{
return new SocketPresence(model.Game != null ? Discord.Game.Create(model.Game) : (Game?)null, model.Status);
}
public SocketPresence Clone() => this;
}
}