Engines/FlatRedBallXNA/NonGraphicalTests/TestFramework.cs
/// <summary>
/// Retrieves all types that are marked with an attribute
/// </summary>
/// <typeparam name="TAttribute">Attribute to check for</typeparam>
/// <param name="inherit">Whether to check the inheritance chain for the attribute</param>
/// <returns>list of types with the attribute</returns>
Retrieves all types that are marked with an attribute
Retrieves all types that are marked with an attribute
private static IEnumerable<Type> GetTypesWith<TAttribute>(bool inherit) where TAttribute : Attribute
        {
            var types = Assembly.GetAssembly(typeof(TestFramework)).GetTypes();
            return from t in Assembly.GetAssembly(typeof(TestFramework)).GetTypes()
                   where t.IsDefined(typeof(TAttribute), inherit)
                   select t;
        }
private static IEnumerable < Type > GetTypesWith < TAttribute > ( bool inherit ) where TAttribute : Attribute { var types = Assembly . GetAssembly ( typeof ( TestFramework ) ) . GetTypes ( ) ; return from t in Assembly . GetAssembly ( typeof ( TestFramework ) ) . GetTypes ( ) where t . IsDefined ( typeof ( TAttribute ) , inherit ) select t ; }
Retrieves all types that are marked with an attribute
Retrieves all types that are marked with an attribute
list of types with the attribute
list of types with the attribute
inherit
bool
Whether to check the inheritance chain for the attribute
Whether to check the inheritance chain for the attribute
typeparam
Attribute to check for
Attribute to check for