Esempio n. 1
0
        private SelectorAttribute GetSelectorAttribute(IRuleSet ruleSet, string category, string subCategory)
        {
            SelectorAttribute[] attributes = (SelectorAttribute[])ruleSet.GetType().GetCustomAttributes(typeof(SelectorAttribute), true);

            return(attributes
                   .FirstOrDefault(t => (category == null || t.Category == category) && (subCategory == null || t.SubCategory == subCategory)));
        }