瀏覽代碼

Kill the MOONLIGHT define in System.Core.

Rodrigo Kumpera 13 年之前
父節點
當前提交
486ee8d8f4

+ 1 - 1
mcs/class/System.Core/Assembly/AssemblyInfo.cs

@@ -67,7 +67,7 @@ using System.Runtime.InteropServices;
 
 [assembly: ComVisible (false)]
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
 [assembly: TypeForwardedTo (typeof (System.Security.Cryptography.Aes))]
 #endif
 

+ 1 - 1
mcs/class/System.Core/System.Collections.Generic/HashSet.cs

@@ -44,7 +44,7 @@ namespace System.Collections.Generic {
 	[DebuggerDisplay ("Count={Count}")]
 	[DebuggerTypeProxy (typeof (CollectionDebuggerView<,>))]
 	public class HashSet<T> : ICollection<T>, ISerializable, IDeserializationCallback
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
 							, ISet<T>
 #endif
 	{

+ 1 - 1
mcs/class/System.Core/System.Linq/Enumerable.cs

@@ -3072,7 +3072,7 @@ namespace System.Linq
 
 		#endregion
 		
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
 		#region Zip
 		
 		public static IEnumerable<TResult> Zip<TFirst, TSecond, TResult> (this IEnumerable<TFirst> first, IEnumerable<TSecond> second, Func<TFirst, TSecond, TResult> resultSelector)

+ 1 - 1
mcs/class/System.Core/System.Linq/EnumerableExecutor.cs

@@ -26,7 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
 
 namespace System.Linq
 {

+ 1 - 1
mcs/class/System.Core/System.Linq/EnumerableExecutor_T.cs

@@ -26,7 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
 
 using System.Linq.Expressions;
 

+ 1 - 1
mcs/class/System.Core/System.Linq/EnumerableQuery.cs

@@ -26,7 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
 
 namespace System.Linq
 {

+ 1 - 1
mcs/class/System.Core/System.Linq/EnumerableQuery_T.cs

@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
 
 using System.Collections;
 using System.Collections.Generic;

+ 1 - 1
mcs/class/System.Core/System.Linq/Queryable.cs

@@ -1603,7 +1603,7 @@ namespace System.Linq {
 
 		#endregion
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
 		#region Zip
 
 		public static IQueryable<TResult> Zip<TFirst, TSecond, TResult> (this IQueryable<TFirst> source1, IEnumerable<TSecond> source2, Expression<Func<TFirst, TSecond, TResult>> resultSelector)

+ 1 - 1
mcs/class/System.Core/System.Runtime.CompilerServices/DynamicAttribute.cs

@@ -26,7 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
 
 using System;
 using System.Collections.Generic;

+ 6 - 6
mcs/class/System.Core/System.Runtime.CompilerServices/ExecutionScope.cs

@@ -33,7 +33,7 @@ using System.Linq.Expressions;
 
 namespace System.Runtime.CompilerServices {
 
-#if MOONLIGHT || MONODROID
+#if MONODROID
 	[Obsolete ("do not use this type", true)]
 #endif
 	public class ExecutionScope {
@@ -42,12 +42,12 @@ namespace System.Runtime.CompilerServices {
 		public object [] Locals;
 		public ExecutionScope Parent;
 
-#if !MOONLIGHT && !MONODROID
+#if !MONODROID
 		internal CompilationContext context;
 #endif
 		internal int compilation_unit;
 
-#if !MOONLIGHT && !MONODROID
+#if !MONODROID
 		ExecutionScope (CompilationContext context, int compilation_unit)
 		{
 			this.context = context;
@@ -69,7 +69,7 @@ namespace System.Runtime.CompilerServices {
 #endif
 		public Delegate CreateDelegate (int indexLambda, object [] locals)
 		{
-#if MOONLIGHT || MONODROID
+#if MONODROID
 			throw new NotSupportedException ();
 #else
 			return context.CreateDelegate (
@@ -80,7 +80,7 @@ namespace System.Runtime.CompilerServices {
 
 		public object [] CreateHoistedLocals ()
 		{
-#if MOONLIGHT || MONODROID
+#if MONODROID
 			throw new NotSupportedException ();
 #else
 			return context.CreateHoistedLocals (compilation_unit);
@@ -89,7 +89,7 @@ namespace System.Runtime.CompilerServices {
 
 		public Expression IsolateExpression (Expression expression, object [] locals)
 		{
-#if MOONLIGHT || MONODROID
+#if MONODROID
 			throw new NotSupportedException ();
 #else
 			return context.IsolateExpression (this, locals, expression);

+ 1 - 1
mcs/class/System.Core/System.Runtime.CompilerServices/StrongBox_T.cs

@@ -32,7 +32,7 @@ namespace System.Runtime.CompilerServices {
 
 		public T Value;
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
 		public StrongBox ()
 		{
 		}

+ 39 - 43
mcs/class/System.Core/System.Security.Cryptography/Aes.cs

@@ -1,13 +1,13 @@
-//
+//
 // System.Security.Cryptography.Aes.cs
-//	based on mcs/class/corlib/System.Security.Cryptography/Rijndael.cs
-//
+//	based on mcs/class/corlib/System.Security.Cryptography/Rijndael.cs
+//
 // Authors:
-//	Dan Lewis ([email protected])
+//	Dan Lewis ([email protected])
 //	Andrew Birkett ([email protected])
-//	Sebastien Pouliot  <[email protected]>
-//
-// (C) 2002
+//	Sebastien Pouliot  <[email protected]>
+//
+// (C) 2002
 // Copyright (C) 2004-2006,2008 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
@@ -31,20 +31,20 @@
 //
 
 // Since 4.0 (both FX and SL) this type is defined in mscorlib - before 4.0 it was in System.Core.dll
-#if (INSIDE_CORLIB && (NET_4_0 || MOONLIGHT || MOBILE)) || (!INSIDE_CORLIB && !NET_4_0 && !MOONLIGHT && !MOBILE)
-
+#if (INSIDE_CORLIB && (NET_4_0 || MOBILE)) || (!INSIDE_CORLIB && !NET_4_0 && !MOBILE)
+
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
-
-namespace System.Security.Cryptography {
+
+namespace System.Security.Cryptography {
 
 	// References:
 	// a.	FIPS PUB 197: Advanced Encryption Standard
 	//	http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf
 
 #if INSIDE_CORLIB
-	// since 4.0 (both FX and SL) this type now resides inside mscorlib.dll and link back to System.Core.dll
-	#if MOONLIGHT || MOBILE
+	// since 4.0 (both FX and SL) this type now resides inside mscorlib.dll and link back to System.Core.dll
+	#if MOBILE
 	// version has not changed between SL3 (System.Core) and SL4
 	[TypeForwardedFrom (Consts.AssemblySystem_Core)]
 	#elif NET_4_0
@@ -52,39 +52,35 @@ namespace System.Security.Cryptography {
 	[TypeForwardedFrom ("System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
 	#endif
 #endif
-	public abstract class Aes : SymmetricAlgorithm {
+	public abstract class Aes : SymmetricAlgorithm {
+
+		public static new Aes Create () 
+		{
+#if FULL_AOT_RUNTIME
+			// The Aes base class was moved from System.Core to mscorlib - so we can't just return a new AesCryptoServiceProvider instance
+			// note: the linker is aware of this condition
+			return (Aes) Activator.CreateInstance (Type.GetType ("System.Security.Cryptography.AesManaged, " + Consts.AssemblySystem_Core));
+#else
+			return Create ("System.Security.Cryptography.AesCryptoServiceProvider, " + Consts.AssemblySystem_Core);
+#endif
+		}
 
-		public static new Aes Create () 
-		{
-#if FULL_AOT_RUNTIME
-			// The Aes base class was moved from System.Core to mscorlib - so we can't just return a new AesCryptoServiceProvider instance
-			// note: the linker is aware of this condition
-			return (Aes) Activator.CreateInstance (Type.GetType ("System.Security.Cryptography.AesManaged, " + Consts.AssemblySystem_Core));
-#else
-			return Create ("System.Security.Cryptography.AesCryptoServiceProvider, " + Consts.AssemblySystem_Core);
-#endif
-		}
-
-		public static new Aes Create (string algorithmName) 
-		{
-			return (Aes) CryptoConfig.CreateFromName (algorithmName);
-		}
+		public static new Aes Create (string algorithmName) 
+		{
+			return (Aes) CryptoConfig.CreateFromName (algorithmName);
+		}
 
 		protected Aes ()
-		{
-			KeySizeValue = 256;
+		{
+			KeySizeValue = 256;
 			BlockSizeValue = 128;
-#if !MOONLIGHT
-			// Silverlight 2.0 only supports CBC mode (i.e. no feedback)
-			FeedbackSizeValue = 128;
-#endif
-			LegalKeySizesValue = new KeySizes [1];
-			LegalKeySizesValue [0] = new KeySizes (128, 256, 64);
-
-			LegalBlockSizesValue = new KeySizes [1];
-			LegalBlockSizesValue [0] = new KeySizes (128, 128, 0);
-		}
-	}
-}
+			LegalKeySizesValue = new KeySizes [1];
+			LegalKeySizesValue [0] = new KeySizes (128, 256, 64);
+
+			LegalBlockSizesValue = new KeySizes [1];
+			LegalBlockSizesValue [0] = new KeySizes (128, 128, 0);
+		}
+	}
+}
 #endif
 

+ 0 - 24
mcs/class/System.Core/System/Actions.cs

@@ -35,8 +35,6 @@ using System.Runtime.CompilerServices;
 [assembly:TypeForwardedTo (typeof(Action<,,>))]
 [assembly:TypeForwardedTo (typeof(Action<,,,>))]
 [assembly:TypeForwardedTo (typeof (Action))]
-#elif MOONLIGHT
-[assembly:TypeForwardedTo (typeof (Action))]
 #endif
 
 namespace System
@@ -65,28 +63,6 @@ namespace System
 
 	public delegate void Action<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9, in T10, in T11, in T12, in T13, in T14, in T15, in T16> (
 		T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16);
-#elif MOONLIGHT
-	// Action, Action<T> are defined in mscorlib.dll for SL4
-	public delegate void Action <T1, T2> (T1 arg1, T2 arg2);
-	public delegate void Action <T1, T2, T3> (T1 arg1, T2 arg2, T3 arg3);
-	public delegate void Action <T1, T2, T3, T4> (T1 arg1, T2 arg2, T3 arg3, T4 arg4);
-	// Action<T1..T5> to <T1..T8> are defined in mscorlib.dll for SL4
-	public delegate void Action <T1, T2, T3, T4, T5, T6, T7, T8, T9> (
-		T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9);
-	public delegate void Action <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> (
-		T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10);
-	public delegate void Action <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> (
-		T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11);
-	public delegate void Action <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> (
-		T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12);
-	public delegate void Action <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> (
-		T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13);
-	public delegate void Action <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> (
-		T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14);
-	public delegate void Action <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> (
-		T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15);
-	public delegate void Action <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> (
-		T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16);
 #else
 	public delegate void Action ();
 	public delegate void Action<T1, T2> (T1 arg1, T2 arg2);

+ 0 - 28
mcs/class/System.Core/System/Funcs.cs

@@ -68,33 +68,5 @@ namespace System
 	public delegate TResult Func<T1, T2, TResult> (T1 arg1, T2 arg2);
 	public delegate TResult Func<T1, T2, T3, TResult> (T1 arg1, T2 arg2, T3 arg3);
 	public delegate TResult Func<T1, T2, T3, T4, TResult> (T1 arg1, T2 arg2, T3 arg3, T4 arg4);
-
-	#if MOONLIGHT
-	// Func<T1..T5,Result> to >T1..T8,TResult> are defined in mscorlib.dll for SL4
-
-	public delegate TResult Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult> (
-		T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9);
-
-	public delegate TResult Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult> (
-		T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10);
-
-	public delegate TResult Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TResult> (
-		T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11);
-
-	public delegate TResult Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult> (
-		T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12);
-
-	public delegate TResult Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult> (
-		T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13);
-
-	public delegate TResult Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TResult> (
-		T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14);
-
-	public delegate TResult Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult> (
-		T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15);
-
-	public delegate TResult Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult> (
-		T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16);
-	#endif
 #endif
 }

+ 1 - 1
mcs/class/System.Core/System/InvalidTimeZoneException.cs

@@ -24,7 +24,7 @@
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
 
 using System;
 using System.Runtime.CompilerServices;

+ 1 - 1
mcs/class/System.Core/System/TimeZoneInfo.AdjustmentRule.cs

@@ -24,7 +24,7 @@
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#if (INSIDE_CORLIB && (NET_4_0 || MOONLIGHT || MOBILE)) || (!INSIDE_CORLIB && (NET_3_5 && !NET_4_0 && !MOBILE))
+#if (INSIDE_CORLIB && (NET_4_0 || MOBILE)) || (!INSIDE_CORLIB && (NET_3_5 && !NET_4_0 && !MOBILE))
 using System.Runtime.CompilerServices;
 using System.Runtime.Serialization;
 

+ 1 - 1
mcs/class/System.Core/System/TimeZoneInfo.TransitionTime.cs

@@ -24,7 +24,7 @@
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#if (INSIDE_CORLIB && (NET_4_0 || MOONLIGHT || MOBILE)) || (!INSIDE_CORLIB && (NET_3_5 && !NET_4_0 && !MOBILE))
+#if (INSIDE_CORLIB && (NET_4_0 || MOBILE)) || (!INSIDE_CORLIB && (NET_3_5 && !NET_4_0 && !MOBILE))
 
 using System.Runtime.CompilerServices;
 using System.Runtime.Serialization;

+ 2 - 2
mcs/class/System.Core/System/TimeZoneInfo.cs

@@ -29,11 +29,11 @@
 using System;
 using System.Runtime.CompilerServices;
 
-#if !INSIDE_CORLIB && (NET_4_0 || MOONLIGHT || MOBILE)
+#if !INSIDE_CORLIB && (NET_4_0 || MOBILE)
 
 [assembly:TypeForwardedTo (typeof(TimeZoneInfo))]
 
-#elif (INSIDE_CORLIB && (NET_4_0 || MOONLIGHT || MOBILE)) || (!INSIDE_CORLIB && (NET_3_5 && !NET_4_0 && !MOBILE))
+#elif (INSIDE_CORLIB && (NET_4_0 || MOBILE)) || (!INSIDE_CORLIB && (NET_3_5 && !NET_4_0 && !MOBILE))
 
 using System.Collections.Generic;
 using System.Collections.ObjectModel;

+ 1 - 1
mcs/class/System.Core/System/TimeZoneNotFoundException.cs

@@ -24,7 +24,7 @@
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0 || MOBILE
 
 using System;
 using System.Runtime.CompilerServices;