// Copyright (c) 2025-2026 GeWuYou // SPDX-License-Identifier: Apache-2.0 using GFramework.Cqrs.Abstractions.Cqrs; namespace GFramework.Core.Cqrs; /// /// 包装 legacy 异步查询,使其能够通过自有 CQRS runtime 调度。 /// internal sealed class LegacyAsyncQueryDispatchRequest(object target, Func> executeAsync) : LegacyCqrsDispatchRequestBase(target), IRequest { private readonly Func> _executeAsync = executeAsync ?? throw new ArgumentNullException(nameof(executeAsync)); /// /// 异步执行底层 legacy 查询并返回装箱后的结果。 /// public Task ExecuteAsync() => _executeAsync(); }