THRIFT-1610:IWebProxy not available on WP7 platform
authorJake Farrell <jfarrell@apache.org>
Sat, 19 May 2012 14:29:15 +0000 (14:29 +0000)
committerJake Farrell <jfarrell@apache.org>
Sat, 19 May 2012 14:29:15 +0000 (14:29 +0000)
Client: csharp
Patch: Jens Geyer

Fix WP7 clients which do not have IWebProxy available.

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1340487 13f79535-47bb-0310-9956-ffa450edef68

lib/csharp/src/Transport/THttpClient.cs

index c875a43..7f04be7 100644 (file)
@@ -40,10 +40,12 @@ namespace Thrift.Transport
 
                private IDictionary<String, String> customHeaders = new Dictionary<string, string>();
 
-        private HttpWebRequest connection = null;
+        private HttpWebRequest connection = null;\r
+#if !SILVERLIGHT
         private IWebProxy proxy = WebRequest.DefaultWebProxy;
-
-               public THttpClient(Uri u)
+#endif\r
+\r
+        public THttpClient(Uri u)
                {
                        uri = u;
             connection = CreateRequest();
@@ -73,6 +75,7 @@ namespace Thrift.Transport
                        }
                }
 
+#if !SILVERLIGHT
         public IWebProxy Proxy
         {
             set
@@ -80,6 +83,7 @@ namespace Thrift.Transport
                 proxy = value;
             }
         }
+#endif
 
                public override bool IsOpen
                {