2009-07-10 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Fri, 10 Jul 2009 07:45:05 +0000 (07:45 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Fri, 10 Jul 2009 07:45:05 +0000 (07:45 -0000)
* ClientBase.cs : some of Silverlight API are backported to full CLR.

svn path=/trunk/mcs/; revision=137680

mcs/class/System.ServiceModel/System.ServiceModel/ChangeLog
mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs

index 421c01d2d2d1bf456f4721ac58c2d054ce6191d1..eaac73b387bc4c669d86e15dff6a0f3c378dc32e 100755 (executable)
@@ -1,3 +1,7 @@
+2009-07-10  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * ClientBase.cs : some of Silverlight API are backported to full CLR.
+
 2009-07-10  Atsushi Enomoto  <atsushi@ximian.com>
 
        * DuplexChannelFactory.cs : fill missing members.
index 3f053741f66c86875b0aab589ce24d1f58aafd8b..1d01ad0e8be487789b522f6cacfee84eba533c4d 100644 (file)
@@ -214,7 +214,6 @@ namespace System.ServiceModel
                        InnerChannel.DisplayInitializationUI ();
                }
 
-#if NET_2_1
                protected T GetDefaultValueForInitialization<T> ()
                {
                        return default (T);
@@ -224,6 +223,9 @@ namespace System.ServiceModel
 
                void RunCompletedCallback (SendOrPostCallback callback, InvokeAsyncCompletedEventArgs args)
                {
+#if !NET_2_1
+                       callback (args);
+#else
                        object dispatcher = dispatcher_main_property.GetValue (null, null);
                        if (dispatcher == null) {
                                callback (args);
@@ -239,6 +241,7 @@ namespace System.ServiceModel
                                }
                        };
                        dispatcher_begin_invoke_method.Invoke (dispatcher, new object [] {a, new object [] {this, new EventArgs ()}});
+#endif
                }
 
                protected void InvokeAsync (BeginOperationDelegate beginOperationDelegate,
@@ -273,7 +276,8 @@ namespace System.ServiceModel
                        begin_async_result = beginOperationDelegate (inValues, cb, userState);
                }
                IAsyncResult begin_async_result;
-#else
+
+#if !NET_2_1
                void IDisposable.Dispose ()
                {
                        Close ();
@@ -358,12 +362,7 @@ namespace System.ServiceModel
 
                #endregion
 
-#if NET_2_1
-               protected
-#else
-               internal
-#endif
-               class InvokeAsyncCompletedEventArgs : AsyncCompletedEventArgs
+               protected class InvokeAsyncCompletedEventArgs : AsyncCompletedEventArgs
                {
                        internal InvokeAsyncCompletedEventArgs (object [] results, Exception error, bool cancelled, object userState)
                                : base (error, cancelled, userState)