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); }
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); }