mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 02:44:52 +08:00
Minor alteration to previous contribution
--HG-- branch : 1.x
This commit is contained in:
@@ -1,13 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Orchard.Mvc{
|
||||
|
||||
public static class RouteExtention{
|
||||
namespace Orchard.Mvc.Extensions {
|
||||
public static class RouteExtension{
|
||||
public static string GetAreaName(this RouteBase route){
|
||||
var routeWithArea = route as IRouteWithArea;
|
||||
if (routeWithArea != null) {
|
||||
@@ -24,8 +19,7 @@ namespace Orchard.Mvc{
|
||||
|
||||
public static string GetAreaName(this RouteData routeData){
|
||||
object area;
|
||||
if (routeData.DataTokens.TryGetValue("area", out area))
|
||||
{
|
||||
if (routeData.DataTokens.TryGetValue("area", out area)) {
|
||||
return area as string;
|
||||
}
|
||||
|
@@ -4,6 +4,7 @@ using System.Web.Routing;
|
||||
using Autofac;
|
||||
using Autofac.Core;
|
||||
using Autofac.Features.Metadata;
|
||||
using Orchard.Mvc.Extensions;
|
||||
|
||||
namespace Orchard.Mvc {
|
||||
public interface IControllerType {
|
||||
|
@@ -7,6 +7,7 @@ using System.Web.SessionState;
|
||||
using Autofac;
|
||||
using Orchard.Environment;
|
||||
using Orchard.Environment.Configuration;
|
||||
using Orchard.Mvc.Extensions;
|
||||
|
||||
namespace Orchard.Mvc.Routes {
|
||||
|
||||
|
@@ -183,7 +183,7 @@
|
||||
<Compile Include="Localization\Services\ILocalizedStringManager.cs" />
|
||||
<Compile Include="Logging\OrchardFileAppender.cs" />
|
||||
<Compile Include="Messaging\Services\DefaultMessageManager.cs" />
|
||||
<Compile Include="Mvc\Extensions\RouteExtention.cs" />
|
||||
<Compile Include="Mvc\Extensions\RouteExtension.cs" />
|
||||
<Compile Include="Mvc\HttpContextWorkContext.cs" />
|
||||
<Compile Include="Mvc\Extensions\ControllerExtensions.cs" />
|
||||
<Compile Include="Mvc\IOrchardViewPage.cs" />
|
||||
|
Reference in New Issue
Block a user