X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2Fcorlib%2FSystem.Reflection%2FModule.cs;h=6c136534127aeb479c74f57eea919b285d050a2e;hb=6b2b23c753525c5c5c2b391e9adc36c650825e1f;hp=b1f961a735cfbd3df7a3d866736b34f2a7ed6120;hpb=571bd38886c7d572a8632377c6cbf9c9b1915db6;p=mono.git diff --git a/mcs/class/corlib/System.Reflection/Module.cs b/mcs/class/corlib/System.Reflection/Module.cs index b1f961a735c..6c136534127 100644 --- a/mcs/class/corlib/System.Reflection/Module.cs +++ b/mcs/class/corlib/System.Reflection/Module.cs @@ -105,7 +105,12 @@ namespace System.Reflection { public extern int MetadataToken { [MethodImplAttribute (MethodImplOptions.InternalCall)] get; - } + } + + public extern int MDStreamVersion { + [MethodImplAttribute (MethodImplOptions.InternalCall)] + get; + } #endif public virtual Type[] FindTypes(TypeFilter filter, object filterCriteria) @@ -157,7 +162,12 @@ namespace System.Reflection { public MethodInfo GetMethod (string name) { - return GetMethodImpl (name, defaultBindingFlags, null, CallingConventions.Any, Type.EmptyTypes, null); + // Can't call the other overloads since they call Type.GetMethod () which does a null check on the 'types' array + if (IsResource ()) + return null; + + Type globalType = GetGlobalType (); + return (globalType != null) ? globalType.GetMethod (name) : null; } public MethodInfo GetMethod (string name, Type[] types) @@ -277,13 +287,7 @@ namespace System.Reflection { return name; } -#if NET_2_0 - [Obsolete ("Please use ModuleVersionId instead - this will be removed before Whidbey ships.")] - public -#else - internal -#endif - Guid MvId { + internal Guid MvId { get { return Mono_GetGuid (this); } @@ -310,7 +314,6 @@ namespace System.Reflection { return new ArgumentException (String.Format ("Token 0x{0:x} is not a valid {1} token in the scope of module {2}", metadataToken, tokenType, name), "metadataToken"); } - [Obsolete ("Please use ResolveField(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) - this will be removed before Whidbey ships.")] public FieldInfo ResolveField (int metadataToken) { ResolveTokenError error; @@ -331,7 +334,6 @@ namespace System.Reflection { return m; } - [Obsolete ("Please use ResolveMethod(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) - this will be removed before Whidbey ships.")] public MethodBase ResolveMethod (int metadataToken) { ResolveTokenError error; @@ -352,7 +354,6 @@ namespace System.Reflection { return s; } - [Obsolete ("Please use ResolveType(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) - this will be removed before Whidbey ships.")] public Type ResolveType (int metadataToken) { ResolveTokenError error; @@ -362,6 +363,11 @@ namespace System.Reflection { else return Type.GetTypeFromHandle (new RuntimeTypeHandle (handle)); } + + [MonoTODO] + public byte[] ResolveSignature (int metadataToken) { + throw new NotImplementedException (); + } #endif internal static Type MonoDebugger_ResolveType (Module module, int token)