Began integration of Stephen's new routing logic. The sln compiles and things have been refactored

from the initial concept. The module is not active as it currently will not work because of
contructor dependencies and classes marked as internal, will liase with Stephen regarding this.
This commit is contained in:
shannon@ShandemVaio
2012-07-20 01:04:35 +06:00
parent f2c084feda
commit 25b06a88ab
30 changed files with 2445 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
using System;
namespace Umbraco.Web.Mvc
{
public static class ControllerExtensions
{
/// <summary>
/// Return the controller name from the controller type
/// </summary>
/// <param name="controllerType"></param>
/// <returns></returns>
public static string GetControllerName(Type controllerType)
{
return controllerType.Name.Substring(0, controllerType.Name.LastIndexOf("Controller"));
}
/// <summary>
/// Return the controller name from the controller type
/// </summary>
/// <typeparam name="T"></typeparam>
/// <returns></returns>
/// <remarks></remarks>
public static string GetControllerName<T>()
{
return GetControllerName(typeof(T));
}
}
}