Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
m---------external/corefx0
-rw-r--r--mcs/class/corlib/System.Reflection/Module.cs2
-rw-r--r--mcs/class/corlib/Test/System.Reflection/ModuleTest.cs4
3 files changed, 5 insertions, 1 deletions
diff --git a/external/corefx b/external/corefx
-Subproject 11ab7a4f925cdd697cec05da3223b7c06c4c9c2
+Subproject 91548618cdea3ec0c57e65caedefcb6d6dde2d1
diff --git a/mcs/class/corlib/System.Reflection/Module.cs b/mcs/class/corlib/System.Reflection/Module.cs
index 75bfc1fc74b..a972e683849 100644
--- a/mcs/class/corlib/System.Reflection/Module.cs
+++ b/mcs/class/corlib/System.Reflection/Module.cs
@@ -213,7 +213,7 @@ namespace System.Reflection {
private static bool filter_by_type_name (Type m, object filterCriteria) {
string s = (string)filterCriteria;
if (s.Length > 0 && s [s.Length - 1] == '*')
- return m.Name.StartsWithOrdinalUnchecked (s.Substring (0, s.Length - 1));
+ return m.Name.StartsWith (s.Substring (0, s.Length - 1), StringComparison.Ordinal);
return m.Name == s;
}
diff --git a/mcs/class/corlib/Test/System.Reflection/ModuleTest.cs b/mcs/class/corlib/Test/System.Reflection/ModuleTest.cs
index 3edccf4028a..3bb1af7f036 100644
--- a/mcs/class/corlib/Test/System.Reflection/ModuleTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/ModuleTest.cs
@@ -324,10 +324,14 @@ public class ModuleTest
Type[] t;
+ t = m.FindTypes (Module.FilterTypeName, "*");
+ Assert.AreNotEqual (0, t.Length, "#A0");
t = m.FindTypes (Module.FilterTypeName, "FindTypesTest*");
Assert.AreEqual (2, t.Length, "#A1");
Assert.AreEqual ("FindTypesTestFirstClass", t [0].Name, "#A2");
Assert.AreEqual ("FindTypesTestSecondClass", t [1].Name, "#A3");
+ t = m.FindTypes (Module.FilterTypeNameIgnoreCase, "*");
+ Assert.AreNotEqual (0, t.Length, "#B0");
t = m.FindTypes (Module.FilterTypeNameIgnoreCase, "findtypestest*");
Assert.AreEqual (2, t.Length, "#B1");
Assert.AreEqual ("FindTypesTestFirstClass", t [0].Name, "#B2");