2010-03-24 Rodrigo Kumpera <rkumpera@novell.com>
authorRodrigo Kumpera <kumpera@gmail.com>
Wed, 24 Mar 2010 22:27:53 +0000 (22:27 -0000)
committerRodrigo Kumpera <kumpera@gmail.com>
Wed, 24 Mar 2010 22:27:53 +0000 (22:27 -0000)
* Assembly.cs: Make it a partial class under !v4.

* MonoAssembly.cs: New type that exists only under
v4. Under v2 it is a part of Assembly.

This is the initial setup to make v4 Assembly an
abstract type where all methods raise exceptions.

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

mcs/class/corlib/System.Reflection/Assembly.cs
mcs/class/corlib/System.Reflection/ChangeLog
mcs/class/corlib/System.Reflection/MonoAssembly.cs [new file with mode: 0644]
mcs/class/corlib/corlib.dll.sources

index 703e845ae84dced4dc801f32ba82a54449d46e70..147c52ce94ac080135a75f1834676bcaa2fae746 100644 (file)
@@ -52,11 +52,12 @@ namespace System.Reflection {
        [Serializable]
        [ClassInterface(ClassInterfaceType.None)]
 #if NET_2_1
-       public class Assembly : ICustomAttributeProvider, _Assembly {
-#else
+       public partial class Assembly : ICustomAttributeProvider, _Assembly {
+#elseif NET_4_0
        public class Assembly : ICustomAttributeProvider, _Assembly, IEvidenceFactory, ISerializable {
+#else
+       public partial class Assembly : ICustomAttributeProvider, _Assembly, IEvidenceFactory, ISerializable {
 #endif
-
                internal class ResolveEventHolder {
                        public event ModuleResolveEventHandler ModuleResolve;
                }
@@ -76,7 +77,12 @@ namespace System.Reflection {
                private bool fromByteArray;
                private string assemblyName;
 
-               internal Assembly () 
+#if NET_4_0
+               protected
+#else
+               internal
+#endif
+               Assembly () 
                {
                        resolve_event_holder = new ResolveEventHolder ();
                }
index 8905b77e562e7f475726dd130e296d313b7415d3..dcfcb4a37673e8da617bc76f5913f90982b3023f 100644 (file)
@@ -1,3 +1,13 @@
+2010-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * Assembly.cs: Make it a partial class under !v4.
+
+       * MonoAssembly.cs: New type that exists only under
+       v4. Under v2 it is a part of Assembly.
+
+       This is the initial setup to make v4 Assembly an
+       abstract type where all methods raise exceptions.
+
 2010-03-24  Rolf Bjarne Kvinge  <RKvinge@novell.com>
 
        * MethodInfo.cs: Exclude IsGenericMethod* and ContainsGenericParameters
diff --git a/mcs/class/corlib/System.Reflection/MonoAssembly.cs b/mcs/class/corlib/System.Reflection/MonoAssembly.cs
new file mode 100644 (file)
index 0000000..8bbf2a6
--- /dev/null
@@ -0,0 +1,47 @@
+//
+// System.Reflection/MonoAssembly.cs
+//
+// Author:
+//   Rodrigo Kumpera (rkumpera@novell.com)
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Runtime.InteropServices;
+
+namespace System.Reflection {
+
+#if NET_4_0
+       [ComVisible (true)]
+       [ComDefaultInterfaceAttribute (typeof (_Assembly))]
+       [Serializable]
+       [ClassInterface(ClassInterfaceType.None)]
+       public class MonoAssembly : Assembly {
+#else
+       public partial class Assemby {
+#endif
+
+       }
+}
+
+
index c4cfd60db9600503f6378b5f11cf00be04bfefa1..683bcbadae673ad66a24d586d4e7d76b5fdb6073 100644 (file)
@@ -506,6 +506,7 @@ System.Reflection/MethodInfo.cs
 System.Reflection/Missing.cs
 System.Reflection/Module.cs
 System.Reflection/ModuleResolveEventHandler.cs
+System.Reflection/MonoAssembly.cs
 System.Reflection/MonoGenericClass.cs
 System.Reflection/MonoGenericMethod.cs
 System.Reflection/MonoEvent.cs