Cleaned up internal entity namespaces

This commit is contained in:
RogueException
2016-08-14 14:31:33 -03:00
parent 3977e8b415
commit 65505fbfc5
46 changed files with 57 additions and 64 deletions

View File

@@ -4,6 +4,7 @@ using Discord.API.Rest;
using Discord.Net.Queue;
using Discord.Net.Rest;
using Discord.Net.WebSockets;
using Discord.WebSocket;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;

View File

@@ -3,7 +3,7 @@ using System;
using System.Threading.Tasks;
using Model = Discord.API.Application;
namespace Discord
namespace Discord.Rest
{
internal class Application : SnowflakeEntity, IApplication
{

View File

@@ -1,5 +1,4 @@
using Discord.API.Rest;
using Discord.Rest;
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
@@ -9,7 +8,7 @@ using System.Linq;
using System.Threading.Tasks;
using Model = Discord.API.Channel;
namespace Discord
namespace Discord.Rest
{
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
internal class DMChannel : SnowflakeEntity, IDMChannel

View File

@@ -1,5 +1,4 @@
using Discord.API.Rest;
using Discord.Rest;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
@@ -10,7 +9,7 @@ using System.Linq;
using System.Threading.Tasks;
using Model = Discord.API.Channel;
namespace Discord
namespace Discord.Rest
{
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
internal class GroupChannel : SnowflakeEntity, IGroupChannel

View File

@@ -1,5 +1,4 @@
using Discord.API.Rest;
using Discord.Rest;
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
@@ -8,7 +7,7 @@ using System.Linq;
using System.Threading.Tasks;
using Model = Discord.API.Channel;
namespace Discord
namespace Discord.Rest
{
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
internal abstract class GuildChannel : SnowflakeEntity, IGuildChannel

View File

@@ -8,7 +8,7 @@ using System.Linq;
using System.Threading.Tasks;
using Model = Discord.API.Channel;
namespace Discord
namespace Discord.Rest
{
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
internal class TextChannel : GuildChannel, ITextChannel

View File

@@ -6,7 +6,7 @@ using System.Threading.Tasks;
using Model = Discord.API.Channel;
using Discord.Audio;
namespace Discord
namespace Discord.Rest
{
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
internal class VoiceChannel : GuildChannel, IVoiceChannel

View File

@@ -1,6 +1,6 @@
using Discord.Rest;
namespace Discord
namespace Discord.Rest
{
internal abstract class Entity<T> : IEntity<T>
{

View File

@@ -12,7 +12,7 @@ using EmbedModel = Discord.API.GuildEmbed;
using Model = Discord.API.Guild;
using RoleModel = Discord.API.Role;
namespace Discord
namespace Discord.Rest
{
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
internal class Guild : SnowflakeEntity, IGuild

View File

@@ -5,7 +5,7 @@ using System.Diagnostics;
using System.Threading.Tasks;
using Model = Discord.API.Integration;
namespace Discord
namespace Discord.Rest
{
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
internal class GuildIntegration : Entity<ulong>, IGuildIntegration

View File

@@ -3,7 +3,7 @@ using System.Diagnostics;
using System.Threading.Tasks;
using Model = Discord.API.UserGuild;
namespace Discord
namespace Discord.Rest
{
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
internal class UserGuild : SnowflakeEntity, IUserGuild

View File

@@ -1,7 +1,7 @@
using System.Diagnostics;
using Model = Discord.API.VoiceRegion;
namespace Discord
namespace Discord.Rest
{
[DebuggerDisplay("{DebuggerDisplay,nq}")]
internal class VoiceRegion : IVoiceRegion

View File

@@ -3,7 +3,7 @@ using System.Diagnostics;
using System.Threading.Tasks;
using Model = Discord.API.Invite;
namespace Discord
namespace Discord.Rest
{
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
internal class Invite : Entity<string>, IInvite

View File

@@ -2,7 +2,7 @@
using System;
using Model = Discord.API.InviteMetadata;
namespace Discord
namespace Discord.Rest
{
internal class InviteMetadata : Invite, IInviteMetadata
{

View File

@@ -1,6 +1,6 @@
using Model = Discord.API.Attachment;
namespace Discord
namespace Discord.Rest
{
internal class Attachment : IAttachment
{

View File

@@ -1,6 +1,6 @@
using Model = Discord.API.Embed;
namespace Discord
namespace Discord.Rest
{
internal class Embed : IEmbed
{

View File

@@ -7,7 +7,7 @@ using System.Diagnostics;
using System.Threading.Tasks;
using Model = Discord.API.Message;
namespace Discord
namespace Discord.Rest
{
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
internal class Message : SnowflakeEntity, IMessage

View File

@@ -5,7 +5,7 @@ using System.Diagnostics;
using System.Threading.Tasks;
using Model = Discord.API.Role;
namespace Discord
namespace Discord.Rest
{
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
internal class Role : SnowflakeEntity, IRole, IMentionable

View File

@@ -1,6 +1,6 @@
using System;
namespace Discord
namespace Discord.Rest
{
internal abstract class SnowflakeEntity : Entity<ulong>, ISnowflakeEntity
{

View File

@@ -2,7 +2,7 @@
using System.Diagnostics;
using Model = Discord.API.Connection;
namespace Discord
namespace Discord.Rest
{
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
internal class Connection : IConnection

View File

@@ -3,7 +3,7 @@ using Discord.Rest;
using System;
using System.Threading.Tasks;
namespace Discord
namespace Discord.Rest
{
internal class GroupUser : IGroupUser
{

View File

@@ -9,7 +9,7 @@ using System.Threading.Tasks;
using Model = Discord.API.GuildMember;
using PresenceModel = Discord.API.Presence;
namespace Discord
namespace Discord.Rest
{
[DebuggerDisplay("{DebuggerDisplay,nq}")]
internal class GuildUser : IGuildUser, ISnowflakeEntity

View File

@@ -4,7 +4,7 @@ using System;
using System.Threading.Tasks;
using Model = Discord.API.User;
namespace Discord
namespace Discord.Rest
{
internal class SelfUser : User, ISelfUser
{

View File

@@ -3,7 +3,7 @@ using System;
using System.Diagnostics;
using Model = Discord.API.User;
namespace Discord
namespace Discord.Rest
{
[DebuggerDisplay("{DebuggerDisplay,nq}")]
internal class User : SnowflakeEntity, IUser

View File

@@ -3,7 +3,7 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
namespace Discord
namespace Discord.WebSocket
{
internal class DataStore
{

View File

@@ -2,7 +2,7 @@
using Discord.Net.WebSockets;
using Discord.Rest;
namespace Discord
namespace Discord.WebSocket
{
public class DiscordSocketConfig : DiscordRestConfig
{

View File

@@ -1,6 +1,6 @@
using Model = Discord.API.Channel;
namespace Discord
namespace Discord.WebSocket
{
internal interface ISocketChannel : IChannel
{

View File

@@ -1,4 +1,4 @@
namespace Discord
namespace Discord.WebSocket
{
internal interface ISocketGuildChannel : ISocketChannel, IGuildChannel
{

View File

@@ -1,7 +1,7 @@
using System.Collections.Generic;
using MessageModel = Discord.API.Message;
namespace Discord
namespace Discord.WebSocket
{
internal interface ISocketMessageChannel : ISocketChannel, IMessageChannel
{

View File

@@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace Discord
namespace Discord.WebSocket
{
internal interface ISocketPrivateChannel : ISocketChannel, IPrivateChannel
{

View File

@@ -1,13 +1,11 @@
using Discord.Rest;
using Discord.WebSocket;
using System;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Threading.Tasks;
namespace Discord
namespace Discord.WebSocket
{
internal class MessageCache : MessageManager
{

View File

@@ -1,13 +1,12 @@
using Discord.API.Rest;
using Discord.Rest;
using Discord.WebSocket;
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Threading.Tasks;
namespace Discord
namespace Discord.WebSocket
{
internal class MessageManager
{

View File

@@ -1,11 +1,11 @@
using Discord.WebSocket;
using Discord.Rest;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using MessageModel = Discord.API.Message;
using Model = Discord.API.Channel;
namespace Discord
namespace Discord.WebSocket
{
internal class SocketDMChannel : DMChannel, IDMChannel, ISocketChannel, ISocketMessageChannel, ISocketPrivateChannel
{

View File

@@ -1,4 +1,4 @@
using Discord.WebSocket;
using Discord.Rest;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.Immutable;
@@ -9,7 +9,7 @@ using Model = Discord.API.Channel;
using UserModel = Discord.API.User;
using VoiceStateModel = Discord.API.VoiceState;
namespace Discord
namespace Discord.WebSocket
{
internal class SocketGroupChannel : GroupChannel, IGroupChannel, ISocketChannel, ISocketMessageChannel, ISocketPrivateChannel
{

View File

@@ -1,5 +1,4 @@
using Discord.Rest;
using Discord.WebSocket;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
@@ -7,7 +6,7 @@ using System.Threading.Tasks;
using MessageModel = Discord.API.Message;
using Model = Discord.API.Channel;
namespace Discord
namespace Discord.WebSocket
{
internal class SocketTextChannel : TextChannel, ISocketGuildChannel, ISocketMessageChannel
{

View File

@@ -1,5 +1,5 @@
using Discord.Audio;
using Discord.WebSocket;
using Discord.Rest;
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
@@ -7,7 +7,7 @@ using System.Linq;
using System.Threading.Tasks;
using Model = Discord.API.Channel;
namespace Discord
namespace Discord.WebSocket
{
internal class SocketVoiceChannel : VoiceChannel, ISocketGuildChannel
{

View File

@@ -1,5 +1,5 @@
using Discord.Audio;
using Discord.WebSocket;
using Discord.Rest;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
@@ -17,7 +17,7 @@ using PresenceModel = Discord.API.Presence;
using RoleModel = Discord.API.Role;
using VoiceStateModel = Discord.API.VoiceState;
namespace Discord
namespace Discord.WebSocket
{
internal class SocketGuild : Guild, IGuild, IUserGuild
{

View File

@@ -1,7 +1,7 @@
using Discord.WebSocket;
using Discord.Rest;
using Model = Discord.API.Message;
namespace Discord
namespace Discord.WebSocket
{
internal class SocketMessage : Message
{

View File

@@ -1,4 +1,4 @@
namespace Discord
namespace Discord.WebSocket
{
internal interface ISocketUser : IUser, IEntity<ulong>
{

View File

@@ -1,4 +1,4 @@
namespace Discord
namespace Discord.WebSocket
{
//TODO: C#7 Candidate for record type
internal struct Presence : IPresence

View File

@@ -1,9 +1,8 @@
using Discord.WebSocket;
using System;
using System;
using System.Diagnostics;
using PresenceModel = Discord.API.Presence;
namespace Discord
namespace Discord.WebSocket
{
[DebuggerDisplay("{DebuggerDisplay,nq}")]
internal class SocketDMUser : ISocketUser

View File

@@ -1,9 +1,9 @@
using Discord.WebSocket;
using Discord.Rest;
using System;
using Model = Discord.API.User;
using PresenceModel = Discord.API.Presence;
namespace Discord
namespace Discord.WebSocket
{
internal class SocketGlobalUser : User, ISocketUser
{

View File

@@ -1,7 +1,7 @@
using Discord.WebSocket;
using Discord.Rest;
using System.Diagnostics;
namespace Discord
namespace Discord.WebSocket
{
[DebuggerDisplay("{DebuggerDisplay,nq}")]
internal class SocketGroupUser : GroupUser, ISocketUser

View File

@@ -1,8 +1,8 @@
using Discord.WebSocket;
using Discord.Rest;
using Model = Discord.API.GuildMember;
using PresenceModel = Discord.API.Presence;
namespace Discord
namespace Discord.WebSocket
{
internal class SocketGuildUser : GuildUser, ISocketUser
{

View File

@@ -1,10 +1,10 @@
using Discord.API.Rest;
using Discord.WebSocket;
using Discord.Rest;
using System;
using System.Threading.Tasks;
using Model = Discord.API.User;
namespace Discord
namespace Discord.WebSocket
{
internal class SocketSelfUser : SelfUser, ISocketUser, ISelfUser
{

View File

@@ -1,7 +1,7 @@
using System;
using Model = Discord.API.VoiceState;
namespace Discord
namespace Discord.WebSocket
{
//TODO: C#7 Candidate for record type
internal struct VoiceState : IVoiceState