Permalink
Browse files

update nuget package refs, fix bug with restexception not being popul…

…ated
  • Loading branch information...
1 parent be4a4a0 commit a94c66ad75291a31b5ed8989ef217335c8279fc6 @johnsheehan johnsheehan committed Jan 24, 2012
Showing with 40,895 additions and 22 deletions.
  1. +12 −1 src/Twilio.Api.Silverlight/Core.Async.cs
  2. +6 −1 src/Twilio.Api.Silverlight/Twilio.Api.Silverlight.csproj
  3. +11 −0 src/Twilio.Api.Silverlight/app.config
  4. +2 −2 src/Twilio.Api.Silverlight/packages.config
  5. +6 −1 src/Twilio.Api.WindowsPhone/Twilio.Api.WindowsPhone.csproj
  6. +11 −0 src/Twilio.Api.WindowsPhone/app.config
  7. +2 −2 src/Twilio.Api.WindowsPhone/packages.config
  8. +10 −1 src/Twilio.Api/Core.cs
  9. +5 −1 src/Twilio.Api/Twilio.Api.csproj
  10. +2 −2 src/Twilio.Api/packages.config
  11. +7 −2 src/Twilio.Client.Capability/Twilio.Client.Capability.csproj
  12. +2 −2 src/Twilio.Client.Capability/packages.config
  13. +2 −2 src/Twilio.Twiml.Tests/Twilio.TwiML.Tests.csproj
  14. +1 −1 src/Twilio.Twiml.Tests/packages.config
  15. BIN src/packages/JWT.1.1.1/JWT.1.1.1.nupkg
  16. BIN src/packages/{JWT.1.1 → JWT.1.1.1}/lib/3.5/JWT.dll
  17. BIN src/packages/JWT.1.1/JWT.1.1.nupkg
  18. BIN src/packages/Newtonsoft.Json.4.0.6/Newtonsoft.Json.4.0.6.nupkg
  19. BIN src/packages/Newtonsoft.Json.4.0.6/lib/net20/Newtonsoft.Json.dll
  20. +7,679 −0 src/packages/Newtonsoft.Json.4.0.6/lib/net20/Newtonsoft.Json.xml
  21. BIN src/packages/Newtonsoft.Json.4.0.6/lib/net35/Newtonsoft.Json.dll
  22. +6,802 −0 src/packages/Newtonsoft.Json.4.0.6/lib/net35/Newtonsoft.Json.xml
  23. BIN src/packages/Newtonsoft.Json.4.0.6/lib/net40/Newtonsoft.Json.dll
  24. +6,961 −0 src/packages/Newtonsoft.Json.4.0.6/lib/net40/Newtonsoft.Json.xml
  25. BIN src/packages/Newtonsoft.Json.4.0.6/lib/sl3-wp/Newtonsoft.Json.dll
  26. +6,394 −0 src/packages/Newtonsoft.Json.4.0.6/lib/sl3-wp/Newtonsoft.Json.xml
  27. BIN src/packages/Newtonsoft.Json.4.0.6/lib/sl4-windowsphone71/Newtonsoft.Json.dll
  28. +6,394 −0 src/packages/Newtonsoft.Json.4.0.6/lib/sl4-windowsphone71/Newtonsoft.Json.xml
  29. BIN src/packages/Newtonsoft.Json.4.0.6/lib/sl4/Newtonsoft.Json.dll
  30. +6,424 −0 src/packages/Newtonsoft.Json.4.0.6/lib/sl4/Newtonsoft.Json.xml
  31. BIN src/packages/RestSharp.102.5/RestSharp.102.5.nupkg
  32. BIN src/packages/RestSharp.102.5/lib/net35-client/RestSharp.dll
  33. BIN src/packages/RestSharp.102.5/lib/net35/RestSharp.dll
  34. BIN src/packages/RestSharp.102.5/lib/sl3-wp/RestSharp.WindowsPhone.dll
  35. BIN src/packages/RestSharp.102.5/lib/sl4-wp71/RestSharp.WindowsPhone.dll
  36. BIN src/packages/RestSharp.102.5/lib/sl4/RestSharp.Silverlight.dll
  37. BIN src/packages/RestSharp.102.6/RestSharp.102.6.nupkg
  38. BIN src/packages/RestSharp.102.6/lib/net35-client/RestSharp.dll
  39. BIN src/packages/RestSharp.102.6/lib/net35/RestSharp.dll
  40. BIN src/packages/RestSharp.102.6/lib/sl3-wp/RestSharp.WindowsPhone.dll
  41. BIN src/packages/RestSharp.102.6/lib/sl4-wp71/RestSharp.WindowsPhone.dll
  42. BIN src/packages/RestSharp.102.6/lib/sl4/RestSharp.Silverlight.dll
  43. +3 −3 src/packages/repositories.config
  44. BIN src/packages/xunit.1.8.0.1549/lib/xunit.dll
  45. BIN src/packages/xunit.1.8.0.1549/lib/xunit.runner.utility.dll
  46. BIN src/packages/xunit.1.8.0.1549/xunit.1.8.0.1549.nupkg
  47. BIN src/packages/xunit.1.9.0.1566/lib/xunit.dll
  48. 0 src/packages/{xunit.1.8.0.1549 → xunit.1.9.0.1566}/lib/xunit.dll.tdnet
  49. BIN src/packages/xunit.1.9.0.1566/lib/xunit.runner.msbuild.dll
  50. BIN src/packages/{xunit.1.8.0.1549 → xunit.1.9.0.1566}/lib/xunit.runner.tdnet.dll
  51. BIN src/packages/xunit.1.9.0.1566/lib/xunit.runner.utility.dll
  52. +159 −1 src/packages/{xunit.1.8.0.1549 → xunit.1.9.0.1566}/lib/xunit.xml
  53. BIN src/packages/xunit.1.9.0.1566/xunit.1.9.0.1566.nupkg
@@ -1,6 +1,9 @@
using System;
using System.Linq;
using RestSharp;
+using RestSharp.Extensions;
+using System.Text;
+using Newtonsoft.Json.Linq;
#if WINDOWS_PHONE
using System.Windows;
@@ -24,10 +27,18 @@ public void ExecuteAsync<T>(RestRequest request, Action<T> callback) where T : n
// sure that RestException props are populated
if (((int)resp.StatusCode) >= 400)
{
- request.RootElement = "";
+ // have to read the bytes so .Content doesn't get populated
+ var content = resp.RawBytes.AsString();
+ var json = JObject.Parse(content);
+ var newJson = new JObject();
+ newJson["RestException"] = json;
+ resp.Content = null;
+ resp.RawBytes = Encoding.UTF8.GetBytes(newJson.ToString());
}
};
+ request.DateFormat = "ddd, dd MMM yyyy HH:mm:ss '+0000'";
+
_client.ExecuteAsync<T>(request, (response) =>
{
callback(response.Data);
@@ -49,9 +49,13 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib" />
+ <Reference Include="Newtonsoft.Json, Version=4.0.6.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\Newtonsoft.Json.4.0.6\lib\sl4\Newtonsoft.Json.dll</HintPath>
+ </Reference>
<Reference Include="RestSharp.Silverlight, Version=102.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\RestSharp.102.5\lib\sl4\RestSharp.Silverlight.dll</HintPath>
+ <HintPath>..\packages\RestSharp.102.6\lib\sl4\RestSharp.Silverlight.dll</HintPath>
</Reference>
<Reference Include="System.Windows" />
<Reference Include="system" />
@@ -220,6 +224,7 @@
<Compile Include="Transcriptions.Async.cs" />
</ItemGroup>
<ItemGroup>
+ <None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration>
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Newtonsoft.Json" version="4.0.3" />
- <package id="RestSharp" version="102.5" />
+ <package id="Newtonsoft.Json" version="4.0.6" />
+ <package id="RestSharp" version="102.6" />
</packages>
@@ -44,9 +44,13 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib" />
+ <Reference Include="Newtonsoft.Json, Version=4.0.6.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\Newtonsoft.Json.4.0.6\lib\sl3-wp\Newtonsoft.Json.dll</HintPath>
+ </Reference>
<Reference Include="RestSharp.WindowsPhone, Version=102.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\RestSharp.102.5\lib\sl3-wp\RestSharp.WindowsPhone.dll</HintPath>
+ <HintPath>..\packages\RestSharp.102.6\lib\sl3-wp\RestSharp.WindowsPhone.dll</HintPath>
</Reference>
<Reference Include="System.Windows" />
<Reference Include="system" />
@@ -244,6 +248,7 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
+ <None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets" />
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration>
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Newtonsoft.Json" version="4.0.3" />
- <package id="RestSharp" version="102.5" />
+ <package id="Newtonsoft.Json" version="4.0.6" />
+ <package id="RestSharp" version="102.6" />
</packages>
@@ -1,6 +1,9 @@
using RestSharp;
+using RestSharp.Extensions;
using System.Reflection;
using RestSharp.Deserializers;
+using Newtonsoft.Json.Linq;
+using System.Text;
namespace Twilio
{
@@ -63,7 +66,13 @@ public T Execute<T>(RestRequest request) where T : new()
// sure that RestException props are populated
if (((int)resp.StatusCode) >= 400)
{
- request.RootElement = "";
+ // have to read the bytes so .Content doesn't get populated
+ var content = resp.RawBytes.AsString();
+ var json = JObject.Parse(content);
+ var newJson = new JObject();
+ newJson["RestException"] = json;
+ resp.Content = null;
+ resp.RawBytes = Encoding.UTF8.GetBytes(newJson.ToString());
}
};
@@ -40,9 +40,13 @@
<DocumentationFile>bin\Release\Twilio.Api.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
+ <Reference Include="Newtonsoft.Json, Version=4.0.6.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\Newtonsoft.Json.4.0.6\lib\net35\Newtonsoft.Json.dll</HintPath>
+ </Reference>
<Reference Include="RestSharp, Version=102.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\RestSharp.102.5\lib\net35-client\RestSharp.dll</HintPath>
+ <HintPath>..\packages\RestSharp.102.6\lib\net35-client\RestSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Newtonsoft.Json" version="4.0.3" />
- <package id="RestSharp" version="102.5" />
+ <package id="Newtonsoft.Json" version="4.0.6" />
+ <package id="RestSharp" version="102.6" />
</packages>
@@ -33,8 +33,13 @@
<DocumentationFile>bin\Release\Twilio.Client.Capability.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
- <Reference Include="JWT">
- <HintPath>..\packages\JWT.1.1\lib\3.5\JWT.dll</HintPath>
+ <Reference Include="JWT, Version=1.1.1.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\JWT.1.1.1\lib\3.5\JWT.dll</HintPath>
+ </Reference>
+ <Reference Include="Newtonsoft.Json, Version=4.0.6.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\Newtonsoft.Json.4.0.6\lib\net35\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="JWT" version="1.1" />
- <package id="Newtonsoft.Json" version="4.0.3" />
+ <package id="JWT" version="1.1.1" />
+ <package id="Newtonsoft.Json" version="4.0.6" />
</packages>
@@ -41,9 +41,9 @@
</Reference>
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
- <Reference Include="xunit, Version=1.8.0.1549, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
+ <Reference Include="xunit, Version=1.9.0.1566, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\xunit.1.8.0.1549\lib\xunit.dll</HintPath>
+ <HintPath>..\packages\xunit.1.9.0.1566\lib\xunit.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="xunit" version="1.8.0.1549" />
+ <package id="xunit" version="1.9.0.1566" />
</packages>
Binary file not shown.
Binary file not shown.
Oops, something went wrong.

0 comments on commit a94c66a

Please sign in to comment.