This repository has been archived by the owner on Mar 4, 2024. It is now read-only.
v1.0.0-rc.8
Flandre.Framework
- 新的
ICommandRouteBuilder
接口,由FlandreApp
继承 - 新的
ICommandRouteBuilder.MapCommand
扩展方法,可以十分简便的使用内联函数添加一条指令,类比 ASP.NET Core 中的 Minimal API。
using Flandre.Framework.Routing;
// ...
var app = builder.Build();
app.MapCommand("test", (int a, int b) => a + b + 1);
app.Run();
发送:test 1 2
回复:4
Flandre.Adapters.*.Extensions
用于提供对接 Flandre.Framework 的扩展方法。
builder.Adapters.AddOneBot(); // 自动从配置的 Adapters:OneBot 读取配置项
builder.Adapters.AddOneBot(IConfiguration configuration);
builder.Adapters.AddOneBot(config => config.Xxx = /* ... */);