mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Organizing classes into .Routes and .DataBinders namespaces
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4039306
This commit is contained in:
@@ -13,6 +13,8 @@ using Autofac.Modules;
|
|||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using Orchard.Environment;
|
using Orchard.Environment;
|
||||||
using Orchard.Mvc;
|
using Orchard.Mvc;
|
||||||
|
using Orchard.Mvc.ModelBinders;
|
||||||
|
using Orchard.Mvc.Routes;
|
||||||
using Orchard.Tests.Stubs;
|
using Orchard.Tests.Stubs;
|
||||||
|
|
||||||
namespace Orchard.Tests.Environment {
|
namespace Orchard.Tests.Environment {
|
||||||
|
@@ -6,7 +6,8 @@ using System.Web.Mvc;
|
|||||||
using System.Web.Routing;
|
using System.Web.Routing;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using Orchard.Environment;
|
using Orchard.Environment;
|
||||||
using Orchard.Mvc;
|
using Orchard.Mvc.ModelBinders;
|
||||||
|
using Orchard.Mvc.Routes;
|
||||||
|
|
||||||
namespace Orchard.Tests.Environment {
|
namespace Orchard.Tests.Environment {
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
|
@@ -5,7 +5,7 @@ using System.Threading;
|
|||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using System.Web.Routing;
|
using System.Web.Routing;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using Orchard.Mvc;
|
using Orchard.Mvc.Routes;
|
||||||
using Orchard.Tests.Stubs;
|
using Orchard.Tests.Stubs;
|
||||||
|
|
||||||
namespace Orchard.Tests.Mvc {
|
namespace Orchard.Tests.Mvc {
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using Orchard.Mvc;
|
|
||||||
using Orchard.Mvc.ModelBinders;
|
using Orchard.Mvc.ModelBinders;
|
||||||
|
|
||||||
namespace Orchard.CmsPages.Models {
|
namespace Orchard.CmsPages.Models {
|
||||||
|
@@ -5,7 +5,7 @@ using System.Web;
|
|||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using System.Web.Routing;
|
using System.Web.Routing;
|
||||||
using Orchard.CmsPages.Services;
|
using Orchard.CmsPages.Services;
|
||||||
using Orchard.Mvc;
|
using Orchard.Mvc.Routes;
|
||||||
|
|
||||||
namespace Orchard.CmsPages {
|
namespace Orchard.CmsPages {
|
||||||
public class Routes : IRouteProvider, IRouteConstraint {
|
public class Routes : IRouteProvider, IRouteConstraint {
|
||||||
|
@@ -5,7 +5,7 @@ using System.Web;
|
|||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using System.Xml.Linq;
|
using System.Xml.Linq;
|
||||||
using Orchard.Mvc;
|
using Orchard.Mvc.ModelBinders;
|
||||||
|
|
||||||
namespace Orchard.XmlRpc.Models {
|
namespace Orchard.XmlRpc.Models {
|
||||||
public class ModelBinderProvider : IModelBinderProvider, IModelBinder {
|
public class ModelBinderProvider : IModelBinderProvider, IModelBinder {
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Orchard.Mvc;
|
using Orchard.Mvc.ModelBinders;
|
||||||
|
using Orchard.Mvc.Routes;
|
||||||
|
|
||||||
namespace Orchard.Environment {
|
namespace Orchard.Environment {
|
||||||
public class DefaultOrchardShell : IOrchardShell {
|
public class DefaultOrchardShell : IOrchardShell {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Orchard.Mvc {
|
namespace Orchard.Mvc.ModelBinders {
|
||||||
public interface IModelBinderProvider : IDependency {
|
public interface IModelBinderProvider : IDependency {
|
||||||
IEnumerable<ModelBinderDescriptor> GetModelBinders();
|
IEnumerable<ModelBinderDescriptor> GetModelBinders();
|
||||||
}
|
}
|
@@ -1,6 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Orchard.Mvc {
|
namespace Orchard.Mvc.ModelBinders {
|
||||||
public interface IModelBinderPublisher : IDependency {
|
public interface IModelBinderPublisher : IDependency {
|
||||||
void Publish(IEnumerable<ModelBinderDescriptor> binders);
|
void Publish(IEnumerable<ModelBinderDescriptor> binders);
|
||||||
}
|
}
|
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
|
|
||||||
namespace Orchard.Mvc {
|
namespace Orchard.Mvc.ModelBinders {
|
||||||
public class ModelBinderDescriptor {
|
public class ModelBinderDescriptor {
|
||||||
public Type Type { get; set; }
|
public Type Type { get; set; }
|
||||||
public IModelBinder ModelBinder { get; set; }
|
public IModelBinder ModelBinder { get; set; }
|
@@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
|
|
||||||
namespace Orchard.Mvc {
|
namespace Orchard.Mvc.ModelBinders {
|
||||||
public class ModelBinderPublisher : IModelBinderPublisher {
|
public class ModelBinderPublisher : IModelBinderPublisher {
|
||||||
private readonly ModelBinderDictionary _binders;
|
private readonly ModelBinderDictionary _binders;
|
||||||
|
|
@@ -6,7 +6,7 @@ using System.Web;
|
|||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using System.Web.Routing;
|
using System.Web.Routing;
|
||||||
|
|
||||||
namespace Orchard.Mvc.RouteProviders {
|
namespace Orchard.Mvc.Routes {
|
||||||
public class DefaultRouteProvider : IRouteProvider {
|
public class DefaultRouteProvider : IRouteProvider {
|
||||||
public IEnumerable<RouteDescriptor> GetRoutes() {
|
public IEnumerable<RouteDescriptor> GetRoutes() {
|
||||||
return new[] {
|
return new[] {
|
@@ -1,6 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Orchard.Mvc {
|
namespace Orchard.Mvc.Routes {
|
||||||
public interface IRouteProvider : IDependency {
|
public interface IRouteProvider : IDependency {
|
||||||
IEnumerable<RouteDescriptor> GetRoutes();
|
IEnumerable<RouteDescriptor> GetRoutes();
|
||||||
}
|
}
|
@@ -1,7 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Web.Routing;
|
|
||||||
|
|
||||||
namespace Orchard.Mvc {
|
namespace Orchard.Mvc.Routes {
|
||||||
public interface IRoutePublisher : IDependency {
|
public interface IRoutePublisher : IDependency {
|
||||||
void Publish(IEnumerable<RouteDescriptor> routes);
|
void Publish(IEnumerable<RouteDescriptor> routes);
|
||||||
}
|
}
|
@@ -1,6 +1,6 @@
|
|||||||
using System.Web.Routing;
|
using System.Web.Routing;
|
||||||
|
|
||||||
namespace Orchard.Mvc {
|
namespace Orchard.Mvc.Routes {
|
||||||
public class RouteDescriptor {
|
public class RouteDescriptor {
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public int Priority { get; set; }
|
public int Priority { get; set; }
|
@@ -1,11 +1,9 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Web.Routing;
|
using System.Web.Routing;
|
||||||
using Autofac.Integration.Web;
|
using Autofac.Integration.Web;
|
||||||
|
|
||||||
namespace Orchard.Mvc {
|
namespace Orchard.Mvc.Routes {
|
||||||
public class RoutePublisher : IRoutePublisher {
|
public class RoutePublisher : IRoutePublisher {
|
||||||
private readonly RouteCollection _routeCollection;
|
private readonly RouteCollection _routeCollection;
|
||||||
private readonly IContainerProvider _containerProvider;
|
private readonly IContainerProvider _containerProvider;
|
@@ -2,7 +2,7 @@
|
|||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using System.Web.Routing;
|
using System.Web.Routing;
|
||||||
|
|
||||||
namespace Orchard.Mvc.RouteProviders {
|
namespace Orchard.Mvc.Routes {
|
||||||
public class StandardPackageRouteProvider : IRouteProvider {
|
public class StandardPackageRouteProvider : IRouteProvider {
|
||||||
public IEnumerable<RouteDescriptor> GetRoutes() {
|
public IEnumerable<RouteDescriptor> GetRoutes() {
|
||||||
//TEMP: Need to rely on a service that gives the list of active packages
|
//TEMP: Need to rely on a service that gives the list of active packages
|
||||||
@@ -39,7 +39,7 @@ namespace Orchard.Mvc.RouteProviders {
|
|||||||
},
|
},
|
||||||
new MvcRouteHandler())
|
new MvcRouteHandler())
|
||||||
},
|
},
|
||||||
new RouteDescriptor {
|
new RouteDescriptor {
|
||||||
Priority = -10,
|
Priority = -10,
|
||||||
Route = new Route(
|
Route = new Route(
|
||||||
"Admin/Media/{action}/{id}",
|
"Admin/Media/{action}/{id}",
|
||||||
@@ -54,7 +54,7 @@ namespace Orchard.Mvc.RouteProviders {
|
|||||||
{"area", "Orchard.Media"}
|
{"area", "Orchard.Media"}
|
||||||
},
|
},
|
||||||
new MvcRouteHandler())
|
new MvcRouteHandler())
|
||||||
},
|
},
|
||||||
new RouteDescriptor {
|
new RouteDescriptor {
|
||||||
Priority = -10,
|
Priority = -10,
|
||||||
Route = new Route(
|
Route = new Route(
|
@@ -95,12 +95,12 @@
|
|||||||
<Compile Include="Environment\OrchardStarter.cs" />
|
<Compile Include="Environment\OrchardStarter.cs" />
|
||||||
<Compile Include="IDependency.cs" />
|
<Compile Include="IDependency.cs" />
|
||||||
<Compile Include="Mvc\Html\ThemeExtensions.cs" />
|
<Compile Include="Mvc\Html\ThemeExtensions.cs" />
|
||||||
<Compile Include="Mvc\IRoutePublisher.cs" />
|
<Compile Include="Mvc\Routes\IRoutePublisher.cs" />
|
||||||
<Compile Include="Mvc\IRouteProvider.cs" />
|
<Compile Include="Mvc\Routes\IRouteProvider.cs" />
|
||||||
<Compile Include="Mvc\RouteProviders\DefaultRouteProvider.cs" />
|
<Compile Include="Mvc\Routes\DefaultRouteProvider.cs" />
|
||||||
<Compile Include="Mvc\RouteProviders\StandardPackageRouteProvider.cs" />
|
<Compile Include="Mvc\Routes\StandardPackageRouteProvider.cs" />
|
||||||
<Compile Include="Mvc\RoutePublisher.cs" />
|
<Compile Include="Mvc\Routes\RoutePublisher.cs" />
|
||||||
<Compile Include="Mvc\RouteDescriptor.cs" />
|
<Compile Include="Mvc\Routes\RouteDescriptor.cs" />
|
||||||
<Compile Include="Utility\ReadOnlyCollectionExtensions.cs" />
|
<Compile Include="Utility\ReadOnlyCollectionExtensions.cs" />
|
||||||
<Compile Include="Data\Repository.cs" />
|
<Compile Include="Data\Repository.cs" />
|
||||||
<Compile Include="Environment\DefaultCompositionStrategy.cs" />
|
<Compile Include="Environment\DefaultCompositionStrategy.cs" />
|
||||||
@@ -138,11 +138,11 @@
|
|||||||
<Compile Include="Mvc\Html\HtmlHelperExtensions.cs" />
|
<Compile Include="Mvc\Html\HtmlHelperExtensions.cs" />
|
||||||
<Compile Include="Mvc\Filters\FilterProvider.cs" />
|
<Compile Include="Mvc\Filters\FilterProvider.cs" />
|
||||||
<Compile Include="Mvc\Filters\FilterResolvingActionInvoker.cs" />
|
<Compile Include="Mvc\Filters\FilterResolvingActionInvoker.cs" />
|
||||||
<Compile Include="Mvc\ModelBinderPublisher.cs" />
|
<Compile Include="Mvc\ModelBinders\ModelBinderPublisher.cs" />
|
||||||
<Compile Include="Mvc\IModelBinderProvider.cs" />
|
<Compile Include="Mvc\ModelBinders\IModelBinderProvider.cs" />
|
||||||
<Compile Include="Mvc\IModelBinderPublisher.cs" />
|
<Compile Include="Mvc\ModelBinders\IModelBinderPublisher.cs" />
|
||||||
<Compile Include="Mvc\ModelBinders\KeyedListModelBinder.cs" />
|
<Compile Include="Mvc\ModelBinders\KeyedListModelBinder.cs" />
|
||||||
<Compile Include="Mvc\ModelBinderDescriptor.cs" />
|
<Compile Include="Mvc\ModelBinders\ModelBinderDescriptor.cs" />
|
||||||
<Compile Include="Mvc\OrchardControllerIdentificationStrategy.cs" />
|
<Compile Include="Mvc\OrchardControllerIdentificationStrategy.cs" />
|
||||||
<Compile Include="Mvc\ViewModels\AdminViewModel.cs" />
|
<Compile Include="Mvc\ViewModels\AdminViewModel.cs" />
|
||||||
<Compile Include="Mvc\ViewModels\BaseViewModel.cs" />
|
<Compile Include="Mvc\ViewModels\BaseViewModel.cs" />
|
||||||
|
Reference in New Issue
Block a user