mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-07 00:39:00 +08:00
- 拆分 GFramework.Core.Tests 中多组测试辅助类型到独立文件以消减 MA0048 warning - 更新 analyzer-warning-reduction 的 tracking 与 trace 以记录批处理基线和下一恢复点 - 验证 GFramework.Core.Tests Release 构建清零并将仓库根权威 warning 基线压降到 288
28 lines
981 B
C#
28 lines
981 B
C#
using GFramework.Core.Query;
|
|
|
|
namespace GFramework.Core.Tests.Query;
|
|
|
|
/// <summary>
|
|
/// 为 <see cref="AsyncQueryExecutorTests" /> 提供布尔结果的测试异步查询。
|
|
/// </summary>
|
|
public sealed class TestAsyncBooleanQuery : AbstractAsyncQuery<TestAsyncQueryInput, bool>
|
|
{
|
|
/// <summary>
|
|
/// 初始化 <see cref="TestAsyncBooleanQuery" /> 的新实例。
|
|
/// </summary>
|
|
/// <param name="input">查询输入参数。</param>
|
|
public TestAsyncBooleanQuery(TestAsyncQueryInput input) : base(input)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// 执行异步查询并根据输入值是否大于零返回布尔结果。
|
|
/// </summary>
|
|
/// <param name="input">查询输入参数。</param>
|
|
/// <returns>当输入值大于 0 时返回 <see langword="true" />;否则返回 <see langword="false" />。</returns>
|
|
protected override Task<bool> OnDoAsync(TestAsyncQueryInput input)
|
|
{
|
|
return Task.FromResult(input.Value > 0);
|
|
}
|
|
}
|