2005-06-07 Zoltan Varga <vargaz@freemail.hu>
authorZoltan Varga <vargaz@gmail.com>
Tue, 7 Jun 2005 12:36:45 +0000 (12:36 -0000)
committerZoltan Varga <vargaz@gmail.com>
Tue, 7 Jun 2005 12:36:45 +0000 (12:36 -0000)
* *.cs: Updates for net 2.0 beta 2.

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

29 files changed:
mcs/class/corlib/System.Reflection/AssemblyAlgorithmIdAttribute.cs
mcs/class/corlib/System.Reflection/AssemblyCompanyAttribute.cs
mcs/class/corlib/System.Reflection/AssemblyConfigurationAttribute.cs
mcs/class/corlib/System.Reflection/AssemblyCopyrightAttribute.cs
mcs/class/corlib/System.Reflection/AssemblyCultureAttribute.cs
mcs/class/corlib/System.Reflection/AssemblyDefaultAliasAttribute.cs
mcs/class/corlib/System.Reflection/AssemblyDelaySignAttribute.cs
mcs/class/corlib/System.Reflection/AssemblyDescriptionAttribute.cs
mcs/class/corlib/System.Reflection/AssemblyFileVersionAttribute.cs
mcs/class/corlib/System.Reflection/AssemblyFlagsAttribute.cs
mcs/class/corlib/System.Reflection/AssemblyInformationalVersionAttribute.cs
mcs/class/corlib/System.Reflection/AssemblyKeyFileAttribute.cs
mcs/class/corlib/System.Reflection/AssemblyKeyNameAttribute.cs
mcs/class/corlib/System.Reflection/AssemblyNameFlags.cs
mcs/class/corlib/System.Reflection/AssemblyProductAttribute.cs
mcs/class/corlib/System.Reflection/AssemblyTitleAttribute.cs
mcs/class/corlib/System.Reflection/AssemblyTradeMarkAttribute.cs
mcs/class/corlib/System.Reflection/AssemblyVersionAttribute.cs
mcs/class/corlib/System.Reflection/ChangeLog
mcs/class/corlib/System.Reflection/ConstructorInfo.cs
mcs/class/corlib/System.Reflection/FieldInfo.cs
mcs/class/corlib/System.Reflection/InterfaceMapping.cs
mcs/class/corlib/System.Reflection/MethodImplAttributes.cs
mcs/class/corlib/System.Reflection/MonoField.cs
mcs/class/corlib/System.Reflection/ParameterInfo.cs
mcs/class/corlib/System.Reflection/Pointer.cs
mcs/class/corlib/System.Reflection/PortableExecutableKinds.cs
mcs/class/corlib/System.Reflection/ProcessorArchitecture.cs
mcs/class/corlib/System.Reflection/TypeDelegator.cs

index 742d62bfe0ca5a9500fd906f1c44202fbc53dc2e..97ec80045c1acd96fb99b5b37110595ad8ecf12c 100644 (file)
@@ -37,8 +37,10 @@ namespace System.Reflection
 {
 #if NET_2_0
        [ComVisible (true)]
-#endif
+       [AttributeUsage (AttributeTargets.Assembly, Inherited=false)]
+#else
        [AttributeUsage (AttributeTargets.Assembly)]
+#endif
        public sealed class AssemblyAlgorithmIdAttribute : Attribute
        {
                // Field
index e95985ce898053b49f3f3882df8473453a0f931b..5c50d24a32fc56cb571800b3aefea3755fb30afc 100644 (file)
@@ -36,8 +36,10 @@ namespace System.Reflection
 {
 #if NET_2_0
        [ComVisible (true)]
-#endif
+       [AttributeUsage (AttributeTargets.Assembly, Inherited=false)]
+#else
        [AttributeUsage (AttributeTargets.Assembly)]
+#endif
        public sealed class AssemblyCompanyAttribute : Attribute
        {
                // Field
index c758d9c85d808a5163926e8629bc4eb065c17f58..e7789c9089a75ca8ede70bce7eb0ce14cf9aa04c 100644 (file)
@@ -36,8 +36,10 @@ namespace System.Reflection
 {
 #if NET_2_0
        [ComVisible (true)]
-#endif
+       [AttributeUsage (AttributeTargets.Assembly, Inherited=false)]
+#else
        [AttributeUsage (AttributeTargets.Assembly)]
+#endif
        public sealed class AssemblyConfigurationAttribute : Attribute
        {
                // Field
index 8934b79d814cc5b20d680b9d62796b55eda5a6e2..2380b671c592266b5efe308d1891cbefff411604 100644 (file)
@@ -36,8 +36,10 @@ namespace System.Reflection
 {
 #if NET_2_0
        [ComVisible (true)]
-#endif
+       [AttributeUsage (AttributeTargets.Assembly, Inherited=false)]
+#else
        [AttributeUsage (AttributeTargets.Assembly)]
+#endif
        public sealed class AssemblyCopyrightAttribute : Attribute
        {
                // Field
index 8d1f54f74cc85501f445e85f65a3ab7392927a2b..47f1a9a11a65f08132dc7b4155ce5f28f6c0c318 100644 (file)
@@ -36,8 +36,10 @@ namespace System.Reflection
 {
 #if NET_2_0
        [ComVisible (true)]
-#endif
+       [AttributeUsage (AttributeTargets.Assembly, Inherited=false)]
+#else
        [AttributeUsage (AttributeTargets.Assembly)]
+#endif
        public sealed class AssemblyCultureAttribute : Attribute
        {
                // Field
index 4d78a784fe236e5f76328707afb0e43da68957e4..aa788b46e65a786c0f9d2c281f808deda76c8706 100644 (file)
@@ -36,8 +36,10 @@ namespace System.Reflection
 {
 #if NET_2_0
        [ComVisible (true)]
-#endif
+       [AttributeUsage (AttributeTargets.Assembly, Inherited=false)]
+#else
        [AttributeUsage (AttributeTargets.Assembly)]
+#endif
        public sealed class AssemblyDefaultAliasAttribute : Attribute
        {
                // Field
index 4b8182dbca475e7935ffc04448e06032836effff..cd9f4da0aca0c2ff8b5672135f8fa7cfc9eb2d67 100644 (file)
@@ -35,8 +35,10 @@ namespace System.Reflection
 {
 #if NET_2_0
        [ComVisible (true)]
-#endif
+       [AttributeUsage (AttributeTargets.Assembly, Inherited=false)]
+#else
        [AttributeUsage (AttributeTargets.Assembly)]
+#endif
        public sealed class AssemblyDelaySignAttribute : Attribute
        {
                // Field
index f1778b7f8c394650b196976f4cf3514648341475..9937d1bee37bbeb5f8ef4de9f1672046ebd817c1 100644 (file)
@@ -35,8 +35,10 @@ namespace System.Reflection
 {
 #if NET_2_0
        [ComVisible (true)]
-#endif
+       [AttributeUsage (AttributeTargets.Assembly, Inherited=false)]
+#else
        [AttributeUsage (AttributeTargets.Assembly)]
+#endif
        public sealed class AssemblyDescriptionAttribute : Attribute
        {
                // Field
index 65ee99f6286920efd96ed75a3d79c51c3ba17bc5..0b68336ba8d2e486b13ecc77c3829ec169a1bca0 100644 (file)
@@ -35,8 +35,10 @@ namespace System.Reflection
 {
 #if NET_2_0
        [ComVisible (true)]
-#endif
+       [AttributeUsage (AttributeTargets.Assembly, Inherited=false)]
+#else
        [AttributeUsage (AttributeTargets.Assembly)]
+#endif
        public sealed class AssemblyFileVersionAttribute : Attribute
        {
                // Field
index 13752fc2dc83da878252600a6c9d440cb84060cb..a52f439140ab20a9def8569084a823b23d1b4a72 100644 (file)
@@ -35,8 +35,10 @@ namespace System.Reflection
 {
 #if NET_2_0
        [ComVisible (true)]
-#endif
+       [AttributeUsage (AttributeTargets.Assembly, Inherited=false)]
+#else
        [AttributeUsage (AttributeTargets.Assembly)]
+#endif
        public sealed class AssemblyFlagsAttribute : Attribute
        {
                // Field
index 18e840ce869f2d31fce1703c7eb02d22d0b88f6c..03a26b7efd224b2cf90ef239de5512dea5747164 100644 (file)
@@ -35,8 +35,10 @@ namespace System.Reflection
 {
 #if NET_2_0
        [ComVisible (true)]
-#endif
+       [AttributeUsage (AttributeTargets.Assembly, Inherited=false)]
+#else
        [AttributeUsage (AttributeTargets.Assembly)]
+#endif
        public sealed class AssemblyInformationalVersionAttribute : Attribute
        {
                // Field
index e3bc1f7242d5fb02e274bdbd2ab692161ba9d89c..5bc980b2f59ba98842063e483d17174d6aa057e3 100644 (file)
@@ -35,8 +35,10 @@ namespace System.Reflection
 {
 #if NET_2_0
        [ComVisible (true)]
-#endif
+       [AttributeUsage (AttributeTargets.Assembly, Inherited=false)]
+#else
        [AttributeUsage (AttributeTargets.Assembly)]
+#endif
        public sealed class AssemblyKeyFileAttribute : Attribute
        {
                // Field
index 5eb2ecc6e9986209fd094bf2c50e5f7d7bc4828f..fa7fb951ca43e8db0d70c6ea1551caad5ec41781 100644 (file)
@@ -35,8 +35,10 @@ namespace System.Reflection
 {
 #if NET_2_0
        [ComVisible (true)]
-#endif
+       [AttributeUsage (AttributeTargets.Assembly, Inherited=false)]
+#else
        [AttributeUsage (AttributeTargets.Assembly)]
+#endif
        public sealed class AssemblyKeyNameAttribute : Attribute
        {
                // Field
index 7803af1303c816d9774a4ceaf6dc3c56fdfa966e..4ce505d09cbefd955a746a1b5426ccaeb00e7bb3 100644 (file)
@@ -60,11 +60,17 @@ namespace System.Reflection {
 #endif
 
 #if NET_2_0
+               [Obsolete ("This will be removed before Whidbey ships.  There will be no replacement for Whidbey.")]
                Library = 0x2,
+               [Obsolete ("This will be removed before Whidbey ships.  There will be no replacement for Whidbey.")]
                AppDomainPlatform = 0x4,
+               [Obsolete ("This will be removed before Whidbey ships.  There will be no replacement for Whidbey.")]
                ProcessPlatform = 0x6,
+               [Obsolete ("This will be removed before Whidbey ships.  There will be no replacement for Whidbey.")]
                SystemPlatform = 0x8,
+               [Obsolete ("This will be removed before Whidbey ships.  There will be no replacement for Whidbey.")]
                LongevityMask = 0xe,
+               [Obsolete ("This will be removed before Whidbey ships.  There will be no replacement for Whidbey.")]
                LongevityUnspecified = 0x0,
                EnableJITcompileOptimizer = 0x4000,
                EnableJITcompileTracking = 0x8000
index 55a976cfc60ae09605b29b09089ae6e44e6fec0a..e8f2a7105386e57986d54d411b6caa05382e3901 100644 (file)
@@ -35,8 +35,10 @@ namespace System.Reflection
 {
 #if NET_2_0
        [ComVisible (true)]
-#endif
+       [AttributeUsage (AttributeTargets.Assembly, Inherited=false)]
+#else
        [AttributeUsage (AttributeTargets.Assembly)]
+#endif
        public sealed class AssemblyProductAttribute : Attribute
        {
                // Field
index e316cca43a9c4d3200189ddf62e001ef8b331652..721ad3ba5cba5d1515c38b141f5715f90aa54348 100644 (file)
@@ -35,8 +35,10 @@ namespace System.Reflection
 {
 #if NET_2_0
        [ComVisible (true)]
-#endif
+       [AttributeUsage (AttributeTargets.Assembly, Inherited=false)]
+#else
        [AttributeUsage (AttributeTargets.Assembly)]
+#endif
        public sealed class AssemblyTitleAttribute : Attribute
        {
                // Field
index 8efefaca3dd2cad14cbf5443bc4fe4bb313ddaca..92757d86dd906d6d77e01d47683ea93ef90d8685 100644 (file)
@@ -35,8 +35,10 @@ namespace System.Reflection
 {
 #if NET_2_0
        [ComVisible (true)]
-#endif
+       [AttributeUsage (AttributeTargets.Assembly, Inherited=false)]
+#else
        [AttributeUsage (AttributeTargets.Assembly)]
+#endif
        public sealed class AssemblyTrademarkAttribute : Attribute
        {
                // Field
index b87cbeca78470de10dd1abde38dfb3b58806a4e8..961c668faadfcd913ad06bd5724b72edaf1344e8 100644 (file)
@@ -35,8 +35,10 @@ namespace System.Reflection
 {
 #if NET_2_0
        [ComVisible (true)]
-#endif
+       [AttributeUsage (AttributeTargets.Assembly, Inherited=false)]
+#else
        [AttributeUsage (AttributeTargets.Assembly)]
+#endif
        public sealed class AssemblyVersionAttribute : Attribute
        {
                // Field
index c2b8b1f3f96f774b9411cd4bad7f69703b31c9b9..d189d71b6f03e014d1e1fd1f19ad2d554e41dd86 100644 (file)
@@ -1,3 +1,7 @@
+2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
+
+       * *.cs: Updates for net 2.0 beta 2.
+
 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
 
        * Assembly.cs ExceptionHandlingClause.cs: Fix build.
index 4056bb49160b9cc3f6de55191d5f74836f85c338..77b340b0540a1fd157c6611b8dc1297f178f250f 100644 (file)
@@ -50,6 +50,9 @@ namespace System.Reflection {
                protected ConstructorInfo() {
                }
                
+#if NET_2_0
+               [ComVisible (true)]
+#endif
                public override MemberTypes MemberType {
                        get {return MemberTypes.Constructor;}
                }
index b38c9c527cfbb5fe36b88c6dc443445251ab67c0..d38d37a397aa896a174aff8d1a03a0115247e6d2 100644 (file)
@@ -217,17 +217,29 @@ namespace System.Reflection {
                }
 
 #if NET_2_0 || BOOTSTRAP_NET_2_0
+               [Obsolete ("Use FieldInfo.GetOptionalCustomModifiers().")]
                public virtual Type[] OptionalCustomModifiers {
                        get {
-                               throw new NotImplementedException ();
+                               return GetOptionalCustomModifiers ();
                        }
                }
 
+               [Obsolete ("Use FieldInfo.GetRequiredCustomModifiers().")]
                public virtual Type[] RequiredCustomModifiers {
                        get {
-                               throw new NotImplementedException ();
+                               return GetRequiredCustomModifiers ();
                        }
                }
+
+               [MonoTODO]
+               public virtual Type[] GetOptionalCustomModifiers () {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public virtual Type[] GetRequiredCustomModifiers () {
+                       throw new NotImplementedException ();
+               }
 #endif
 
 #if NET_2_0 || BOOTSTRAP_NET_2_0
index 42cdd3084c906f30dbe28b8e63de9d9b59a81cb6..4133d800008b4153272a8b3757b27527a0feb62c 100644 (file)
@@ -25,6 +25,9 @@
 using System.Runtime.InteropServices;
 
 namespace System.Reflection {
+#if NET_2_0
+               [ComVisible (true)]
+#endif
        public struct InterfaceMapping {
 
 #if NET_2_0
index 025410c81109ffe02cd591f140d8fbe67f4c6e3e..2eb07d9e6365463d85ebb46e3d51005dc35574ef 100644 (file)
@@ -41,8 +41,9 @@ namespace System.Reflection {
        /// </summary>
 #if NET_2_0
        [ComVisible (true)]
-#endif
+#else
        [Flags]
+#endif
        public enum MethodImplAttributes {
 
                /// <summary>
index 674d406aa2731ee420dab7e1164b43464f5d1948..b7d35a97d518978377ac0689c855a6612e073c8f 100644 (file)
@@ -138,22 +138,6 @@ namespace System.Reflection {
                        return field;
                }
 
-#if NET_2_0 || BOOTSTRAP_NET_2_0
-               [MonoTODO]
-               public override Type[] OptionalCustomModifiers {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-               }
-
-               [MonoTODO]
-               public override Type[] RequiredCustomModifiers {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-               }
-#endif
-
 #if NET_2_0 || BOOTSTRAP_NET_2_0
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                public override extern FieldInfo Mono_GetGenericFieldDefinition ();
index 356c256d9ba170db6f76caf0df3c5fb9b468632b..844047bd41db9922529b9b9a1596cf7787660367 100644 (file)
@@ -170,19 +170,29 @@ namespace System.Reflection
                }                       
 
 #if NET_2_0 || BOOTSTRAP_NET_2_0
-               [MonoTODO]
+               [Obsolete ("Use ParameterInfo.GetOptionalCustomModifiers().")]
                public virtual Type[] OptionalCustomModifiers {
                        get {
-                               throw new NotImplementedException ();
+                               return GetOptionalCustomModifiers ();
                        }
                }
 
-               [MonoTODO]
+               [Obsolete ("Use ParameterInfo.GetRequiredCustomModifiers().")]
                public virtual Type[] RequiredCustomModifiers {
                        get {
-                               throw new NotImplementedException ();
+                               return GetRequiredCustomModifiers ();
                        }
                }
+
+               [MonoTODO]
+               public virtual Type[] GetOptionalCustomModifiers () {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public virtual Type[] GetRequiredCustomModifiers () {
+                       throw new NotImplementedException ();
+               }
 #endif
        }
 }
index e05d3a0cd2426be1780d52223c81cc1ea6188264..df077a418ee834e3328194366ec3b54dd5dc97eb 100644 (file)
@@ -42,6 +42,7 @@ namespace System.Reflection {
 
 #if NET_2_0
        [ComVisible (true)]
+       [Serializable]
 #endif
        [CLSCompliant(false)]
        public unsafe sealed class Pointer : ISerializable {
index c68248343305e15fd73b6e4be5244ea7c7cb4cda..a021a07dba666efe6163d0804026d1ad5f96b3ae 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System.Runtime.InteropServices;
+
 namespace System.Reflection {
 
+#if NET_2_0
+       [ComVisible (true)]
+#endif
        [Flags]
        [Serializable]
 #if NET_2_0 || BOOTSTRAP_NET_2_0
@@ -39,6 +44,7 @@ namespace System.Reflection {
                NotAPortableExecutableImage = 0,
                ILOnly = 1,
                Required32Bit = 2,
+               [Obsolete ("Please use PE32Plus instead - this will be removed before Whidbey ships")]
                Plus32Bit = 4,
                PE32Plus = 4,
                Unmanaged32Bit = 8
index 15defb0b4f065bbcdab3ad9635acee8ceb190a66..7174ec0fddb86193d2e198d91f91027b2be9f2ca 100644 (file)
 
 #if NET_2_0
 
+using System.Runtime.InteropServices;
+
 namespace System.Reflection {
 
-       [Flags]
+       [ComVisible (true)]
        [Serializable]
        public enum ProcessorArchitecture {
                None = 0,
index 4c44c439537c8f6d70c190f8cdbbac1997c5cd91..a2d644bbfa2f11cb2392cd7c034081a3803c1dd1 100644 (file)
@@ -103,6 +103,9 @@ namespace System.Reflection {
                        return typeImpl.GetConstructor (bindingAttr, binder, callConvention, types, modifiers);
                }
 
+#if NET_2_0
+               [ComVisible (true)]
+#endif
                public override ConstructorInfo[] GetConstructors( BindingFlags bindingAttr)
                {
                        return typeImpl.GetConstructors (bindingAttr);
@@ -153,6 +156,9 @@ namespace System.Reflection {
                        return typeImpl.GetInterface (name, ignoreCase);
                }
 
+#if NET_2_0
+               [ComVisible (true)]
+#endif
                public override InterfaceMapping GetInterfaceMap( Type interfaceType)
                {
                        return typeImpl.GetInterfaceMap (interfaceType);
@@ -283,6 +289,12 @@ namespace System.Reflection {
                                throw new NotImplementedException ();
                        }
                }
+
+               public override int MetadataToken {
+                       get {
+                               return typeImpl.MetadataToken;
+                       }
+               }
 #endif
 
        }