瀏覽代碼

use MOONLIGHT symbol

svn path=/trunk/mcs/; revision=153654
Jb Evain 16 年之前
父節點
當前提交
69fc3eefe6

+ 5 - 0
mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog

@@ -1,3 +1,8 @@
+2010-03-16  Jb Evain  <[email protected]>
+
+	* HttpRequestChannel.cs, HttpTransportBindingElement.cs: use
+	MOONLIGHT symbol to disambiguate MonoTouch and Moonlight code.
+
 2010-03-09  Atsushi Enomoto  <[email protected]>
 
 	* HttpListenerManager.cs : For ASP.NET, use correct GenericIdentity

+ 2 - 2
mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs

@@ -93,7 +93,7 @@ namespace System.ServiceModel.Channels
 				((HttpWebRequest) web_request).CookieContainer = cmgr.CookieContainer;
 #endif
 
-#if !NET_2_1 || MONOTOUCH // until we support NetworkCredential like SL4 will do.
+#if !MOONLIGHT // until we support NetworkCredential like SL4 will do.
 			// client authentication (while SL3 has NetworkCredential class, it is not implemented yet. So, it is non-SL only.)
 			var httpbe = (HttpTransportBindingElement) source.Transport;
 			string authType = null;
@@ -377,7 +377,7 @@ w.Close ();
 					// FIXME: Do we need to use the timeout? If so, what happens when the timeout is reached.
 					// Is the current request cancelled and an exception thrown? If so we need to pass the
 					// exception to the Complete () method and allow the result to complete 'normally'.
-#if NET_2_1 || MONOTOUCH
+#if NET_2_1
 					// neither Moonlight nor MonoTouch supports contexts (WaitOne default to false)
 					bool result = wait.WaitOne (Timeout);
 #else

+ 3 - 3
mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs

@@ -47,7 +47,7 @@ namespace System.ServiceModel.Channels
 		string realm = String.Empty;
 		TransferMode transfer_mode;
 		IDefaultCommunicationTimeouts timeouts;
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
 		AuthenticationSchemes auth_scheme =
 			AuthenticationSchemes.Anonymous;
 		AuthenticationSchemes proxy_auth_scheme =
@@ -75,13 +75,13 @@ namespace System.ServiceModel.Channels
 			transfer_mode = other.transfer_mode;
 			// FIXME: it does not look safe
 			timeouts = other.timeouts;
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
 			auth_scheme = other.auth_scheme;
 			proxy_auth_scheme = other.proxy_auth_scheme;
 #endif
 		}
 
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
 		public AuthenticationSchemes AuthenticationScheme {
 			get { return auth_scheme; }
 			set { auth_scheme = value; }

+ 6 - 0
mcs/class/System.ServiceModel/System.ServiceModel.Description/ChangeLog

@@ -1,3 +1,9 @@
+2010-03-16  Jb Evain  <[email protected]>
+
+	* ClientCredentials.cs, ContractDescription.cs,
+	IEndpointBehavior.cs: use MOONLIGHT symbol to disambiguate
+	MonoTouch and Moonlight code.
+
 2010-03-15  Atsushi Enomoto  <[email protected]>
 
 	* ServiceEndpointCollection.cs : those overrides are rather to check

+ 1 - 1
mcs/class/System.ServiceModel/System.ServiceModel.Description/ClientCredentials.cs

@@ -140,7 +140,7 @@ namespace System.ServiceModel.Description
 		}
 #endif
 
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
 		void IEndpointBehavior.AddBindingParameters (ServiceEndpoint endpoint,
 			BindingParameterCollection parameters)
 		{

+ 1 - 1
mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescription.cs

@@ -153,7 +153,7 @@ namespace System.ServiceModel.Description
 			foreach (OperationDescription od in Operations) {
 				if (!proxy.Operations.Contains (od.Name))
 					PopulateClientOperation (proxy, od);
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
 				foreach (IOperationBehavior ob in od.Behaviors)
 					ob.ApplyClientBehavior (od, proxy.Operations [od.Name]);
 #endif

+ 1 - 1
mcs/class/System.ServiceModel/System.ServiceModel.Description/IEndpointBehavior.cs

@@ -33,7 +33,7 @@ namespace System.ServiceModel.Description
 {
 	public interface IEndpointBehavior
 	{
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
 		void AddBindingParameters (ServiceEndpoint endpoint,
 			BindingParameterCollection parameters);
 #if !NET_2_1

+ 5 - 0
mcs/class/System.ServiceModel/System.ServiceModel/ChangeLog

@@ -1,3 +1,8 @@
+2010-03-16  Jb Evain  <[email protected]>
+
+	* ClientBase.cs, ClientRuntimeChannel.cs: use MOONLIGHT symbol to
+	disambiguate MonoTouch and Moonlight code.
+
 2010-03-15  Atsushi Enomoto  <[email protected]>
 
 	* ServiceHostBase.cs : do not reject endpoints with an identical

+ 5 - 5
mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs

@@ -39,13 +39,13 @@ namespace System.ServiceModel
 {
 	[MonoTODO ("It somehow rejects classes, but dunno how we can do that besides our code wise.")]
 	public abstract class ClientBase<TChannel> :
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
 		IDisposable,
 #endif
 		ICommunicationObject where TChannel : class
 	{
 		static InstanceContext initialContxt = new InstanceContext (null);
-#if NET_2_1 && !MONOTOUCH
+#if MOONLIGHT
 		static readonly PropertyInfo dispatcher_main_property;
 		static readonly MethodInfo dispatcher_begin_invoke_method;
 
@@ -222,7 +222,7 @@ namespace System.ServiceModel
 
 		void RunCompletedCallback (SendOrPostCallback callback, InvokeAsyncCompletedEventArgs args)
 		{
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
 			callback (args);
 #else
 			object dispatcher = dispatcher_main_property.GetValue (null, null);
@@ -276,7 +276,7 @@ namespace System.ServiceModel
 		}
 		IAsyncResult begin_async_result;
 
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
 		void IDisposable.Dispose ()
 		{
 			Close ();
@@ -402,7 +402,7 @@ namespace System.ServiceModel
 				}
 			}
 
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
 			protected object Invoke (string methodName, object [] args)
 			{
 				var cd = endpoint.Contract;

+ 1 - 1
mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs

@@ -166,7 +166,7 @@ namespace System.ServiceModel.MonoInternal
 				}
 			}
 
-#if !NET_2_1 || MONOTOUCH
+#if !MOONLIGHT
 			public override bool WaitOne (int millisecondsTimeout, bool exitContext)
 			{
 				return WaitHandle.WaitAll (ResultWaitHandles, millisecondsTimeout, exitContext);