예제 #1
0
        // Returns attribute set of attributes whose key matches any of regular expressions passed.
        public AttributeSet MatchesAny(Regex[] rea)
        {
            AttributeSet matches = new AttributeSet();

            foreach (var attr in this)
            {
                foreach (Regex re in rea)
                {
                    if (re.IsMatch(attr.Key))
                    {
                        matches.Add(attr);
                    }
                }
            }

            return(matches);
        }