예제 #1
0
        bool CheckAttributedNode(ICS.AttributedNode node, ICS.Modifiers defaultVisibility)
        {
            if (!CheckModifiers(node.Modifiers, defaultVisibility))
            {
                return(false);
            }

            if (!string.IsNullOrEmpty(AppliedAttributeType) && node != null)
            {
                node.Attributes.Any(section => section.Attributes.Any(a => {
                    var st = a.Type as ICS.SimpleType;
                    return(st != null && st.Identifier == AppliedAttributeType);
                }));
            }
            return(true);
        }
예제 #2
0
        bool CheckModifiers(ICS.Modifiers mods, ICS.Modifiers defaultVisibility)
        {
            if ((mods & ICS.Modifiers.VisibilityMask) == 0)
            {
                mods = mods | defaultVisibility;
            }

            if (MatchAnyModifiers != 0 && (MatchAnyModifiers & mods) == 0)
            {
                return(false);
            }

            if ((MatchNoModifiers & mods) != 0)
            {
                return(false);
            }

            if (MatchAllModifiers != 0 && (MatchAllModifiers & mods) != MatchAllModifiers)
            {
                return(false);
            }

            return(true);
        }