Headless.Activation.TypeExtensions.FindSupportedTags C# (CSharp) Method

FindSupportedTags() private static method

Finds the supported tags.
private static FindSupportedTags ( IEnumerable types ) : IList
types IEnumerable /// The types. ///
return IList
        private static IList<SupportedTagAttribute> FindSupportedTags(IEnumerable<Type> types)
        {
            var tagsFound = new List<SupportedTagAttribute>();
            var comparer = new SupportedTagAttributeComparer();

            foreach (var type in types)
            {
                var attributes =
                    type.GetCustomAttributes(typeof(SupportedTagAttribute), true).OfType<SupportedTagAttribute>();

                foreach (var attribute in attributes)
                {
                    if (tagsFound.Contains(attribute, comparer))
                    {
                        continue;
                    }

                    tagsFound.Add(attribute);
                }
            }

            return tagsFound;
        }