mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-12-03 03:58:13 +08:00
Refactoring route resolutions in Setup
--HG-- branch : 1.x
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Web.Routing;
|
using System.Web.Routing;
|
||||||
using Autofac;
|
using Autofac;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
@@ -95,7 +96,10 @@ namespace Orchard.Setup {
|
|||||||
|
|
||||||
builder.RegisterType<ShapeTemplateBindingStrategy>().As<IShapeTableProvider>().InstancePerLifetimeScope();
|
builder.RegisterType<ShapeTemplateBindingStrategy>().As<IShapeTableProvider>().InstancePerLifetimeScope();
|
||||||
builder.RegisterType<BasicShapeTemplateHarvester>().As<IShapeTemplateHarvester>().InstancePerLifetimeScope();
|
builder.RegisterType<BasicShapeTemplateHarvester>().As<IShapeTemplateHarvester>().InstancePerLifetimeScope();
|
||||||
builder.RegisterType<ShapeAttributeBindingStrategy>().As<IShapeTableProvider>().SingleInstance();
|
builder.Register(context => new ShapeAttributeBindingStrategy(
|
||||||
|
context.Resolve<IEnumerable<ShapeAttributeOccurrence>>(),
|
||||||
|
context.Resolve<IComponentContext>(),
|
||||||
|
context.Resolve<RouteCollection>())).As<IShapeTableProvider>().SingleInstance();
|
||||||
builder.RegisterModule(new ShapeAttributeBindingModule());
|
builder.RegisterModule(new ShapeAttributeBindingModule());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user