예제 #1
0
        public bool Test(PropertyKey prop)
        {
            if (Helper.CompareOptionalRegex(prop.TypeKey.Fullname, type) && MethodTester.CheckMethodVisibility(attrib, prop.GetterMethodAttributes))
            {
                if (name != null)
                {
                    return(Helper.CompareOptionalRegex(prop.Name, name));
                }
                else
                {
                    return(nameRx.IsMatch(prop.Name));
                }
            }

            return(false);
        }
예제 #2
0
        public bool Test(EventKey evt)
        {
            if (Helper.CompareOptionalRegex(evt.TypeKey.Fullname, type) && MethodTester.CheckMethodVisibility(attrib, evt.AddMethodAttributes))
            {
                if (name != null)
                {
                    return(Helper.CompareOptionalRegex(evt.Name, name));
                }
                else
                {
                    return(nameRx.IsMatch(evt.Name));
                }
            }

            return(false);
        }
예제 #3
0
        public bool Test(FieldKey field)
        {
            // It's not very clean to use CheckMethodVisibility() from MethodTester. But we don't want duplicate code either.
            if (Helper.CompareOptionalRegex(field.TypeKey.Fullname, type) && MethodTester.CheckMethodVisibility(attrib, (MethodAttributes)field.FieldAttributes))
            {
                if (name != null)
                {
                    return(Helper.CompareOptionalRegex(field.Name, name));
                }
                else
                {
                    return(nameRx.IsMatch(field.Name));
                }
            }

            return(false);
        }