Skip to content

Commit 3e42ddc

Browse files
committed
Added some missing OAuth files to the .NET4 and Silverlight projects
1 parent 3f2e43c commit 3e42ddc

File tree

8 files changed

+67
-29
lines changed

8 files changed

+67
-29
lines changed

RestSharp.Net4/RestSharp.Net4.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@
5353
<Compile Include="..\restsharp\authenticators\NtlmAuthenticator.cs">
5454
<Link>Authenticators\NtlmAuthenticator.cs</Link>
5555
</Compile>
56+
<Compile Include="..\RestSharp\Authenticators\OAuth1Authenticator.cs">
57+
<Link>Authenticators\OAuth1Authenticator.cs</Link>
58+
</Compile>
5659
<Compile Include="..\restsharp\authenticators\OAuth2Authenticator.cs">
5760
<Link>Authenticators\OAuth2Authenticator.cs</Link>
5861
</Compile>

RestSharp.Silverlight/RestSharp.Silverlight.csproj

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,63 @@
7272
<Compile Include="..\RestSharp\Authenticators\NtlmAuthenticator.cs">
7373
<Link>Authenticators\NtlmAuthenticator.cs</Link>
7474
</Compile>
75+
<Compile Include="..\RestSharp\Authenticators\OAuth1Authenticator.cs">
76+
<Link>Authenticators\OAuth1Authenticator.cs</Link>
77+
</Compile>
7578
<Compile Include="..\RestSharp\Authenticators\OAuth2Authenticator.cs">
7679
<Link>Authenticators\OAuth2Authenticator.cs</Link>
7780
</Compile>
81+
<Compile Include="..\restsharp\authenticators\oauth\extensions\CollectionExtensions.cs">
82+
<Link>Authenticators\OAuth\Extensions\CollectionExtensions.cs</Link>
83+
</Compile>
84+
<Compile Include="..\restsharp\authenticators\oauth\extensions\OAuthExtensions.cs">
85+
<Link>Authenticators\OAuth\Extensions\OAuthExtensions.cs</Link>
86+
</Compile>
87+
<Compile Include="..\restsharp\authenticators\oauth\extensions\StringExtensions.cs">
88+
<Link>Authenticators\OAuth\Extensions\StringExtensions.cs</Link>
89+
</Compile>
90+
<Compile Include="..\restsharp\authenticators\oauth\extensions\TimeExtensions.cs">
91+
<Link>Authenticators\OAuth\Extensions\TimeExtensions.cs</Link>
92+
</Compile>
93+
<Compile Include="..\restsharp\authenticators\oauth\HttpPostParameter.cs">
94+
<Link>Authenticators\OAuth\HttpPostParameter.cs</Link>
95+
</Compile>
96+
<Compile Include="..\restsharp\authenticators\oauth\HttpPostParameterType.cs">
97+
<Link>Authenticators\OAuth\HttpPostParameterType.cs</Link>
98+
</Compile>
99+
<Compile Include="..\restsharp\authenticators\oauth\OAuthParameterHandling.cs">
100+
<Link>Authenticators\OAuth\OAuthParameterHandling.cs</Link>
101+
</Compile>
102+
<Compile Include="..\restsharp\authenticators\oauth\OAuthSignatureMethod.cs">
103+
<Link>Authenticators\OAuth\OAuthSignatureMethod.cs</Link>
104+
</Compile>
105+
<Compile Include="..\restsharp\authenticators\oauth\OAuthSignatureTreatment.cs">
106+
<Link>Authenticators\OAuth\OAuthSignatureTreatment.cs</Link>
107+
</Compile>
108+
<Compile Include="..\restsharp\authenticators\oauth\OAuthTools.cs">
109+
<Link>Authenticators\OAuth\OAuthTools.cs</Link>
110+
</Compile>
111+
<Compile Include="..\restsharp\authenticators\oauth\OAuthType.cs">
112+
<Link>Authenticators\OAuth\OAuthType.cs</Link>
113+
</Compile>
114+
<Compile Include="..\restsharp\authenticators\oauth\OAuthWebQueryInfo.cs">
115+
<Link>Authenticators\OAuth\OAuthWebQueryInfo.cs</Link>
116+
</Compile>
117+
<Compile Include="..\restsharp\authenticators\oauth\OAuthWorkflow.cs">
118+
<Link>Authenticators\OAuth\OAuthWorkflow.cs</Link>
119+
</Compile>
120+
<Compile Include="..\restsharp\authenticators\oauth\WebPair.cs">
121+
<Link>Authenticators\OAuth\WebPair.cs</Link>
122+
</Compile>
123+
<Compile Include="..\restsharp\authenticators\oauth\WebPairCollection.cs">
124+
<Link>Authenticators\OAuth\WebPairCollection.cs</Link>
125+
</Compile>
126+
<Compile Include="..\restsharp\authenticators\oauth\WebParameter.cs">
127+
<Link>Authenticators\OAuth\WebParameter.cs</Link>
128+
</Compile>
129+
<Compile Include="..\restsharp\authenticators\oauth\WebParameterCollection.cs">
130+
<Link>Authenticators\OAuth\WebParameterCollection.cs</Link>
131+
</Compile>
78132
<Compile Include="..\RestSharp\Authenticators\SimpleAuthenticator.cs">
79133
<Link>Authenticators\SimpleAuthenticator.cs</Link>
80134
</Compile>
@@ -212,6 +266,9 @@
212266
<ItemGroup>
213267
<None Include="packages.config" />
214268
</ItemGroup>
269+
<ItemGroup>
270+
<Folder Include="Authenticators\NewFolder1\" />
271+
</ItemGroup>
215272
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
216273
<ProjectExtensions>
217274
<VisualStudio>

RestSharp/Authenticators/OAuth/Extensions/CollectionExtensions.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
using System.Collections.Specialized;
44
using System.Text;
55

6-
#if SILVERLIGHT
7-
using Hammock.Silverlight.Compat;
8-
#else
9-
10-
#endif
11-
126
namespace RestSharp.Authenticators.OAuth.Extensions
137
{
148
internal static class CollectionExtensions
@@ -55,7 +49,7 @@ public static void ForEach<T>(this IEnumerable<T> items, Action<T> action)
5549
}
5650
}
5751

58-
#if !WINDOWS_PHONE
52+
#if !WINDOWS_PHONE && !SILVERLIGHT
5953

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

RestSharp/Authenticators/OAuth/Extensions/StringExtensions.cs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,6 @@
55
using System.Text;
66
using System.Text.RegularExpressions;
77

8-
#if SILVERLIGHT && !WindowsPhone
9-
using System.Windows.Browser;
10-
#endif
11-
12-
#if WindowsPhone
13-
using System.Web;
14-
#endif
15-
16-
#if !SILVERLIGHT
17-
18-
#endif
19-
208
namespace RestSharp.Authenticators.OAuth.Extensions
219
{
2210
internal static class StringExtensions
@@ -116,7 +104,7 @@ public static IDictionary<string, string> ParseQueryString(this string query)
116104
}
117105

118106
private const RegexOptions Options =
119-
#if SILVERLIGHT
107+
#if !WINDOWS_PHONE && !SILVERLIGHT
120108
RegexOptions.Compiled | RegexOptions.IgnoreCase;
121109
#else
122110
RegexOptions.IgnoreCase;

RestSharp/Authenticators/OAuth/OAuthWorkflow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
using RestSharp.Authenticators.OAuth.Extensions;
4-
#if !WINDOWS_PHONE
4+
#if !WINDOWS_PHONE && !SILVERLIGHT
55
using RestSharp.Contrib;
66
#endif
77

RestSharp/Authenticators/OAuth/WebPairCollection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public WebPairCollection(IEnumerable<WebPair> parameters)
3030
_parameters = new List<WebPair>(parameters);
3131
}
3232

33-
#if !WINDOWS_PHONE
33+
#if !WINDOWS_PHONE && !SILVERLIGHT
3434
public WebPairCollection(NameValueCollection collection) : this()
3535
{
3636
AddCollection(collection);

RestSharp/Authenticators/OAuth/WebParameterCollection.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
using System.Collections.Generic;
22
using System.Collections.Specialized;
33

4-
#if !SILVERLIGHT
5-
6-
#else
7-
using Hammock.Silverlight.Compat;
8-
#endif
9-
104
namespace RestSharp.Authenticators.OAuth
115
{
126
internal class WebParameterCollection : WebPairCollection
@@ -16,7 +10,7 @@ public WebParameterCollection(IEnumerable<WebPair> parameters)
1610
{
1711
}
1812

19-
#if !WINDOWS_PHONE
13+
#if !WINDOWS_PHONE && !SILVERLIGHT
2014
public WebParameterCollection(NameValueCollection collection) : base(collection)
2115
{
2216
}

RestSharp/Authenticators/OAuth1Authenticator.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
#if WINDOWS_PHONE
88
using System.Net;
9+
#elif SILVERLIGHT
10+
using System.Windows.Browser;
911
#else
1012
using RestSharp.Contrib;
1113
#endif

0 commit comments

Comments
 (0)