Skip to content

Commit 6d75367

Browse files
author
Michael Hallett
committed
removed support for compact framework; removed all ifdef PocketPC statements;
1 parent 34f01f9 commit 6d75367

35 files changed

+131
-429
lines changed

RestSharp.Compact.sln

Lines changed: 0 additions & 20 deletions
This file was deleted.

RestSharp.Net46/RestSharp.Net46.Signed.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@
241241
<Compile Include="..\RestSharp.Net4\Extensions\RestClientExtensions.cs">
242242
<Link>Extensions\RestClientExtensions.cs</Link>
243243
</Compile>
244+
<Compile Include="..\RestSharp\RestClientExtensions.cs">
245+
<Link>RestClientExtensions.cs</Link>
246+
</Compile>
244247
<Compile Include="..\RestSharp\RestRequest.cs">
245248
<Link>RestRequest.cs</Link>
246249
</Compile>

RestSharp/Authenticators/OAuth/Extensions/CollectionExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public static void ForEach<T>(this IEnumerable<T> items, Action<T> action)
4949
}
5050
}
5151

52-
#if !WINDOWS_PHONE && !SILVERLIGHT && !PocketPC
52+
#if !WINDOWS_PHONE && !SILVERLIGHT
5353

5454
public static void AddRange(this IDictionary<string, string> collection, NameValueCollection range)
5555
{

RestSharp/Authenticators/OAuth/Extensions/StringExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public static IDictionary<string, string> ParseQueryString(this string query)
9696
}
9797

9898
private const RegexOptions Options =
99-
#if !WINDOWS_PHONE && !SILVERLIGHT && !PocketPC
99+
#if !WINDOWS_PHONE && !SILVERLIGHT
100100
RegexOptions.Compiled | RegexOptions.IgnoreCase;
101101
#else
102102
RegexOptions.IgnoreCase;

RestSharp/Authenticators/OAuth/HttpPostParameterType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace RestSharp.Authenticators.OAuth
44
{
5-
#if !SILVERLIGHT && !WINDOWS_PHONE && !PocketPC
5+
#if !SILVERLIGHT && !WINDOWS_PHONE
66
[Serializable]
77
#endif
88
internal enum HttpPostParameterType

RestSharp/Authenticators/OAuth/OAuthParameterHandling.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace RestSharp.Authenticators.OAuth
44
{
5-
#if !SILVERLIGHT && !WINDOWS_PHONE && !PocketPC
5+
#if !SILVERLIGHT && !WINDOWS_PHONE
66
[Serializable]
77
#endif
88
public enum OAuthParameterHandling

RestSharp/Authenticators/OAuth/OAuthSignatureMethod.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace RestSharp.Authenticators.OAuth
44
{
5-
#if !SILVERLIGHT && !WINDOWS_PHONE && !PocketPC
5+
#if !SILVERLIGHT && !WINDOWS_PHONE
66
[Serializable]
77
#endif
88
public enum OAuthSignatureMethod

RestSharp/Authenticators/OAuth/OAuthSignatureTreatment.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace RestSharp.Authenticators.OAuth
44
{
5-
#if !SILVERLIGHT && !WINDOWS_PHONE && !PocketPC
5+
#if !SILVERLIGHT && !WINDOWS_PHONE
66
[Serializable]
77
#endif
88
public enum OAuthSignatureTreatment

RestSharp/Authenticators/OAuth/OAuthTools.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace RestSharp.Authenticators.OAuth
88
{
9-
#if !SILVERLIGHT && !WINDOWS_PHONE && !PocketPC
9+
#if !SILVERLIGHT && !WINDOWS_PHONE
1010
[Serializable]
1111
#endif
1212
internal static class OAuthTools
@@ -20,13 +20,13 @@ internal static class OAuthTools
2020
private static readonly Random _random;
2121
private static readonly object _randomLock = new object();
2222

23-
#if !SILVERLIGHT && !WINDOWS_PHONE && !PocketPC
23+
#if !SILVERLIGHT && !WINDOWS_PHONE
2424
private static readonly RandomNumberGenerator _rng = RandomNumberGenerator.Create();
2525
#endif
2626

2727
static OAuthTools()
2828
{
29-
#if !SILVERLIGHT && !WINDOWS_PHONE && !PocketPC
29+
#if !SILVERLIGHT && !WINDOWS_PHONE
3030
var bytes = new byte[4];
3131
_rng.GetNonZeroBytes(bytes);
3232
_random = new Random(BitConverter.ToInt32(bytes, 0));
@@ -312,7 +312,6 @@ public static string GetSignature(OAuthSignatureMethod signatureMethod,
312312

313313
switch (signatureMethod)
314314
{
315-
#if !PocketPC
316315
case OAuthSignatureMethod.HmacSha1:
317316
{
318317
var crypto = new HMACSHA1();
@@ -323,7 +322,6 @@ public static string GetSignature(OAuthSignatureMethod signatureMethod,
323322

324323
break;
325324
}
326-
#endif
327325

328326
case OAuthSignatureMethod.PlainText:
329327
{
@@ -333,11 +331,7 @@ public static string GetSignature(OAuthSignatureMethod signatureMethod,
333331
}
334332

335333
default:
336-
#if PocketPC
337-
throw new NotImplementedException("Only PlainText is currently supported.");
338-
#else
339334
throw new NotImplementedException("Only HMAC-SHA1 is currently supported.");
340-
#endif
341335
}
342336

343337
var result = signatureTreatment == OAuthSignatureTreatment.Escaped

RestSharp/Authenticators/OAuth/OAuthType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace RestSharp.Authenticators.OAuth
44
{
5-
#if !SILVERLIGHT && !WINDOWS_PHONE && !PocketPC
5+
#if !SILVERLIGHT && !WINDOWS_PHONE
66
[Serializable]
77
#endif
88
public enum OAuthType

0 commit comments

Comments
 (0)