Skip to content
This repository was archived by the owner on Jan 2, 2018. It is now read-only.

Commit ab341a1

Browse files
committed
Removed System.Web dependency.
JSON.net nuget package was added to use it's deserializer as well as using another method for url encoding.
1 parent bcbcd6d commit ab341a1

23 files changed

+63119
-2785
lines changed

Installers/LocalTunnel.Installer.x64/LocalTunnel.Installer.x64.vdproj

Lines changed: 1287 additions & 1284 deletions
Large diffs are not rendered by default.

Installers/LocalTunnel.Installer.x86/LocalTunnel.Installer.x86.vdproj

Lines changed: 1545 additions & 1494 deletions
Large diffs are not rendered by default.

packages/Dex.Utilities/Dex.Utilities.csproj

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,17 @@
9292
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
9393
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
9494
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
95+
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
9596
</PropertyGroup>
9697
<ItemGroup>
9798
<Reference Include="BouncyCastle.Crypto">
9899
<HintPath>packages\BouncyCastle.Crypto.dll</HintPath>
99100
</Reference>
101+
<Reference Include="Newtonsoft.Json">
102+
<HintPath>..\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll</HintPath>
103+
</Reference>
100104
<Reference Include="System" />
101105
<Reference Include="System.Core" />
102-
<Reference Include="System.Web" />
103-
<Reference Include="System.Web.Extensions" />
104106
<Reference Include="System.Xml.Linq" />
105107
<Reference Include="System.Data.DataSetExtensions" />
106108
<Reference Include="Microsoft.CSharp" />
@@ -119,6 +121,9 @@
119121
<Name>ManagedOpenSsl-2010</Name>
120122
</ProjectReference>
121123
</ItemGroup>
124+
<ItemGroup>
125+
<None Include="packages.config" />
126+
</ItemGroup>
122127
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
123128
<PropertyGroup>
124129
<PreBuildEvent>

packages/Dex.Utilities/Web.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
using System.Text;
55
using System.IO;
66
using System.Net;
7-
using System.Web;
8-
using System.Web.Script.Serialization;
7+
using Newtonsoft.Json;
98

109
namespace Dex.Utilities
1110
{
@@ -52,8 +51,7 @@ public static T DoPost<T>(string url, Dictionary<string, string> paramters)
5251
return (T)((object)Response);
5352
}
5453

55-
JavaScriptSerializer jSer = new JavaScriptSerializer();
56-
return jSer.Deserialize<T>(Response);
54+
return JsonConvert.DeserializeObject<T>(Response);
5755
}
5856
}
5957
}
@@ -87,7 +85,7 @@ private static string CreateFormattedPostRequest(Dictionary<string, string> valu
8785

8886
foreach (var value in values)
8987
{
90-
paramterBuilder.AppendFormat("{0}={1}", value.Key, HttpUtility.UrlEncode(value.Value.ToString()));
88+
paramterBuilder.AppendFormat("{0}={1}", value.Key, Uri.EscapeDataString(value.Value.ToString()));
9189

9290
if (counter != values.Count - 1)
9391
{
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="Newtonsoft.Json" version="4.5.11" />
4+
</packages>
Binary file not shown.
Binary file not shown.

packages/Newtonsoft.Json.4.5.11/lib/net20/Newtonsoft.Json.xml

Lines changed: 8526 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

packages/Newtonsoft.Json.4.5.11/lib/net35/Newtonsoft.Json.xml

Lines changed: 7662 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

packages/Newtonsoft.Json.4.5.11/lib/net40/Newtonsoft.Json.xml

Lines changed: 7905 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/Newtonsoft.Json.4.5.11/lib/portable-net40+sl4+wp7+win8/Newtonsoft.Json.xml

Lines changed: 7091 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

packages/Newtonsoft.Json.4.5.11/lib/sl3-wp/Newtonsoft.Json.xml

Lines changed: 7212 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

packages/Newtonsoft.Json.4.5.11/lib/sl4-windowsphone71/Newtonsoft.Json.xml

Lines changed: 7212 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

packages/Newtonsoft.Json.4.5.11/lib/sl4/Newtonsoft.Json.xml

Lines changed: 7234 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

packages/Newtonsoft.Json.4.5.11/lib/winrt45/Newtonsoft.Json.xml

Lines changed: 7430 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/repositories.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<repositories>
33
<repository path="..\LocalTunnel.Library\packages.config" />
4+
<repository path="Dex.Utilities\packages.config" />
45
</repositories>

0 commit comments

Comments
 (0)