U:调整所有代码格式
This commit is contained in:
1 parent
d133bacf55
commit
155b67e831
342 files changed
+9431
-9868
No files matched your search
@@ -29,10 +29,7 @@ public class MiddlewarePipelineTests
|
||||
executionOrder.Add("Second-After");
|
||||
});
|
||||
|
||||
pipeline.Use(next => async context =>
|
||||
{
|
||||
executionOrder.Add("Third");
|
||||
});
|
||||
pipeline.Use(next => async context => { executionOrder.Add("Third"); });
|
||||
|
||||
// Act
|
||||
await pipeline.ExecuteAsync(null!); // 简化测试,不需要真实 context
|
||||
@@ -53,14 +50,12 @@ public class MiddlewarePipelineTests
|
||||
var pipeline = new MiddlewarePipeline();
|
||||
var counter = 0;
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
for (var i = 0; i < 5; i++)
|
||||
pipeline.Use(next => async context =>
|
||||
{
|
||||
counter++;
|
||||
await next(context);
|
||||
});
|
||||
}
|
||||
|
||||
// Act
|
||||
await pipeline.ExecuteAsync(null!);
|
||||
@@ -94,4 +89,4 @@ public class MiddlewarePipelineTests
|
||||
// Assert
|
||||
Assert.IsFalse(reachedEnd, "Pipeline should be short-circuited");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user