Fixed some reference errors

This commit is contained in:
RogueException
2015-09-16 02:25:59 -03:00
parent dbf7dce1fe
commit b91f72ed3c
8 changed files with 35 additions and 28 deletions

View File

@@ -165,21 +165,21 @@
<Compile Include="..\Discord.Net\Net\API\Responses.cs">
<Link>Net\API\Responses.cs</Link>
</Compile>
<Compile Include="..\Discord.Net\Net\API\RestClient.BuiltIn.cs">
<Link>Net\API\RestClient.BuiltIn.cs</Link>
</Compile>
<Compile Include="..\Discord.Net\Net\API\RestClient.cs">
<Link>Net\API\RestClient.cs</Link>
</Compile>
<Compile Include="..\Discord.Net\Net\API\RestClient.Events.cs">
<Link>Net\API\RestClient.Events.cs</Link>
</Compile>
<Compile Include="..\Discord.Net\Net\API\RestClient.SharpRest.cs">
<Link>Net\API\RestClient.SharpRest.cs</Link>
</Compile>
<Compile Include="..\Discord.Net\Net\HttpException.cs">
<Link>Net\HttpException.cs</Link>
</Compile>
<Compile Include="..\Discord.Net\Net\RestClient.BuiltIn.cs">
<Link>Net\RestClient.BuiltIn.cs</Link>
</Compile>
<Compile Include="..\Discord.Net\Net\RestClient.cs">
<Link>Net\RestClient.cs</Link>
</Compile>
<Compile Include="..\Discord.Net\Net\RestClient.Events.cs">
<Link>Net\RestClient.Events.cs</Link>
</Compile>
<Compile Include="..\Discord.Net\Net\RestClient.SharpRest.cs">
<Link>Net\RestClient.SharpRest.cs</Link>
</Compile>
<Compile Include="..\Discord.Net\Net\WebSockets\Commands.cs">
<Link>Net\WebSockets\Commands.cs</Link>
</Compile>

View File

@@ -1,5 +1,4 @@
#if DNXCORE50
using Discord.Net.API;
using System;
using System.Globalization;
using System.IO;
@@ -9,7 +8,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace Discord.Net
namespace Discord.Net.API
{
internal class BuiltInRestEngine : IRestEngine
{

View File

@@ -1,7 +1,7 @@
using System;
using System.Net.Http;
namespace Discord.Net
namespace Discord.Net.API
{
internal partial class RestClient
{

View File

@@ -1,5 +1,4 @@
#if !DNXCORE50
using Discord.Net.API;
using RestSharp;
using System;
using System.IO;
@@ -7,13 +6,13 @@ using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
namespace Discord.Net
namespace Discord.Net.API
{
internal class SharpRestEngine : IRestEngine
internal class RestSharpRestEngine : IRestEngine
{
private readonly RestSharp.RestClient _client;
public SharpRestEngine(string userAgent)
public RestSharpRestEngine(string userAgent)
{
_client = new RestSharp.RestClient(Endpoints.BaseApi)
{

View File

@@ -1,5 +1,4 @@
using Discord.Net.API;
using Newtonsoft.Json;
using Newtonsoft.Json;
using System;
using System.Diagnostics;
using System.Net.Http;
@@ -7,7 +6,7 @@ using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
namespace Discord.Net
namespace Discord.Net.API
{
internal interface IRestEngine
{
@@ -31,7 +30,7 @@ namespace Discord.Net
#if DNXCORE50
_engine = new BuiltInRestEngine(userAgent);
#else
_engine = new SharpRestEngine(userAgent);
_engine = new RestSharpRestEngine(userAgent);
#endif
}

View File

@@ -27,14 +27,18 @@
"frameworks": {
"net45": {
"dependencies": {
"Microsoft.Net.Http": "2.2.29",
"RestSharp": "105.2.3"
},
"frameworkAssemblies": {
"System.Net.Http": "4.0.0.0"
}
},
"dnx451": {
"dependencies": {
"Microsoft.Net.Http": "2.2.29",
"RestSharp": "105.2.3"
},
"frameworkAssemblies": {
"System.Net.Http": "4.0.0.0"
}
},
"dnxcore50": {

View File

@@ -62,6 +62,12 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Discord.Net.Net45\Discord.Net.csproj">
<Project>{8d71a857-879a-4a10-859e-5ff824ed6688}</Project>
<Name>Discord.Net</Name>
</ProjectReference>
</ItemGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
<ItemGroup>

View File

@@ -110,9 +110,9 @@ namespace Discord.Net.Tests
public static void Cleanup()
{
WaitMany(
_hostClient.IsConnected ? _hostClient.Servers.Select(x => _hostClient.LeaveServer(x)) : null,
_targetBot.IsConnected ? _targetBot.Servers.Select(x => _targetBot.LeaveServer(x)) : null,
_observerBot.IsConnected ? _observerBot.Servers.Select(x => _observerBot.LeaveServer(x)) : null);
_hostClient.State == DiscordClientState.Connected ? _hostClient.Servers.Select(x => _hostClient.LeaveServer(x)) : null,
_targetBot.State == DiscordClientState.Connected ? _targetBot.Servers.Select(x => _targetBot.LeaveServer(x)) : null,
_observerBot.State == DiscordClientState.Connected ? _observerBot.Servers.Select(x => _observerBot.LeaveServer(x)) : null);
WaitAll(
_hostClient.Disconnect(),