src/MVCContrib/ControllerExtensions.cs
/// <summary>
/// Determines whether the specified type is a controller
/// </summary>
/// <param name="type">Type to check</param>
/// <returns>True if type is a controller, otherwise false</returns>
Determines whether the specified type is a controller
Determines whether the specified type is a controller
public static bool IsController(Type type)
		{
			return type != null
			       && type.Name.EndsWith("Controller", StringComparison.OrdinalIgnoreCase)
			       && !type.IsAbstract
			       && typeof(IController).IsAssignableFrom(type);
		}
public static bool IsController ( Type type ) { return type != null && type . Name . EndsWith ( " " , StringComparison . OrdinalIgnoreCase ) && ! type . IsAbstract && typeof ( IController ) . IsAssignableFrom ( type ) ; }
Determines whether the specified type is a controller
Determines whether the specified type is a controller
True if type is a controller, otherwise false
True if type is a controller otherwise false
type
Type
Type to check
Type to check