コード例 #1
0
        public override void Configure(IApplicationBuilder app, IRouteBuilder routes, IServiceProvider serviceProvider)
        {
            // TODO: Order to be the late in the return pipeline
            app.AddDeferredTasks();

            serviceProvider.AddTagHelpers(typeof(ResourcesTagHelper).GetTypeInfo().Assembly);
            serviceProvider.AddTagHelpers(typeof(ShapeTagHelper).GetTypeInfo().Assembly);
        }
コード例 #2
0
        public override void Configure(IApplicationBuilder builder, IRouteBuilder routes, IServiceProvider serviceProvider)
        {
            serviceProvider.AddTagHelpers(typeof(ContentLinkTagHelper).GetTypeInfo().Assembly);

            routes.MapAreaRoute(
                name: "DisplayContentItem",
                areaName: "OrchardCore.Contents",
                template: "Contents/ContentItems/{contentItemId}",
                defaults: new { controller = "Item", action = "Display" }
                );

            routes.MapAreaRoute(
                name: "PreviewContentItem",
                areaName: "OrchardCore.Contents",
                template: "Contents/ContentItems/{contentItemId}/Preview",
                defaults: new { controller = "Item", action = "Preview" }
                );

            routes.MapAreaRoute(
                name: "PreviewContentItemVersion",
                areaName: "OrchardCore.Contents",
                template: "Contents/ContentItems/{contentItemId}/Version/{version}/Preview",
                defaults: new { controller = "Item", action = "Preview" }
                );

            // Admin
            routes.MapAreaRoute(
                name: "EditContentItem",
                areaName: "OrchardCore.Contents",
                template: "Admin/Contents/ContentItems/{contentItemId}/Edit",
                defaults: new { controller = "Admin", action = "Edit" }
                );

            routes.MapAreaRoute(
                name: "CreateContentItem",
                areaName: "OrchardCore.Contents",
                template: "Admin/Contents/ContentTypes/{id}/Create",
                defaults: new { controller = "Admin", action = "Create" }
                );

            routes.MapAreaRoute(
                name: "AdminContentItem",
                areaName: "OrchardCore.Contents",
                template: "Admin/Contents/ContentItems/{contentItemId}/Display",
                defaults: new { controller = "Admin", action = "Display" }
                );

            routes.MapAreaRoute(
                name: "ListContentItems",
                areaName: "OrchardCore.Contents",
                template: "Admin/Contents/ContentItems",
                defaults: new { controller = "Admin", action = "List" }
                );
        }
 public static void AddTagHelpers(this IServiceProvider serviceProvider, string assemblyName)
 {
     serviceProvider.AddTagHelpers(Assembly.Load(new AssemblyName(assemblyName)));
 }
コード例 #4
0
ファイル: Startup.cs プロジェクト: hkusanic/Orchard2
 public override void Configure(IApplicationBuilder app, IRouteBuilder routes, IServiceProvider serviceProvider)
 {
     serviceProvider.AddTagHelpers("Orchard.ResourceManagement");
 }
コード例 #5
0
ファイル: Startup.cs プロジェクト: VladislavPPetrov/Moa-CMS
 public override void Configure(IApplicationBuilder app, IRouteBuilder routes, IServiceProvider serviceProvider)
 {
     serviceProvider.AddTagHelpers(typeof(ResourcesTagHelper).Assembly);
     serviceProvider.AddTagHelpers(typeof(ShapeTagHelper).Assembly);
 }