Files
StoreWeb/Core/MAX.Framework/Interfaces/ModuleBase.cs
T
2026-09-18 19:17:11 +08:00

24 lines
643 B
C#

using MAX.Core.Interfaces;
using Microsoft.AspNetCore.Builder;
namespace MAX.Framework.Interfaces
{
/// <summary>
/// 模块基类:给出 <see cref="IModule.Priority"/> 与 <see cref="IModule.UseModule"/> 的默认实现,
/// 模块只需重写自己真正关心的阶段(只有服务注册时只写 <see cref="AddModule"/>)。
/// </summary>
public abstract class ModuleBase : IModule
{
/// <inheritdoc />
public virtual int Priority => IntPriority.Normal;
/// <inheritdoc />
public abstract void AddModule(ModuleContext context);
/// <inheritdoc />
public virtual void UseModule(WebApplication app)
{
}
}
}