mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-07 17:21:16 +08:00
- 修复 ReadYamlAsync 在取消时错误包装异常的问题,并对齐 IntegerTryParseDelegate 的可空性签名 - 更新 Ioc 与 Query 测试辅助类型的 XML 文档,并让 IPrioritizedService 复用 IMixedService 的 Name 契约 - 补充 YamlConfigLoader 取消语义回归测试并同步 analyzer warning reduction 跟踪
29 lines
1008 B
C#
29 lines
1008 B
C#
using GFramework.Core.Query;
|
|
|
|
namespace GFramework.Core.Tests.Query;
|
|
|
|
/// <summary>
|
|
/// 测试用异步查询类(抛出异常)
|
|
/// </summary>
|
|
public sealed class TestAsyncQueryWithExceptionV4 : AbstractAsyncQuery<TestAsyncQueryInputV2, int>
|
|
{
|
|
/// <summary>
|
|
/// 初始化TestAsyncQueryWithExceptionV4的新实例
|
|
/// </summary>
|
|
/// <param name="input">查询输入参数</param>
|
|
public TestAsyncQueryWithExceptionV4(TestAsyncQueryInputV2 input) : base(input)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// 执行异步查询操作并抛出异常
|
|
/// </summary>
|
|
/// <param name="input">查询输入参数</param>
|
|
/// <returns>返回一个不会正常完成的 <see cref="Task{TResult}" />,因为该方法始终抛出异常。</returns>
|
|
/// <exception cref="InvalidOperationException">总是抛出异常</exception>
|
|
protected override Task<int> OnDoAsync(TestAsyncQueryInputV2 input)
|
|
{
|
|
throw new InvalidOperationException("Test exception");
|
|
}
|
|
}
|