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