internal virtual bool FilterName(MemberInfo m,Object filterCriteria)
{
// Check that the criteria object is a String object
if(filterCriteria == null || !(filterCriteria is String))
throw new InvalidFilterCriteriaException(Environment.GetResourceString("RFLCT.FltCritString"));
// At the moment this fails if its done on a single line....
String str = ((String) filterCriteria);
str = str.Trim();
String name = m.Name;
// Get the nested class name only, as opposed to the mangled one
if (m.MemberType == MemberTypes.NestedType)
name = name.Substring(name.LastIndexOf('+') + 1);
// Check to see if this is a prefix or exact match requirement
if (str.Length > 0 && str[str.Length - 1] == '*') {
str = str.Substring(0, str.Length - 1);
return (name.StartsWith(str, StringComparison.Ordinal));
}
return (name.Equals(str));
}