pipe 无法完全替换then
Closed this issue · 2 comments
ioer2008 commented
zmjack commented
参数函数拥有返回值时,会让它作为 Pipe 的返回值。
考虑使用以下方法让其返回 this:
var builder = WebApplication.CreateBuilder(args)
.Pipe(x => { x.Logging.AddSerilog(); });
或者
var builder = WebApplication.CreateBuilder(args)
.Pipe<WebApplicationBuilder>(x => x.Logging.AddSerilog());
ioer2008 commented
这样确实可以了,
非常感激!