mirror of https://github.com/abpframework/abp
				
				
				
			
			You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							63 lines
						
					
					
						
							2.0 KiB
						
					
					
				
			
		
		
	
	
							63 lines
						
					
					
						
							2.0 KiB
						
					
					
				| using Microsoft.AspNetCore.Builder;
 | |
| using Microsoft.Extensions.DependencyInjection;
 | |
| using Microsoft.Extensions.Hosting;
 | |
| using System.IO;
 | |
| using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
 | |
| using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Menus;
 | |
| using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling;
 | |
| using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo;
 | |
| using Volo.Abp.Autofac;
 | |
| using Volo.Abp.Modularity;
 | |
| using Volo.Abp.UI.Navigation;
 | |
| using Volo.Abp.VirtualFileSystem;
 | |
| 
 | |
| namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo;
 | |
| 
 | |
| [DependsOn(
 | |
|     typeof(AbpAspNetCoreMvcUiBasicThemeModule),
 | |
|     typeof(AbpAspNetCoreMvcUiThemeSharedDemoModule),
 | |
|     typeof(AbpAutofacModule)
 | |
|     )]
 | |
| public class AbpAspNetCoreMvcUiThemeBasicDemoModule : AbpModule
 | |
| {
 | |
|     public override void ConfigureServices(ServiceConfigurationContext context)
 | |
|     {
 | |
|         var env = context.Services.GetHostingEnvironment();
 | |
| 
 | |
|         if (env.IsDevelopment())
 | |
|         {
 | |
|             Configure<AbpVirtualFileSystemOptions>(options =>
 | |
|             {
 | |
|                 options.FileSets.ReplaceEmbeddedByPhysical<AbpAspNetCoreMvcUiThemeSharedDemoModule>(Path.Combine(env.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo", Path.DirectorySeparatorChar)));
 | |
|             });
 | |
|         }
 | |
| 
 | |
|         Configure<AbpBundlingOptions>(options =>
 | |
|         {
 | |
|             options.StyleBundles
 | |
|                 .Get(StandardBundles.Styles.Global)
 | |
|                 .AddFiles("/demo/styles/main.css");
 | |
|         });
 | |
| 
 | |
|         Configure<AbpNavigationOptions>(options =>
 | |
|         {
 | |
|             options.MenuContributors.Add(new BasicThemeDemoMenuContributor());
 | |
|         });
 | |
|     }
 | |
| 
 | |
|     public override void OnApplicationInitialization(ApplicationInitializationContext context)
 | |
|     {
 | |
|         var app = context.GetApplicationBuilder();
 | |
|         var env = context.GetEnvironment();
 | |
| 
 | |
|         if (env.IsDevelopment())
 | |
|         {
 | |
|             app.UseDeveloperExceptionPage();
 | |
|         }
 | |
| 
 | |
|         app.UseStaticFiles();
 | |
|         app.UseRouting();
 | |
|         app.UseConfiguredEndpoints();
 | |
|     }
 | |
| }
 |