模型注册
This commit is contained in:
1 parent
75d0e85218
commit
0e1620c1f9
11 files changed
+399
-41
No files matched your search
@@ -0,0 +1,23 @@
|
||||
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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user