GeWuYou 005c32d84f feat(cqrs): 添加CQRS扩展方法兼容层和日志工厂解析器
- 新增ContextAwareMediatorCommandExtensions提供命令扩展方法兼容性支持
- 新增ContextAwareMediatorQueryExtensions提供查询扩展方法兼容性支持
- 添加LoggerFactoryResolver实现全局日志工厂访问入口
- 实现TypeForwarders将核心类型转发到正确程序集
- 添加MediatorCompatibilityDeprecationTests验证弃用策略
- 扩展LoggerFactoryTests覆盖并发初始化和回退逻辑
- 迁移CommandBase到Core.Cqrs.Command命名空间
- 移动LoggingBehavior到GFramework.Cqrs.Cqrs.Behaviors
- 添加AbstractStreamQueryHandler支持流式查询处理
- 创建NotificationBase提供通知基类实现
2026-04-15 22:27:09 +08:00

37 lines
1.6 KiB
C#

// Copyright (c) 2026 GeWuYou
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using GFramework.Cqrs.Abstractions.Cqrs;
using GFramework.Cqrs.Abstractions.Cqrs.Request;
namespace GFramework.Core.Cqrs.Request;
/// <summary>
/// 为携带输入模型的通用 CQRS 请求提供统一基类。
/// </summary>
/// <typeparam name="TInput">请求输入类型,必须实现 <see cref="IRequestInput" />。</typeparam>
/// <typeparam name="TResponse">请求响应类型。</typeparam>
/// <param name="input">请求执行所需的输入对象。</param>
/// <remarks>
/// 该类型继续保留在历史公开命名空间中,以避免调用方因 runtime 程序集拆分而批量修改继承层次。
/// 具体实现现由 <c>GFramework.Cqrs</c> 程序集承载,并通过 type forward 维持旧程序集兼容性。
/// </remarks>
public abstract class RequestBase<TInput, TResponse>(TInput input) : IRequest<TResponse>
where TInput : IRequestInput
{
/// <summary>
/// 获取请求执行时携带的输入对象。
/// </summary>
public TInput Input => input;
}