private bool CanVisitCore(IEnumerable <ConfigFilterRuleItemUnion> ruleItems, ISymbol symbol, bool wantProtectedMember, IFilterVisitor outer) { var current = symbol; var parent = symbol.ContainingSymbol; while (!(current is INamespaceSymbol) && parent != null) { if (!outer.CanVisitApi(parent, wantProtectedMember, outer)) { return(false); } current = parent; parent = parent.ContainingSymbol; } foreach (var ruleUnion in ruleItems) { ConfigFilterRuleItem rule = ruleUnion.Rule; if (rule != null && rule.IsMatch(symbol)) { return(rule.CanVisit); } } return(true); }
private bool CanVisitCore(IEnumerable <ConfigFilterRuleItemUnion> ruleItems, SymbolFilterData symbol) { foreach (var ruleUnion in ruleItems) { ConfigFilterRuleItem rule = ruleUnion.Rule; if (rule != null && rule.IsMatch(symbol)) { return(rule.CanVisit); } } return(true); }