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

@@ -14,7 +14,7 @@ namespace Discord
public bool RequireColons { get; }
public IReadOnlyList<ulong> RoleIds { get; }
public Emoji(ulong id, string name, bool isManaged, bool requireColons, IReadOnlyList<ulong> roleIds)
private Emoji(ulong id, string name, bool isManaged, bool requireColons, IReadOnlyList<ulong> roleIds)
{
Id = id;
Name = name;
@@ -22,7 +22,7 @@ namespace Discord
RequireColons = requireColons;
RoleIds = roleIds;
}
public static Emoji Create(Model model)
internal static Emoji Create(Model model)
{
return new Emoji(model.Id, model.Name, model.Managed, model.RequireColons, ImmutableArray.Create(model.Roles));
}

View File

@@ -7,12 +7,12 @@ namespace Discord
public string Name { get; }
public string Url { get; }
public EmbedProvider(string name, string url)
private EmbedProvider(string name, string url)
{
Name = name;
Url = url;
}
public static EmbedProvider Create(Model model)
internal static EmbedProvider Create(Model model)
{
return new EmbedProvider(model.Name, model.Url);
}

View File

@@ -9,14 +9,14 @@ namespace Discord
public int? Height { get; }
public int? Width { get; }
public EmbedThumbnail(string url, string proxyUrl, int? height, int? width)
private EmbedThumbnail(string url, string proxyUrl, int? height, int? width)
{
Url = url;
ProxyUrl = proxyUrl;
Height = height;
Width = width;
}
public static EmbedThumbnail Create(Model model)
internal static EmbedThumbnail Create(Model model)
{
return new EmbedThumbnail(model.Url, model.ProxyUrl,
model.Height.IsSpecified ? model.Height.Value : (int?)null,

View File

@@ -16,9 +16,9 @@ namespace Discord
StreamUrl = streamUrl;
StreamType = type;
}
public Game(string name)
private Game(string name)
: this(name, null, StreamType.NotStreaming) { }
public static Game Create(Model model)
internal static Game Create(Model model)
{
return new Game(model.Name,
model.StreamUrl.GetValueOrDefault(null),

View File

@@ -5,6 +5,8 @@
Unknown,
Online,
Idle,
DoNotDisturb,
Invisible,
Offline
}
}