/// <summary> /// Gets the <see href="Attribute"/>s associated with the enumeration given in <paramref name="provider"/>. /// </summary> /// <typeparam name="T">The attribute type to search for.</typeparam> /// <param name="provider">An enumeration on which to search for attributes of the given type.</param> /// <returns>A list of the attributes found on the supplied source. This value will never be null.</returns> public static IList <T> Attributes <T>(this Enum provider) where T : Attribute { return(provider.Attributes(typeof(T)).Cast <T>().ToList()); }