Moved net exceptions to Net namespace, grouped services together

This commit is contained in:
RogueException
2015-12-06 21:27:58 -04:00
parent 2cdc0ad371
commit fd874a6a0b
13 changed files with 25 additions and 19 deletions

View File

@@ -176,18 +176,6 @@
<Compile Include="..\Discord.Net\Helpers\Reference.cs">
<Link>Helpers\Reference.cs</Link>
</Compile>
<Compile Include="..\Discord.Net\HttpException.cs">
<Link>HttpException.cs</Link>
</Compile>
<Compile Include="..\Discord.Net\IService.cs">
<Link>IService.cs</Link>
</Compile>
<Compile Include="..\Discord.Net\LogExtensions.cs">
<Link>LogExtensions.cs</Link>
</Compile>
<Compile Include="..\Discord.Net\LogService.cs">
<Link>LogService.cs</Link>
</Compile>
<Compile Include="..\Discord.Net\Models\Channel.cs">
<Link>Models\Channel.cs</Link>
</Compile>
@@ -218,6 +206,9 @@
<Compile Include="..\Discord.Net\Models\User.cs">
<Link>Models\User.cs</Link>
</Compile>
<Compile Include="..\Discord.Net\Net\HttpException.cs">
<Link>Net\HttpException.cs</Link>
</Compile>
<Compile Include="..\Discord.Net\Net\Rest\IRestEngine.cs">
<Link>Net\Rest\IRestEngine.cs</Link>
</Compile>
@@ -230,6 +221,9 @@
<Compile Include="..\Discord.Net\Net\Rest\SharpRestEngine.cs">
<Link>Net\Rest\SharpRestEngine.cs</Link>
</Compile>
<Compile Include="..\Discord.Net\Net\TimeoutException.cs">
<Link>Net\TimeoutException.cs</Link>
</Compile>
<Compile Include="..\Discord.Net\Net\WebSockets\GatewayWebSocket.cs">
<Link>Net\WebSockets\GatewayWebSocket.cs</Link>
</Compile>
@@ -245,8 +239,14 @@
<Compile Include="..\Discord.Net\Net\WebSockets\WebSocketSharpEngine.cs">
<Link>Net\WebSockets\WebSocketSharpEngine.cs</Link>
</Compile>
<Compile Include="..\Discord.Net\TimeoutException.cs">
<Link>TimeoutException.cs</Link>
<Compile Include="..\Discord.Net\Services\IService.cs">
<Link>Services\IService.cs</Link>
</Compile>
<Compile Include="..\Discord.Net\Services\LogExtensions.cs">
<Link>Services\LogExtensions.cs</Link>
</Compile>
<Compile Include="..\Discord.Net\Services\LogService.cs">
<Link>Services\LogService.cs</Link>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>

View File

@@ -1,3 +1,4 @@
using Discord.Net;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;

View File

@@ -1,3 +1,4 @@
using Discord.Net;
using System;
using System.Linq;
using System.Net;

View File

@@ -1,4 +1,5 @@
using Discord.API;
using Discord.Net;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Serialization;

View File

@@ -1,3 +1,4 @@
using Discord.Net;
using System;
using System.Linq;
using System.Net;

View File

@@ -1,3 +1,4 @@
using Discord.Net;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -140,7 +141,7 @@ namespace Discord
CheckReady();
try { await _api.DeleteRole(role.Server.Id, role.Id); }
catch (HttpException ex) when(ex.StatusCode == HttpStatusCode.NotFound) { }
catch (HttpException ex) when (ex.StatusCode == HttpStatusCode.NotFound) { }
}
public Task ReorderRoles(Server server, IEnumerable<Role> roles, int startPos = 0)

View File

@@ -1,3 +1,4 @@
using Discord.Net;
using System;
using System.Collections.Generic;
using System.IO;

View File

@@ -1,4 +1,5 @@
using System;
using Discord.Net;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;

View File

@@ -1,7 +1,7 @@
using System;
using System.Net;
namespace Discord
namespace Discord.Net
{
public class HttpException : Exception
{

View File

@@ -1,6 +1,6 @@
using System;
namespace Discord
namespace Discord.Net
{
public sealed class TimeoutException : OperationCanceledException
{

View File

@@ -2,7 +2,6 @@
{
public interface IService
{
void Install(DiscordClient client);
}
}