BFS+倒置遍历完成模块化依赖功能

This commit is contained in:
橙子
2023-01-17 17:50:15 +08:00
parent 617fbdf8f7
commit f68ffefaa9
22 changed files with 192 additions and 203 deletions

View File

@@ -8,9 +8,14 @@ using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Caching.MemoryCache;
using Yi.Framework.Caching;
using Yi.Framework.Core.Attributes;
using Yi.Framework.Core;
namespace Yi.Framework.Ddd
{
[DependsOn(
typeof(YiFrameworkCoreModule)
)]
public class YiFrameworkCachingMemoryCacheModule:IStartupModule
{
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)

View File

@@ -1,11 +1,15 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using StartupModules;
using Yi.Framework.Core;
using Yi.Framework.Core.Attributes;
using Yi.Framework.Core.Configuration;
namespace Yi.Framework.Caching.Redis
{
[DependsOn(
typeof(YiFrameworkCoreModule)
)]
public class YiFrameworkCachingRedisModule : IStartupModule
{
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)

View File

@@ -6,9 +6,14 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Core;
using Yi.Framework.Core.Attributes;
namespace Yi.Framework.Office.Excel
{
[DependsOn(
typeof(YiFrameworkCoreModule)
)]
public class YiFrameworkOfficeExcelModule : IStartupModule
{
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)

View File

@@ -8,7 +8,7 @@ using Yi.Framework.WeChatPay.Helper;
namespace Yi.Framework.WeChatPay.Domain
{
public interface IPayInvoker
public interface IPayManager
{
/// <summary>
/// 获取WX支付链接的方法

View File

@@ -11,13 +11,13 @@ using Yi.Framework.WeChatPay.Options;
namespace Yi.Framework.WeChatPay.Domain
{
public class PayInvoker : IPayInvoker
public class PayManager : IPayManager
{
private readonly PayHelper _payHelper;
private readonly ILogger<PayInvoker> _logger;
private readonly ILogger<PayManager> _logger;
private readonly AbstractNotify _notify;
public PayInvoker(PayHelper payHelper, ILogger<PayInvoker> logger, AbstractNotify notify)
public PayManager(PayHelper payHelper, ILogger<PayManager> logger, AbstractNotify notify)
{
_payHelper = payHelper;
_logger = logger;

View File

@@ -40,8 +40,8 @@ namespace Yi.Framework.WeChatPay.Extensions
throw new PayException("NotifyUrl为空值");
}
services.AddSingleton(option);
services.AddTransient<PayInvoker>();
services.AddTransient<IPayInvoker, PayInvoker>();
services.AddTransient<PayManager>();
services.AddTransient<IPayManager, PayManager>();
services.AddTransient<IPayConfig, PayConfig>();
services.AddTransient<PayHelper>();
services.AddTransient<PayApi>();

View File

@@ -1,12 +1,17 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using StartupModules;
using Yi.Framework.Core;
using Yi.Framework.Core.Attributes;
using Yi.Framework.Core.Configuration;
using Yi.Framework.WeChatPay.Extensions;
using Yi.Framework.WeChatPay.Options;
namespace Yi.Framework.WeChatPay
{
[DependsOn(
typeof(YiFrameworkCoreModule)
)]
public class YiFrameworkWeChatPayModule : IStartupModule
{
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)