From 2e3e22949e84872d0a53b1f25c8a3648e31894f8 Mon Sep 17 00:00:00 2001 From: Christopher McGinnis Date: Wed, 2 Oct 2013 22:37:56 -0700 Subject: [PATCH 1/2] added project which targets windows phone 8 --- .../Properties/AssemblyInfo.cs | 16 + .../RestSharp.WindowsPhone8.csproj | 343 ++++++++++++++++++ RestSharp.WindowsPhone8/packages.config | 3 + 3 files changed, 362 insertions(+) create mode 100644 RestSharp.WindowsPhone8/Properties/AssemblyInfo.cs create mode 100644 RestSharp.WindowsPhone8/RestSharp.WindowsPhone8.csproj create mode 100644 RestSharp.WindowsPhone8/packages.config diff --git a/RestSharp.WindowsPhone8/Properties/AssemblyInfo.cs b/RestSharp.WindowsPhone8/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..0319a3712 --- /dev/null +++ b/RestSharp.WindowsPhone8/Properties/AssemblyInfo.cs @@ -0,0 +1,16 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("RestSharp.WindowsPhone")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("edd38716-2ef8-46c4-8730-c4ed8bc12eed")] \ No newline at end of file diff --git a/RestSharp.WindowsPhone8/RestSharp.WindowsPhone8.csproj b/RestSharp.WindowsPhone8/RestSharp.WindowsPhone8.csproj new file mode 100644 index 000000000..836571042 --- /dev/null +++ b/RestSharp.WindowsPhone8/RestSharp.WindowsPhone8.csproj @@ -0,0 +1,343 @@ + + + + Debug + AnyCPU + 10.0.20506 + 2.0 + {71647E33-714F-4975-8368-71B075045272} + {C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + RestSharp.WindowsPhone + RestSharp.WindowsPhone + v8.0 + + + + + WindowsPhone + false + true + true + 11.0 + + + true + full + false + Bin\Debug + TRACE;DEBUG;WINDOWS_PHONE;MANGO + true + true + prompt + 4 + Bin\Debug\RestSharp.WindowsPhone.xml + false + + + pdbonly + true + Bin\Release + TRACE;WINDOWS_PHONE + true + true + prompt + 4 + Bin\Release\RestSharp.WindowsPhone.xml + false + + + true + Bin\x86\Debug + TRACE;DEBUG;WINDOWS_PHONE;MANGO + Bin\Debug\RestSharp.WindowsPhone.xml + true + full + + + prompt + MinimumRecommendedRules.ruleset + false + + + Bin\x86\Release + TRACE;WINDOWS_PHONE + Bin\Release\RestSharp.WindowsPhone.xml + true + true + pdbonly + + + prompt + MinimumRecommendedRules.ruleset + + + true + Bin\ARM\Debug + TRACE;DEBUG;WINDOWS_PHONE;MANGO + Bin\Debug\RestSharp.WindowsPhone.xml + true + full + + + prompt + MinimumRecommendedRules.ruleset + false + + + Bin\ARM\Release + TRACE;WINDOWS_PHONE + Bin\Release\RestSharp.WindowsPhone.xml + true + true + pdbonly + + + prompt + MinimumRecommendedRules.ruleset + + + + Authenticators\HttpBasicAuthenticator.cs + + + Authenticators\IAuthenticator.cs + + + Authenticators\NtlmAuthenticator.cs + + + Authenticators\OAuth1Authenticator.cs + + + Authenticators\OAuth2Authenticator.cs + + + Authenticators\OAuth\Extensions\CollectionExtensions.cs + + + Authenticators\OAuth\Extensions\OAuthExtensions.cs + + + Authenticators\OAuth\Extensions\StringExtensions.cs + + + Authenticators\OAuth\Extensions\TimeExtensions.cs + + + Authenticators\OAuth\HttpPostParameter.cs + + + Authenticators\OAuth\HttpPostParameterType.cs + + + Authenticators\OAuth\OAuthParameterHandling.cs + + + Authenticators\OAuth\OAuthSignatureMethod.cs + + + Authenticators\OAuth\OAuthSignatureTreatment.cs + + + Authenticators\OAuth\OAuthTools.cs + + + Authenticators\OAuth\OAuthType.cs + + + Authenticators\OAuth\OAuthWebQueryInfo.cs + + + Authenticators\OAuth\OAuthWorkflow.cs + + + Authenticators\OAuth\WebPair.cs + + + Authenticators\OAuth\WebPairCollection.cs + + + Authenticators\OAuth\WebParameter.cs + + + Authenticators\OAuth\WebParameterCollection.cs + + + Authenticators\SimpleAuthenticator.cs + + + Compression\ZLib\Crc32.cs + + + Compression\ZLib\FlushType.cs + + + Compression\ZLib\GZipStream.cs + + + Compression\ZLib\Inflate.cs + + + Compression\ZLib\InfTree.cs + + + Compression\ZLib\ZLib.cs + + + Compression\ZLib\ZLibCodec.cs + + + Compression\ZLib\ZLibConstants.cs + + + Compression\ZLib\ZLibStream.cs + + + Deserializers\DeserializeAsAttribute.cs + + + Deserializers\DotNetXmlDeserializer.cs + + + Deserializers\IDeserializer.cs + + + Deserializers\JsonDeserializer.cs + + + Deserializers\XmlAttributeDeserializer.cs + + + Deserializers\XmlDeserializer.cs + + + Enum.cs + + + Extensions\MiscExtensions.cs + + + Extensions\ReflectionExtensions.cs + + + Extensions\StringExtensions.cs + + + Extensions\ResponseExtensions.cs + + + Extensions\XmlExtensions.cs + + + FileParameter.cs + + + Http.Async.cs + + + Http.cs + + + HttpCookie.cs + + + HttpFile.cs + + + HttpHeader.cs + + + HttpParameter.cs + + + HttpResponse.cs + + + IHttp.cs + + + IHttpFactory.cs + + + IHttpResponse.cs + + + IRestClient.cs + + + IRestRequest.cs + + + IRestResponse.cs + + + Parameter.cs + + + RestClient.Async.cs + + + RestClient.cs + + + RestClientExtensions.cs + + + RestRequest.cs + + + RestResponse.cs + + + RestResponseCookie.cs + + + Serializers\DotNetXmlSerializer.cs + + + Serializers\ISerializer.cs + + + Serializers\JsonSerializer.cs + + + Serializers\SerializeAsAttribute.cs + + + Serializers\XmlSerializer.cs + + + SharedAssemblyInfo.cs + + + SimpleJson.cs + + + Validation\Require.cs + + + Validation\Validate.cs + + + RestRequestAsyncHandle.cs + + + + + + Designer + + + + + + + \ No newline at end of file diff --git a/RestSharp.WindowsPhone8/packages.config b/RestSharp.WindowsPhone8/packages.config new file mode 100644 index 000000000..6b8deb9c9 --- /dev/null +++ b/RestSharp.WindowsPhone8/packages.config @@ -0,0 +1,3 @@ + + + \ No newline at end of file From 3daabc4fd8dec189cabcfc08ca2f1493e6cf37dc Mon Sep 17 00:00:00 2001 From: Christopher McGinnis Date: Sun, 29 Dec 2013 03:54:10 -0800 Subject: [PATCH 2/2] updated to include the new async method --- .../RestSharp.WindowsPhone8.csproj | 13 +++++++++---- RestSharp/IRestClient.cs | 4 ++-- RestSharp/RestClient.Async.cs | 4 ++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/RestSharp.WindowsPhone8/RestSharp.WindowsPhone8.csproj b/RestSharp.WindowsPhone8/RestSharp.WindowsPhone8.csproj index 836571042..97e4edc57 100644 --- a/RestSharp.WindowsPhone8/RestSharp.WindowsPhone8.csproj +++ b/RestSharp.WindowsPhone8/RestSharp.WindowsPhone8.csproj @@ -27,24 +27,26 @@ full false Bin\Debug - TRACE;DEBUG;WINDOWS_PHONE;MANGO + TRACE;DEBUG;WINDOWS_PHONE;MANGO;WP8 true true prompt 4 - Bin\Debug\RestSharp.WindowsPhone.xml + + false pdbonly true Bin\Release - TRACE;WINDOWS_PHONE + TRACE;WINDOWS_PHONE;MANGO;WP8 true true prompt 4 - Bin\Release\RestSharp.WindowsPhone.xml + + false @@ -98,6 +100,9 @@ MinimumRecommendedRules.ruleset + + Extensions\ResponseStatusExtensions.cs + Authenticators\HttpBasicAuthenticator.cs diff --git a/RestSharp/IRestClient.cs b/RestSharp/IRestClient.cs index 8dcc0e2c5..45717f0a7 100644 --- a/RestSharp/IRestClient.cs +++ b/RestSharp/IRestClient.cs @@ -18,7 +18,7 @@ using System.Net; using System.Collections.Generic; using System.Security.Cryptography.X509Certificates; -#if NET4 || MONODROID || MONOTOUCH +#if NET4 || MONODROID || MONOTOUCH || WP8 using System.Threading; using System.Threading.Tasks; #endif @@ -123,7 +123,7 @@ public interface IRestClient IRestResponse ExecuteAsPost(IRestRequest request, string httpMethod) where T : new(); #endif -#if NET4 || MONODROID || MONOTOUCH +#if NET4 || MONODROID || MONOTOUCH || WP8 /// /// Executes the request and callback asynchronously, authenticating if needed /// diff --git a/RestSharp/RestClient.Async.cs b/RestSharp/RestClient.Async.cs index ce19f7054..ad2058f6b 100644 --- a/RestSharp/RestClient.Async.cs +++ b/RestSharp/RestClient.Async.cs @@ -18,7 +18,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading; -#if NET4 || MONODROID || MONOTOUCH +#if NET4 || MONODROID || MONOTOUCH || WP8 using System.Threading.Tasks; #endif using System.Text; @@ -158,7 +158,7 @@ private void DeserializeResponse(IRestRequest request, Action /// Executes a GET-style request asynchronously, authenticating if needed ///