Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes issue #270 #273

Merged
merged 1 commit into from May 9, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions RestSharp.Net4/RestSharp.Net4.csproj
Expand Up @@ -53,6 +53,9 @@
<Compile Include="..\restsharp\authenticators\NtlmAuthenticator.cs">
<Link>Authenticators\NtlmAuthenticator.cs</Link>
</Compile>
<Compile Include="..\RestSharp\Authenticators\OAuth1Authenticator.cs">
<Link>Authenticators\OAuth1Authenticator.cs</Link>
</Compile>
<Compile Include="..\restsharp\authenticators\OAuth2Authenticator.cs">
<Link>Authenticators\OAuth2Authenticator.cs</Link>
</Compile>
Expand Down
57 changes: 57 additions & 0 deletions RestSharp.Silverlight/RestSharp.Silverlight.csproj
Expand Up @@ -72,9 +72,63 @@
<Compile Include="..\RestSharp\Authenticators\NtlmAuthenticator.cs">
<Link>Authenticators\NtlmAuthenticator.cs</Link>
</Compile>
<Compile Include="..\RestSharp\Authenticators\OAuth1Authenticator.cs">
<Link>Authenticators\OAuth1Authenticator.cs</Link>
</Compile>
<Compile Include="..\RestSharp\Authenticators\OAuth2Authenticator.cs">
<Link>Authenticators\OAuth2Authenticator.cs</Link>
</Compile>
<Compile Include="..\restsharp\authenticators\oauth\extensions\CollectionExtensions.cs">
<Link>Authenticators\OAuth\Extensions\CollectionExtensions.cs</Link>
</Compile>
<Compile Include="..\restsharp\authenticators\oauth\extensions\OAuthExtensions.cs">
<Link>Authenticators\OAuth\Extensions\OAuthExtensions.cs</Link>
</Compile>
<Compile Include="..\restsharp\authenticators\oauth\extensions\StringExtensions.cs">
<Link>Authenticators\OAuth\Extensions\StringExtensions.cs</Link>
</Compile>
<Compile Include="..\restsharp\authenticators\oauth\extensions\TimeExtensions.cs">
<Link>Authenticators\OAuth\Extensions\TimeExtensions.cs</Link>
</Compile>
<Compile Include="..\restsharp\authenticators\oauth\HttpPostParameter.cs">
<Link>Authenticators\OAuth\HttpPostParameter.cs</Link>
</Compile>
<Compile Include="..\restsharp\authenticators\oauth\HttpPostParameterType.cs">
<Link>Authenticators\OAuth\HttpPostParameterType.cs</Link>
</Compile>
<Compile Include="..\restsharp\authenticators\oauth\OAuthParameterHandling.cs">
<Link>Authenticators\OAuth\OAuthParameterHandling.cs</Link>
</Compile>
<Compile Include="..\restsharp\authenticators\oauth\OAuthSignatureMethod.cs">
<Link>Authenticators\OAuth\OAuthSignatureMethod.cs</Link>
</Compile>
<Compile Include="..\restsharp\authenticators\oauth\OAuthSignatureTreatment.cs">
<Link>Authenticators\OAuth\OAuthSignatureTreatment.cs</Link>
</Compile>
<Compile Include="..\restsharp\authenticators\oauth\OAuthTools.cs">
<Link>Authenticators\OAuth\OAuthTools.cs</Link>
</Compile>
<Compile Include="..\restsharp\authenticators\oauth\OAuthType.cs">
<Link>Authenticators\OAuth\OAuthType.cs</Link>
</Compile>
<Compile Include="..\restsharp\authenticators\oauth\OAuthWebQueryInfo.cs">
<Link>Authenticators\OAuth\OAuthWebQueryInfo.cs</Link>
</Compile>
<Compile Include="..\restsharp\authenticators\oauth\OAuthWorkflow.cs">
<Link>Authenticators\OAuth\OAuthWorkflow.cs</Link>
</Compile>
<Compile Include="..\restsharp\authenticators\oauth\WebPair.cs">
<Link>Authenticators\OAuth\WebPair.cs</Link>
</Compile>
<Compile Include="..\restsharp\authenticators\oauth\WebPairCollection.cs">
<Link>Authenticators\OAuth\WebPairCollection.cs</Link>
</Compile>
<Compile Include="..\restsharp\authenticators\oauth\WebParameter.cs">
<Link>Authenticators\OAuth\WebParameter.cs</Link>
</Compile>
<Compile Include="..\restsharp\authenticators\oauth\WebParameterCollection.cs">
<Link>Authenticators\OAuth\WebParameterCollection.cs</Link>
</Compile>
<Compile Include="..\RestSharp\Authenticators\SimpleAuthenticator.cs">
<Link>Authenticators\SimpleAuthenticator.cs</Link>
</Compile>
Expand Down Expand Up @@ -212,6 +266,9 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Folder Include="Authenticators\NewFolder1\" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
Expand Down
Expand Up @@ -3,12 +3,6 @@
using System.Collections.Specialized;
using System.Text;

#if SILVERLIGHT
using Hammock.Silverlight.Compat;
#else

#endif

namespace RestSharp.Authenticators.OAuth.Extensions
{
internal static class CollectionExtensions
Expand Down Expand Up @@ -55,7 +49,7 @@ public static void ForEach<T>(this IEnumerable<T> items, Action<T> action)
}
}

#if !WINDOWS_PHONE
#if !WINDOWS_PHONE && !SILVERLIGHT

public static void AddRange(this IDictionary<string, string> collection, NameValueCollection range)
{
Expand Down
14 changes: 1 addition & 13 deletions RestSharp/Authenticators/OAuth/Extensions/StringExtensions.cs
Expand Up @@ -5,18 +5,6 @@
using System.Text;
using System.Text.RegularExpressions;

#if SILVERLIGHT && !WindowsPhone
using System.Windows.Browser;
#endif

#if WindowsPhone
using System.Web;
#endif

#if !SILVERLIGHT

#endif

namespace RestSharp.Authenticators.OAuth.Extensions
{
internal static class StringExtensions
Expand Down Expand Up @@ -116,7 +104,7 @@ public static string PercentEncode(this string s)
}

private const RegexOptions Options =
#if SILVERLIGHT
#if !WINDOWS_PHONE && !SILVERLIGHT
RegexOptions.Compiled | RegexOptions.IgnoreCase;
#else
RegexOptions.IgnoreCase;
Expand Down
2 changes: 1 addition & 1 deletion RestSharp/Authenticators/OAuth/OAuthWorkflow.cs
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using RestSharp.Authenticators.OAuth.Extensions;
#if !WINDOWS_PHONE
#if !WINDOWS_PHONE && !SILVERLIGHT
using RestSharp.Contrib;
#endif

Expand Down
2 changes: 1 addition & 1 deletion RestSharp/Authenticators/OAuth/WebPairCollection.cs
Expand Up @@ -30,7 +30,7 @@ public WebPairCollection(IEnumerable<WebPair> parameters)
_parameters = new List<WebPair>(parameters);
}

#if !WINDOWS_PHONE
#if !WINDOWS_PHONE && !SILVERLIGHT
public WebPairCollection(NameValueCollection collection) : this()
{
AddCollection(collection);
Expand Down
8 changes: 1 addition & 7 deletions RestSharp/Authenticators/OAuth/WebParameterCollection.cs
@@ -1,12 +1,6 @@
using System.Collections.Generic;
using System.Collections.Specialized;

#if !SILVERLIGHT

#else
using Hammock.Silverlight.Compat;
#endif

namespace RestSharp.Authenticators.OAuth
{
internal class WebParameterCollection : WebPairCollection
Expand All @@ -16,7 +10,7 @@ public WebParameterCollection(IEnumerable<WebPair> parameters)
{
}

#if !WINDOWS_PHONE
#if !WINDOWS_PHONE && !SILVERLIGHT
public WebParameterCollection(NameValueCollection collection) : base(collection)
{
}
Expand Down
2 changes: 2 additions & 0 deletions RestSharp/Authenticators/OAuth1Authenticator.cs
Expand Up @@ -6,6 +6,8 @@

#if WINDOWS_PHONE
using System.Net;
#elif SILVERLIGHT
using System.Windows.Browser;
#else
using RestSharp.Contrib;
#endif
Expand Down