コード例 #1
0
ファイル: ConfigFilterVisitor.cs プロジェクト: wanyi01/docfx
        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);
        }
コード例 #2
0
 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);
 }