-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathStartupExtensions.cs
36 lines (29 loc) · 1022 Bytes
/
StartupExtensions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (c) usercode
// https://github.com/usercode/ImageWizard
// MIT License
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Piranha;
namespace ImageWizard.Piranha;
public static class StartupExtensions
{
public static IServiceCollection AddImageWizardModule(this IServiceCollection services)
{
App.Modules.Register<PiranhaModule>();
return services;
}
public static IApplicationBuilder UseImageWizardModule(this IApplicationBuilder builder)
{
//// Manager resources
//App.Modules.Manager().Scripts
// .Add("~/manager/simplemodule/js/header-block.js");
//// Add the embedded resources
//builder.UseStaticFiles(new StaticFileOptions
//{
// FileProvider = new EmbeddedFileProvider(typeof(StartupExtensions).Assembly,
// "ImageWizard.Piranha.assets.dist"),
// RequestPath = "/manager/imagewizard"
//});
return builder;
}
}