diff options
Diffstat (limited to 'mcs/class/corlib/System.Reflection')
-rw-r--r-- | mcs/class/corlib/System.Reflection/ChangeLog | 9 | ||||
-rw-r--r-- | mcs/class/corlib/System.Reflection/Module.cs | 23 | ||||
-rw-r--r-- | mcs/class/corlib/System.Reflection/common.src | 25 |
3 files changed, 31 insertions, 26 deletions
diff --git a/mcs/class/corlib/System.Reflection/ChangeLog b/mcs/class/corlib/System.Reflection/ChangeLog index 8a7945e688e..2ceab253beb 100644 --- a/mcs/class/corlib/System.Reflection/ChangeLog +++ b/mcs/class/corlib/System.Reflection/ChangeLog @@ -1,3 +1,12 @@ + +Sat Jul 10 15:48:34 CEST 2004 Paolo Molaro <lupus@ximian.com> + + * Modulec.s: return just name in ToString (bug #61287). + +2004-07-03 Zoltan Varga <vargaz@freemail.hu> + + * Module.cs: Initialize FilterTypeName[IgnoreCase]. Fixes #61048. + 2004-06-17 Gert Driesen <drieseng@users.sourceforge.net> * Pointer.cs: remove serializable attribute to match MS.NET diff --git a/mcs/class/corlib/System.Reflection/Module.cs b/mcs/class/corlib/System.Reflection/Module.cs index 01dc55f9be6..876967a50c0 100644 --- a/mcs/class/corlib/System.Reflection/Module.cs +++ b/mcs/class/corlib/System.Reflection/Module.cs @@ -55,6 +55,11 @@ namespace System.Reflection { const BindingFlags defaultBindingFlags = BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance; + static Module () { + FilterTypeName = new TypeFilter (filter_by_type_name); + FilterTypeNameIgnoreCase = new TypeFilter (filter_by_type_name_ignore_case); + } + internal Module () { } ~Module () { @@ -206,7 +211,7 @@ namespace System.Reflection { public override string ToString () { - return "Reflection.Module: " + name; + return name; } // Mono Extension: returns the GUID of this module @@ -215,6 +220,22 @@ namespace System.Reflection { return new Guid (GetGuidInternal ()); } + private static bool filter_by_type_name (Type m, object filterCriteria) { + string s = (string)filterCriteria; + if (s.EndsWith ("*")) + return m.Name.StartsWith (s.Substring (0, s.Length - 1)); + else + return m.Name == s; + } + + private static bool filter_by_type_name_ignore_case (Type m, object filterCriteria) { + string s = (string)filterCriteria; + if (s.EndsWith ("*")) + return m.Name.ToLower ().StartsWith (s.Substring (0, s.Length - 1).ToLower ()); + else + return String.Compare (m.Name, s, true) == 0; + } + [MethodImplAttribute (MethodImplOptions.InternalCall)] private extern string GetGuidInternal (); diff --git a/mcs/class/corlib/System.Reflection/common.src b/mcs/class/corlib/System.Reflection/common.src deleted file mode 100644 index 022b6768fcc..00000000000 --- a/mcs/class/corlib/System.Reflection/common.src +++ /dev/null @@ -1,25 +0,0 @@ -Assembly.cs -AssemblyNameFlags.cs -BindingFlags.cs -CallingConventions.cs -ConstructorInfo.cs -DefaultMemberAttribute.cs -EventAttributes.cs -EventInfo.cs -FieldAttributes.cs -FieldInfo.cs -ICustomAttributeProvider.cs -MemberFilter.cs -MemberInfo.cs -MemberTypes.cs -MethodAttributes.cs -MethodBase.cs -MethodImplAttributes.cs -MethodInfo.cs -Module.cs -ParameterAttributes.cs -PropertyAttributes.cs -PropertyInfo.cs -ResourceAttributes.cs -ResourceLocation.cs -TypeAttributes.cs |