[bcl] Remove NET_4_0 defines from class libs.
[mono.git] / mcs / class / corlib / System.Reflection / MonoModule.cs
index f5498565260c528bdb0e57fec3fec7ff6ed0fc26..19c756a0d65ce88db213e25dafd0c93350eb2d3e 100644 (file)
@@ -38,28 +38,20 @@ using System.Security.Permissions;
 
 namespace System.Reflection {
 
-#if NET_4_0
        [ComVisible (true)]
        [ComDefaultInterfaceAttribute (typeof (_Module))]
        [Serializable]
        [ClassInterface(ClassInterfaceType.None)]
        class MonoModule : Module {
-#else
-       public partial class Module {
-#endif
 
                public
-#if NET_4_0
                override
-#endif
                Assembly Assembly {
                        get { return assembly; }
                }
 
                public
-#if NET_4_0
                override
-#endif
                // Note: we do not ask for PathDiscovery because no path is returned here.
                // However MS Fx requires it (see FDBK23572 for details).
                string Name {
@@ -67,17 +59,13 @@ namespace System.Reflection {
                }
        
                public
-#if NET_4_0
                override
-#endif
                string ScopeName {
                        get { return scopename; }
                }
 
                public
-#if NET_4_0
                override
-#endif
                int MDStreamVersion {
                        get {
                                if (_impl == IntPtr.Zero)
@@ -87,20 +75,14 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0
                override
-#endif
                Guid ModuleVersionId {
                        get {
                                return GetModuleVersionId ();
                        }
                }
 
-#if NET_4_0
                public override
-#else
-               public virtual
-#endif
                string FullyQualifiedName {
                        get {
 #if !NET_2_1
@@ -113,19 +95,13 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0
                override
-#endif
                bool IsResource()
                {
                        return is_resource;
                }
 
-#if NET_4_0
                public override
-#else
-               public virtual
-#endif
                Type[] FindTypes(TypeFilter filter, object filterCriteria) 
                {
                        var filtered = new List<Type> ();
@@ -136,31 +112,19 @@ namespace System.Reflection {
                        return filtered.ToArray ();
                }
 
-#if NET_4_0
                public override
-#else
-               public virtual
-#endif
                object[] GetCustomAttributes(bool inherit) 
                {
                        return MonoCustomAttrs.GetCustomAttributes (this, inherit);
                }
 
-#if NET_4_0
                public override
-#else
-               public virtual
-#endif
                object[] GetCustomAttributes(Type attributeType, bool inherit) 
                {
                        return MonoCustomAttrs.GetCustomAttributes (this, attributeType, inherit);
                }
 
-#if NET_4_0
                public override
-#else
-               public virtual
-#endif
                FieldInfo GetField (string name, BindingFlags bindingAttr) 
                {
                        if (IsResource ())
@@ -170,11 +134,7 @@ namespace System.Reflection {
                        return (globalType != null) ? globalType.GetField (name, bindingAttr) : null;
                }
 
-#if NET_4_0
                public override
-#else
-               public virtual
-#endif
                FieldInfo[] GetFields (BindingFlags bindingFlags)
                {
                        if (IsResource ())
@@ -184,20 +144,12 @@ namespace System.Reflection {
                        return (globalType != null) ? globalType.GetFields (bindingFlags) : new FieldInfo [0];
                }
 
-#if NET_4_0
                public override
-#else
-               public virtual
-#endif
                int MetadataToken {
                        get { return get_MetadataToken (this); }
                }
                protected
-#if NET_4_0
                override
-#else
-               virtual
-#endif 
                MethodInfo GetMethodImpl (string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) 
                {
                        if (IsResource ())
@@ -212,9 +164,7 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0
                override
-#endif
                MethodInfo[] GetMethods (BindingFlags bindingFlags) {
                        if (IsResource ())
                                return new MethodInfo [0];
@@ -223,20 +173,12 @@ namespace System.Reflection {
                        return (globalType != null) ? globalType.GetMethods (bindingFlags) : new MethodInfo [0];
                }
 
-#if NET_4_0
                public override
-#else
-               public virtual
-#endif
                void GetPEKind (out PortableExecutableKinds peKind, out ImageFileMachine machine) {
                        ModuleHandle.GetPEKind (out peKind, out machine);
                }
 
-#if NET_4_0
                public override
-#else
-               public virtual
-#endif
                Type GetType(string className, bool throwOnError, bool ignoreCase) 
                {
                        if (className == null)
@@ -246,20 +188,14 @@ namespace System.Reflection {
                        return assembly.InternalGetType (this, className, throwOnError, ignoreCase);
                }
        
-#if NET_4_0
                public override
-#else
-               public virtual
-#endif
                bool IsDefined (Type attributeType, bool inherit) 
                {
                        return MonoCustomAttrs.IsDefined (this, attributeType, inherit);
                }
 
                public
-#if NET_4_0
                override
-#endif
                FieldInfo ResolveField (int metadataToken, Type [] genericTypeArguments, Type [] genericMethodArguments) {
                        ResolveTokenError error;
 
@@ -271,9 +207,7 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0
                override
-#endif
                MemberInfo ResolveMember (int metadataToken, Type [] genericTypeArguments, Type [] genericMethodArguments) {
 
                        ResolveTokenError error;
@@ -286,9 +220,7 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0
                override
-#endif
                MethodBase ResolveMethod (int metadataToken, Type [] genericTypeArguments, Type [] genericMethodArguments) {
                        ResolveTokenError error;
 
@@ -300,9 +232,7 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0
                override
-#endif
                string ResolveString (int metadataToken) {
                        ResolveTokenError error;
 
@@ -314,9 +244,7 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0
                override
-#endif
                Type ResolveType (int metadataToken, Type [] genericTypeArguments, Type [] genericMethodArguments) {
                        ResolveTokenError error;
 
@@ -328,9 +256,7 @@ namespace System.Reflection {
                }
 
                public
-#if NET_4_0
                override
-#endif
                byte[] ResolveSignature (int metadataToken) {
                        ResolveTokenError error;
 
@@ -344,9 +270,7 @@ namespace System.Reflection {
 #if !NET_2_1
 
                public
-#if NET_4_0
                override
-#endif
                X509Certificate GetSignerCertificate ()
                {
                        try {
@@ -358,20 +282,14 @@ namespace System.Reflection {
                }
 #endif
 
-#if NET_4_0
                public override
-#else
-               public virtual
-#endif
                Type[] GetTypes() 
                {
                        return InternalGetTypes ();
                }
 
-#if NET_4_0
                public override IList<CustomAttributeData> GetCustomAttributesData () {
                        return CustomAttributeData.GetCustomAttributes (this);
                }
-#endif
        }
 }