BFS+倒置遍历完成模块化依赖功能
This commit is contained in:
@@ -6,9 +6,14 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.Framework.Domain.Shared;
|
||||
|
||||
namespace Yi.Framework.Application.Contracts
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(YiFrameworkDomainSharedModule)
|
||||
)]
|
||||
public class YiFrameworkApplicationContractsModule : IStartupModule
|
||||
{
|
||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
||||
|
||||
@@ -6,11 +6,18 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Application.Contracts;
|
||||
using Yi.Framework.Application.Contracts.Student;
|
||||
using Yi.Framework.Application.Student;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.Framework.Domain;
|
||||
|
||||
namespace Yi.Framework.Application
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(YiFrameworkApplicationContractsModule),
|
||||
typeof(YiFrameworkDomainModule)
|
||||
)]
|
||||
public class YiFrameworkApplicationModule : IStartupModule
|
||||
{
|
||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
||||
|
||||
@@ -6,10 +6,15 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.Framework.Ddd;
|
||||
|
||||
namespace Yi.Framework.Domain.Shared
|
||||
{
|
||||
public class YiFrameworkDomainSharedModule : IStartupModule
|
||||
[DependsOn(
|
||||
typeof(YiFrameworkDddModule)
|
||||
)]
|
||||
public class YiFrameworkDomainSharedModule : IStartupModule
|
||||
{
|
||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
||||
{
|
||||
|
||||
@@ -6,10 +6,15 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.Framework.Domain.Shared;
|
||||
using Yi.Framework.Domain.Student;
|
||||
|
||||
namespace Yi.Framework.Domain
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(YiFrameworkDomainSharedModule)
|
||||
)]
|
||||
public class YiFrameworkDomainModule : IStartupModule
|
||||
{
|
||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
||||
|
||||
@@ -6,11 +6,16 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.Framework.Core.Sqlsugar;
|
||||
using Yi.Framework.Domain;
|
||||
using Yi.Framework.Domain.Student.IRepository;
|
||||
using Yi.Framework.Sqlsugar.Student;
|
||||
|
||||
namespace Yi.Framework.Sqlsugar
|
||||
{
|
||||
[DependsOn(typeof(YiFrameworkCoreSqlsugarModule),
|
||||
typeof(YiFrameworkDomainModule))]
|
||||
public class YiFrameworkSqlsugarModule : IStartupModule
|
||||
{
|
||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
using Yi.Framework.Application;
|
||||
using Yi.Framework.Application.Contracts;
|
||||
using Yi.Framework.Core;
|
||||
using Yi.Framework.Core.Autofac.Extensions;
|
||||
using Yi.Framework.Core.Autofac.Modules;
|
||||
using Yi.Framework.Core.AutoMapper;
|
||||
using Yi.Framework.Core.Extensions;
|
||||
using Yi.Framework.Core.Sqlsugar;
|
||||
using Yi.Framework.Ddd;
|
||||
using Yi.Framework.Domain;
|
||||
using Yi.Framework.Domain.Shared;
|
||||
using Yi.Framework.Sqlsugar;
|
||||
using Yi.Framework.Web;
|
||||
|
||||
TimeTest.Start();
|
||||
@@ -18,21 +9,7 @@ var builder = WebApplication.CreateBuilder(args);
|
||||
builder.WebHost.UseUrls(builder.Configuration.GetValue<string>("StartUrl"));
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>
|
||||
builder.UseYiModules(
|
||||
typeof(YiFrameworkCoreModule).Assembly,
|
||||
typeof(YiFrameworkCoreAutoMapperModule).Assembly,
|
||||
typeof(YiFrameworkDddModule).Assembly,
|
||||
typeof(YiFrameworkCoreSqlsugarModule).Assembly,
|
||||
|
||||
typeof(YiFrameworkSqlsugarModule).Assembly,
|
||||
typeof(YiFrameworkDomainSharedModule).Assembly,
|
||||
typeof(YiFrameworkDomainModule).Assembly,
|
||||
typeof(YiFrameworkApplicationContractsModule).Assembly,
|
||||
typeof(YiFrameworkApplicationModule).Assembly,
|
||||
typeof(YiFrameworkWebModule).Assembly
|
||||
|
||||
);
|
||||
|
||||
builder.UseYiModules(typeof(YiFrameworkWebModule));
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>autofacģ<63><C4A3>,<2C><>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>
|
||||
builder.Host.ConfigureAutoFacContainer(container =>
|
||||
@@ -46,9 +23,4 @@ var app = builder.Build();
|
||||
|
||||
var t = app.Services.GetService<Test2Entity>();
|
||||
app.MapControllers();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
app.Run();
|
||||
|
||||
@@ -7,3 +7,7 @@
|
||||
2023:01:16-22:42:05本次运行启动时间为:2008毫秒
|
||||
2023:01:16-22:43:22本次运行启动时间为:1910毫秒
|
||||
2023:01:16-22:44:33本次运行启动时间为:2017毫秒
|
||||
2023:01:17-17:30:46本次运行启动时间为:23171毫秒
|
||||
2023:01:17-17:45:11本次运行启动时间为:4771毫秒
|
||||
2023:01:17-17:45:54本次运行启动时间为:1917毫秒
|
||||
2023:01:17-17:48:04本次运行启动时间为:2138毫秒
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
using AspNetCore.Microsoft.AspNetCore.Builder;
|
||||
using StartupModules;
|
||||
using Yi.Framework.Application;
|
||||
using Yi.Framework.Core;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.Framework.Sqlsugar;
|
||||
|
||||
namespace Yi.Framework.Web
|
||||
{
|
||||
/// <summary>
|
||||
/// 这里是最后执行的模块
|
||||
/// </summary>
|
||||
[DependsOn(
|
||||
typeof(YiFrameworkCoreModule),
|
||||
typeof(YiFrameworkSqlsugarModule),
|
||||
typeof(YiFrameworkApplicationModule)
|
||||
)]
|
||||
public class YiFrameworkWebModule : IStartupModule
|
||||
{
|
||||
public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context)
|
||||
|
||||
Reference in New Issue
Block a user