mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-07 00:39:00 +08:00
fix(namespace): 修正命名空间
- 修正Core模块命名空间 - 修正Godot模块命名空间
This commit is contained in:
parent
aba304f667
commit
ede8a8faa4
@ -1,11 +1,11 @@
|
||||
using GFramework.Core.Abstractions.Command;
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Core.Abstractions.Environment;
|
||||
using GFramework.Core.Abstractions.Events;
|
||||
using GFramework.Core.Abstractions.Model;
|
||||
using GFramework.Core.Abstractions.Query;
|
||||
using GFramework.Core.Abstractions.Systems;
|
||||
using GFramework.Core.Abstractions.Utility;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
using ICommand = GFramework.Core.Abstractions.Command.ICommand;
|
||||
|
||||
namespace GFramework.Core.Abstractions.Architectures;
|
||||
@ -131,7 +131,7 @@ public interface IArchitectureContext
|
||||
/// <remarks>
|
||||
/// 这是迁移后的推荐命令入口。无返回值命令应实现 <c>IRequest<Unit></c>,并优先通过 <see cref="SendAsync{TCommand}(TCommand,CancellationToken)" /> 调用。
|
||||
/// </remarks>
|
||||
TResponse SendCommand<TResponse>(Cqrs.Command.ICommand<TResponse> command);
|
||||
TResponse SendCommand<TResponse>(GFramework.Cqrs.Abstractions.Cqrs.Command.ICommand<TResponse> command);
|
||||
|
||||
|
||||
/// <summary>
|
||||
@ -147,7 +147,8 @@ public interface IArchitectureContext
|
||||
/// <param name="command">要发送的 CQRS 命令。</param>
|
||||
/// <param name="cancellationToken">取消令牌。</param>
|
||||
/// <returns>包含命令执行结果的值任务。</returns>
|
||||
ValueTask<TResponse> SendCommandAsync<TResponse>(Cqrs.Command.ICommand<TResponse> command,
|
||||
ValueTask<TResponse> SendCommandAsync<TResponse>(
|
||||
GFramework.Cqrs.Abstractions.Cqrs.Command.ICommand<TResponse> command,
|
||||
CancellationToken cancellationToken = default);
|
||||
|
||||
|
||||
@ -176,7 +177,7 @@ public interface IArchitectureContext
|
||||
/// <remarks>
|
||||
/// 这是迁移后的推荐查询入口。新查询应优先实现 <c>GFramework.Core.Abstractions.Cqrs.Query.IQuery<TResponse></c>。
|
||||
/// </remarks>
|
||||
TResponse SendQuery<TResponse>(Cqrs.Query.IQuery<TResponse> query);
|
||||
TResponse SendQuery<TResponse>(GFramework.Cqrs.Abstractions.Cqrs.Query.IQuery<TResponse> query);
|
||||
|
||||
/// <summary>
|
||||
/// 异步发送一个旧版查询请求。
|
||||
@ -193,7 +194,7 @@ public interface IArchitectureContext
|
||||
/// <param name="query">要发送的 CQRS 查询。</param>
|
||||
/// <param name="cancellationToken">取消令牌。</param>
|
||||
/// <returns>包含查询结果的值任务。</returns>
|
||||
ValueTask<TResponse> SendQueryAsync<TResponse>(Cqrs.Query.IQuery<TResponse> query,
|
||||
ValueTask<TResponse> SendQueryAsync<TResponse>(GFramework.Cqrs.Abstractions.Cqrs.Query.IQuery<TResponse> query,
|
||||
CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using GFramework.Core.Abstractions.Architectures;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
namespace GFramework.Core.Abstractions.Cqrs;
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Core.Abstractions.Logging;
|
||||
using GFramework.Core.Architectures;
|
||||
using GFramework.Core.Logging;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
namespace GFramework.Core.Tests.Architectures;
|
||||
|
||||
@ -12,8 +13,6 @@ namespace GFramework.Core.Tests.Architectures;
|
||||
[TestFixture]
|
||||
public sealed class ArchitectureAdditionalCqrsHandlersTests
|
||||
{
|
||||
private ILoggerFactoryProvider? _previousLoggerFactoryProvider;
|
||||
|
||||
/// <summary>
|
||||
/// 初始化日志工厂和共享测试状态。
|
||||
/// </summary>
|
||||
@ -39,6 +38,8 @@ public sealed class ArchitectureAdditionalCqrsHandlersTests
|
||||
"LoggerFactoryResolver.Provider should be captured during setup.");
|
||||
}
|
||||
|
||||
private ILoggerFactoryProvider? _previousLoggerFactoryProvider;
|
||||
|
||||
/// <summary>
|
||||
/// 验证显式声明的额外程序集会在初始化阶段接入当前架构容器。
|
||||
/// </summary>
|
||||
@ -197,4 +198,4 @@ internal sealed class AdditionalAssemblyNotificationHandlerRegistry : ICqrsHandl
|
||||
});
|
||||
return handler.Object;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@ using GFramework.Core.Abstractions.Architectures;
|
||||
using GFramework.Core.Abstractions.Utility;
|
||||
using GFramework.Core.Architectures;
|
||||
using GFramework.Core.Logging;
|
||||
using GfCqrs = GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
namespace GFramework.Core.Tests.Architectures;
|
||||
|
||||
@ -151,14 +151,14 @@ public class ArchitectureModulesBehaviorTests
|
||||
/// <summary>
|
||||
/// 用于验证管道行为注册是否生效的测试请求。
|
||||
/// </summary>
|
||||
public sealed class ModuleBehaviorRequest : GfCqrs.IRequest<string>
|
||||
public sealed class ModuleBehaviorRequest : IRequest<string>
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 处理测试请求的处理器。
|
||||
/// </summary>
|
||||
public sealed class ModuleBehaviorRequestHandler : GfCqrs.IRequestHandler<ModuleBehaviorRequest, string>
|
||||
public sealed class ModuleBehaviorRequestHandler : IRequestHandler<ModuleBehaviorRequest, string>
|
||||
{
|
||||
/// <summary>
|
||||
/// 返回固定结果,便于聚焦验证管道行为是否执行。
|
||||
@ -177,8 +177,8 @@ public sealed class ModuleBehaviorRequestHandler : GfCqrs.IRequestHandler<Module
|
||||
/// </summary>
|
||||
/// <typeparam name="TRequest">请求类型。</typeparam>
|
||||
/// <typeparam name="TResponse">响应类型。</typeparam>
|
||||
public sealed class TrackingPipelineBehavior<TRequest, TResponse> : GfCqrs.IPipelineBehavior<TRequest, TResponse>
|
||||
where TRequest : GfCqrs.IRequest<TResponse>
|
||||
public sealed class TrackingPipelineBehavior<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse>
|
||||
where TRequest : IRequest<TResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取当前测试进程中该请求类型对应的行为触发次数。
|
||||
@ -193,7 +193,7 @@ public sealed class TrackingPipelineBehavior<TRequest, TResponse> : GfCqrs.IPipe
|
||||
/// <param name="cancellationToken">取消令牌。</param>
|
||||
/// <returns>下游处理器的响应结果。</returns>
|
||||
public async ValueTask<TResponse> Handle(
|
||||
TRequest message, GfCqrs.MessageHandlerDelegate<TRequest, TResponse> next,
|
||||
TRequest message, MessageHandlerDelegate<TRequest, TResponse> next,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
InvocationCount++;
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
using GFramework.Core.Abstractions.Architectures;
|
||||
using GFramework.Core.Abstractions.Command;
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Core.Abstractions.Environment;
|
||||
using GFramework.Core.Abstractions.Events;
|
||||
using GFramework.Core.Abstractions.Ioc;
|
||||
@ -14,6 +13,7 @@ using GFramework.Core.Environment;
|
||||
using GFramework.Core.Events;
|
||||
using GFramework.Core.Ioc;
|
||||
using GFramework.Core.Query;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
using ICommand = GFramework.Core.Abstractions.Command.ICommand;
|
||||
|
||||
namespace GFramework.Core.Tests.Architectures;
|
||||
@ -34,10 +34,6 @@ namespace GFramework.Core.Tests.Architectures;
|
||||
[TestFixture]
|
||||
public class ArchitectureServicesTests
|
||||
{
|
||||
private TestArchitectureContextV3? _context;
|
||||
|
||||
private ArchitectureServices? _services;
|
||||
|
||||
[SetUp]
|
||||
public void SetUp()
|
||||
{
|
||||
@ -45,6 +41,10 @@ public class ArchitectureServicesTests
|
||||
_context = new TestArchitectureContextV3();
|
||||
}
|
||||
|
||||
private TestArchitectureContextV3? _context;
|
||||
|
||||
private ArchitectureServices? _services;
|
||||
|
||||
private void RegisterBuiltInServices()
|
||||
{
|
||||
_services!.ModuleManager.RegisterBuiltInModules(_services.Container);
|
||||
@ -359,24 +359,26 @@ public class TestArchitectureContextV3 : IArchitectureContext
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public ValueTask<TResponse> SendCommandAsync<TResponse>(Abstractions.Cqrs.Command.ICommand<TResponse> command,
|
||||
public ValueTask<TResponse> SendCommandAsync<TResponse>(
|
||||
GFramework.Cqrs.Abstractions.Cqrs.Command.ICommand<TResponse> command,
|
||||
CancellationToken cancellationToken = default)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public TResponse SendCommand<TResponse>(Abstractions.Cqrs.Command.ICommand<TResponse> command)
|
||||
public TResponse SendCommand<TResponse>(GFramework.Cqrs.Abstractions.Cqrs.Command.ICommand<TResponse> command)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public ValueTask<TResponse> SendQueryAsync<TResponse>(Abstractions.Cqrs.Query.IQuery<TResponse> query,
|
||||
public ValueTask<TResponse> SendQueryAsync<TResponse>(
|
||||
GFramework.Cqrs.Abstractions.Cqrs.Query.IQuery<TResponse> query,
|
||||
CancellationToken cancellationToken = default)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public TResponse SendQuery<TResponse>(Abstractions.Cqrs.Query.IQuery<TResponse> query)
|
||||
public TResponse SendQuery<TResponse>(GFramework.Cqrs.Abstractions.Cqrs.Query.IQuery<TResponse> query)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
using GFramework.Core.Abstractions.Architectures;
|
||||
using GFramework.Core.Abstractions.Command;
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Core.Abstractions.Environment;
|
||||
using GFramework.Core.Abstractions.Events;
|
||||
using GFramework.Core.Abstractions.Ioc;
|
||||
@ -14,6 +13,7 @@ using GFramework.Core.Environment;
|
||||
using GFramework.Core.Events;
|
||||
using GFramework.Core.Ioc;
|
||||
using GFramework.Core.Query;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
using ICommand = GFramework.Core.Abstractions.Command.ICommand;
|
||||
|
||||
namespace GFramework.Core.Tests.Architectures;
|
||||
@ -428,7 +428,8 @@ public class TestArchitectureContext : IArchitectureContext
|
||||
/// <param name="cancellationToken">取消令牌。</param>
|
||||
/// <returns>命令响应任务。</returns>
|
||||
/// <exception cref="NotImplementedException">该测试桩未实现此成员。</exception>
|
||||
public ValueTask<TResponse> SendCommandAsync<TResponse>(Abstractions.Cqrs.Command.ICommand<TResponse> command,
|
||||
public ValueTask<TResponse> SendCommandAsync<TResponse>(
|
||||
GFramework.Cqrs.Abstractions.Cqrs.Command.ICommand<TResponse> command,
|
||||
CancellationToken cancellationToken = default)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
@ -441,7 +442,7 @@ public class TestArchitectureContext : IArchitectureContext
|
||||
/// <param name="command">要发送的命令。</param>
|
||||
/// <returns>命令响应。</returns>
|
||||
/// <exception cref="NotImplementedException">该测试桩未实现此成员。</exception>
|
||||
public TResponse SendCommand<TResponse>(Abstractions.Cqrs.Command.ICommand<TResponse> command)
|
||||
public TResponse SendCommand<TResponse>(GFramework.Cqrs.Abstractions.Cqrs.Command.ICommand<TResponse> command)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
@ -454,7 +455,8 @@ public class TestArchitectureContext : IArchitectureContext
|
||||
/// <param name="cancellationToken">取消令牌。</param>
|
||||
/// <returns>查询结果任务。</returns>
|
||||
/// <exception cref="NotImplementedException">该测试桩未实现此成员。</exception>
|
||||
public ValueTask<TResponse> SendQueryAsync<TResponse>(Abstractions.Cqrs.Query.IQuery<TResponse> query,
|
||||
public ValueTask<TResponse> SendQueryAsync<TResponse>(
|
||||
GFramework.Cqrs.Abstractions.Cqrs.Query.IQuery<TResponse> query,
|
||||
CancellationToken cancellationToken = default)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
@ -467,7 +469,7 @@ public class TestArchitectureContext : IArchitectureContext
|
||||
/// <param name="query">要发送的查询。</param>
|
||||
/// <returns>查询结果。</returns>
|
||||
/// <exception cref="NotImplementedException">该测试桩未实现此成员。</exception>
|
||||
public TResponse SendQuery<TResponse>(Abstractions.Cqrs.Query.IQuery<TResponse> query)
|
||||
public TResponse SendQuery<TResponse>(GFramework.Cqrs.Abstractions.Cqrs.Query.IQuery<TResponse> query)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using GFramework.Core.Abstractions.Command;
|
||||
using GFramework.Core.Abstractions.Cqrs.Command;
|
||||
using GFramework.Core.Abstractions.Rule;
|
||||
using GFramework.Core.Architectures;
|
||||
using GFramework.Core.Command;
|
||||
@ -7,6 +6,7 @@ using GFramework.Core.Environment;
|
||||
using GFramework.Core.Events;
|
||||
using GFramework.Core.Ioc;
|
||||
using GFramework.Core.Query;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Command;
|
||||
|
||||
namespace GFramework.Core.Tests.Command;
|
||||
|
||||
@ -396,4 +396,4 @@ public sealed class TestAsyncCommandWithResultChildV3 : AbstractAsyncCommand<Tes
|
||||
Executed = true;
|
||||
return Task.FromResult(input.Value * 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
using GFramework.Core.Abstractions.Cqrs.Command;
|
||||
using GFramework.Core.Command;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Command;
|
||||
|
||||
namespace GFramework.Core.Tests.Command;
|
||||
|
||||
@ -261,4 +261,4 @@ public sealed class TestAsyncCommandWithResult : AbstractAsyncCommand<TestComman
|
||||
Executed = true;
|
||||
return Task.FromResult(input.Value * 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
namespace GFramework.Core.Tests.Cqrs;
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ using GFramework.Core.Abstractions.Logging;
|
||||
using GFramework.Core.Architectures;
|
||||
using GFramework.Core.Ioc;
|
||||
using GFramework.Core.Logging;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
namespace GFramework.Core.Tests;
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
using System.Reflection;
|
||||
using GFramework.Core.Abstractions.Bases;
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Core.Ioc;
|
||||
using GFramework.Core.Logging;
|
||||
using GFramework.Core.Tests.Cqrs;
|
||||
using GFramework.Core.Tests.Systems;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
namespace GFramework.Core.Tests.Ioc;
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
using GFramework.Core.Abstractions.Cqrs.Query;
|
||||
using GFramework.Core.Abstractions.Query;
|
||||
using GFramework.Core.Abstractions.Rule;
|
||||
using GFramework.Core.Architectures;
|
||||
@ -7,6 +6,7 @@ using GFramework.Core.Environment;
|
||||
using GFramework.Core.Events;
|
||||
using GFramework.Core.Ioc;
|
||||
using GFramework.Core.Query;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Query;
|
||||
|
||||
namespace GFramework.Core.Tests.Query;
|
||||
|
||||
@ -411,4 +411,4 @@ public sealed class TestAsyncQueryResultV2
|
||||
/// 获取或设置双倍值
|
||||
/// </summary>
|
||||
public int DoubleValue { get; init; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
using GFramework.Core.Abstractions.Cqrs.Query;
|
||||
using GFramework.Core.Query;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Query;
|
||||
|
||||
namespace GFramework.Core.Tests.Query;
|
||||
|
||||
@ -292,4 +292,4 @@ public sealed class TestAsyncQueryResult
|
||||
/// 获取或设置双倍值
|
||||
/// </summary>
|
||||
public int DoubleValue { get; init; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
using GFramework.Core.Abstractions.Cqrs.Query;
|
||||
using GFramework.Core.Query;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Query;
|
||||
|
||||
namespace GFramework.Core.Tests.Query;
|
||||
|
||||
@ -121,4 +121,4 @@ public sealed class TestStringQuery : AbstractQuery<TestQueryInput, string>
|
||||
{
|
||||
return $"Result: {input.Value * 2}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ using GFramework.Core.Abstractions.Model;
|
||||
using GFramework.Core.Abstractions.Query;
|
||||
using GFramework.Core.Abstractions.Systems;
|
||||
using GFramework.Core.Abstractions.Utility;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
using ICommand = GFramework.Core.Abstractions.Command.ICommand;
|
||||
|
||||
namespace GFramework.Core.Architectures;
|
||||
@ -160,7 +161,7 @@ public class ArchitectureContext(IIocContainer container) : IArchitectureContext
|
||||
/// <typeparam name="TResponse">查询响应类型</typeparam>
|
||||
/// <param name="query">要发送的查询对象</param>
|
||||
/// <returns>查询结果</returns>
|
||||
public TResponse SendQuery<TResponse>(Abstractions.Cqrs.Query.IQuery<TResponse> query)
|
||||
public TResponse SendQuery<TResponse>(GFramework.Cqrs.Abstractions.Cqrs.Query.IQuery<TResponse> query)
|
||||
{
|
||||
return SendQueryAsync(query).AsTask().GetAwaiter().GetResult();
|
||||
}
|
||||
@ -186,7 +187,8 @@ public class ArchitectureContext(IIocContainer container) : IArchitectureContext
|
||||
/// <param name="query">要发送的查询对象</param>
|
||||
/// <param name="cancellationToken">取消令牌,用于取消操作</param>
|
||||
/// <returns>包含查询结果的ValueTask</returns>
|
||||
public async ValueTask<TResponse> SendQueryAsync<TResponse>(Abstractions.Cqrs.Query.IQuery<TResponse> query,
|
||||
public async ValueTask<TResponse> SendQueryAsync<TResponse>(
|
||||
GFramework.Cqrs.Abstractions.Cqrs.Query.IQuery<TResponse> query,
|
||||
CancellationToken cancellationToken = default)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(query);
|
||||
@ -322,7 +324,8 @@ public class ArchitectureContext(IIocContainer container) : IArchitectureContext
|
||||
/// <param name="command">要发送的命令对象</param>
|
||||
/// <param name="cancellationToken">取消令牌,用于取消操作</param>
|
||||
/// <returns>包含命令执行结果的ValueTask</returns>
|
||||
public async ValueTask<TResponse> SendCommandAsync<TResponse>(Abstractions.Cqrs.Command.ICommand<TResponse> command,
|
||||
public async ValueTask<TResponse> SendCommandAsync<TResponse>(
|
||||
GFramework.Cqrs.Abstractions.Cqrs.Command.ICommand<TResponse> command,
|
||||
CancellationToken cancellationToken = default)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(command);
|
||||
@ -361,7 +364,7 @@ public class ArchitectureContext(IIocContainer container) : IArchitectureContext
|
||||
/// <typeparam name="TResponse">命令响应类型</typeparam>
|
||||
/// <param name="command">要发送的命令对象</param>
|
||||
/// <returns>命令执行结果</returns>
|
||||
public TResponse SendCommand<TResponse>(Abstractions.Cqrs.Command.ICommand<TResponse> command)
|
||||
public TResponse SendCommand<TResponse>(GFramework.Cqrs.Abstractions.Cqrs.Command.ICommand<TResponse> command)
|
||||
{
|
||||
return SendCommandAsync(command).AsTask().GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
using GFramework.Core.Abstractions.Command;
|
||||
using GFramework.Core.Abstractions.Cqrs.Command;
|
||||
using GFramework.Core.Rule;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Command;
|
||||
|
||||
namespace GFramework.Core.Command;
|
||||
|
||||
@ -26,4 +26,4 @@ public abstract class AbstractAsyncCommand<TInput>(TInput input) : ContextAwareB
|
||||
/// <param name="input">命令输入参数</param>
|
||||
/// <returns>表示异步操作的任务</returns>
|
||||
protected abstract Task OnExecuteAsync(TInput input);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
using GFramework.Core.Abstractions.Command;
|
||||
using GFramework.Core.Abstractions.Cqrs.Command;
|
||||
using GFramework.Core.Rule;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Command;
|
||||
|
||||
namespace GFramework.Core.Command;
|
||||
|
||||
@ -27,4 +27,4 @@ public abstract class AbstractAsyncCommand<TInput, TResult>(TInput input) : Cont
|
||||
/// <param name="input">命令输入参数</param>
|
||||
/// <returns>表示异步操作且包含结果的任务</returns>
|
||||
protected abstract Task<TResult> OnExecuteAsync(TInput input);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
using GFramework.Core.Abstractions.Command;
|
||||
using GFramework.Core.Abstractions.Cqrs.Command;
|
||||
using GFramework.Core.Rule;
|
||||
using GFramework.Core.Rule;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Command;
|
||||
using ICommand = GFramework.Core.Abstractions.Command.ICommand;
|
||||
|
||||
namespace GFramework.Core.Command;
|
||||
|
||||
@ -9,13 +9,13 @@ namespace GFramework.Core.Command;
|
||||
/// </summary>
|
||||
/// <typeparam name="TInput">命令输入参数类型,必须实现 ICommandInput 接口</typeparam>
|
||||
/// <param name="input">命令执行所需的输入参数</param>
|
||||
public abstract class AbstractCommand<TInput>(TInput input) : ContextAwareBase, GFramework.Core.Abstractions.Command.ICommand
|
||||
public abstract class AbstractCommand<TInput>(TInput input) : ContextAwareBase, ICommand
|
||||
where TInput : ICommandInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 执行命令的入口方法,实现 ICommand 接口的 Execute 方法
|
||||
/// </summary>
|
||||
void GFramework.Core.Abstractions.Command.ICommand.Execute()
|
||||
void ICommand.Execute()
|
||||
{
|
||||
OnExecute(input);
|
||||
}
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
using GFramework.Core.Abstractions.Command;
|
||||
using GFramework.Core.Abstractions.Cqrs.Command;
|
||||
using GFramework.Core.Rule;
|
||||
using GFramework.Core.Rule;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Command;
|
||||
|
||||
namespace GFramework.Core.Command;
|
||||
|
||||
@ -10,14 +9,15 @@ namespace GFramework.Core.Command;
|
||||
/// <typeparam name="TInput">命令输入参数类型,必须实现 ICommandInput 接口</typeparam>
|
||||
/// <typeparam name="TResult">命令执行后返回的结果类型</typeparam>
|
||||
/// <param name="input">命令执行所需的输入参数</param>
|
||||
public abstract class AbstractCommand<TInput, TResult>(TInput input) : ContextAwareBase, GFramework.Core.Abstractions.Command.ICommand<TResult>
|
||||
public abstract class AbstractCommand<TInput, TResult>(TInput input)
|
||||
: ContextAwareBase, Abstractions.Command.ICommand<TResult>
|
||||
where TInput : ICommandInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 执行命令的入口方法,实现 ICommand{TResult} 接口的 Execute 方法
|
||||
/// </summary>
|
||||
/// <returns>命令执行后的结果</returns>
|
||||
TResult GFramework.Core.Abstractions.Command.ICommand<TResult>.Execute()
|
||||
TResult Abstractions.Command.ICommand<TResult>.Execute()
|
||||
{
|
||||
return OnExecute(input);
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using GFramework.Core.Abstractions.Cqrs.Command;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Command;
|
||||
|
||||
namespace GFramework.Core.Command;
|
||||
|
||||
@ -9,4 +9,4 @@ namespace GFramework.Core.Command;
|
||||
/// 该类实现了ICommandInput接口,作为命令模式中的输入参数载体
|
||||
/// 通常用于不需要额外输入参数的简单命令操作
|
||||
/// </remarks>
|
||||
public sealed class EmptyCommandInput : ICommandInput;
|
||||
public sealed class EmptyCommandInput : ICommandInput;
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
using System.Runtime.ExceptionServices;
|
||||
using GFramework.Core.Abstractions.Coroutine;
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Core.Abstractions.Rule;
|
||||
using GFramework.Core.Coroutine.Extensions;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
namespace GFramework.Core.Cqrs.Extensions;
|
||||
namespace GFramework.Core.Coroutine.Extensions;
|
||||
|
||||
/// <summary>
|
||||
/// 提供 CQRS 命令与协程集成的扩展方法。
|
||||
|
||||
@ -13,15 +13,14 @@
|
||||
|
||||
using System.ComponentModel;
|
||||
using GFramework.Core.Abstractions.Coroutine;
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Core.Abstractions.Rule;
|
||||
using GFramework.Core.Cqrs.Extensions;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
namespace GFramework.Core.Coroutine.Extensions;
|
||||
|
||||
/// <summary>
|
||||
/// 提供 CQRS 命令与协程集成的扩展方法。
|
||||
/// 该类型保留旧名称以兼容历史调用点;新代码应改用 <see cref="GFramework.Core.Cqrs.Extensions.CqrsCoroutineExtensions" />。
|
||||
/// 该类型保留旧名称以兼容历史调用点;新代码应改用 <see cref="CqrsCoroutineExtensions" />。
|
||||
/// 兼容层计划在未来的 major 版本中移除,因此不会继续承载新能力。
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
|
||||
@ -12,9 +12,9 @@
|
||||
// limitations under the License.
|
||||
|
||||
using System.Diagnostics;
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Core.Abstractions.Logging;
|
||||
using GFramework.Core.Logging;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
namespace GFramework.Core.Cqrs.Behaviors;
|
||||
|
||||
|
||||
@ -12,9 +12,9 @@
|
||||
// limitations under the License.
|
||||
|
||||
using System.Diagnostics;
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Core.Abstractions.Logging;
|
||||
using GFramework.Core.Logging;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
namespace GFramework.Core.Cqrs.Behaviors;
|
||||
|
||||
|
||||
@ -11,9 +11,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Core.Abstractions.Cqrs.Command;
|
||||
using GFramework.Core.Rule;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Command;
|
||||
|
||||
namespace GFramework.Core.Cqrs.Command;
|
||||
|
||||
|
||||
@ -11,9 +11,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Core.Abstractions.Cqrs.Command;
|
||||
using GFramework.Core.Rule;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Command;
|
||||
|
||||
namespace GFramework.Core.Cqrs.Command;
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
using GFramework.Core.Abstractions.Cqrs.Command;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Command;
|
||||
|
||||
namespace GFramework.Core.Cqrs.Command;
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Core.Abstractions.Ioc;
|
||||
using GFramework.Core.Abstractions.Logging;
|
||||
using GFramework.Core.Abstractions.Rule;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
namespace GFramework.Core.Cqrs.Internal;
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ using System.Reflection;
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Core.Abstractions.Ioc;
|
||||
using GFramework.Core.Abstractions.Logging;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
namespace GFramework.Core.Cqrs.Internal;
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
using System.Reflection;
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Core.Abstractions.Ioc;
|
||||
using GFramework.Core.Abstractions.Logging;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
namespace GFramework.Core.Cqrs.Internal;
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
using GFramework.Core.Rule;
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
namespace GFramework.Core.Cqrs.Notification;
|
||||
|
||||
|
||||
@ -11,8 +11,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
using GFramework.Core.Abstractions.Cqrs.Notification;
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Notification;
|
||||
|
||||
namespace GFramework.Core.Cqrs.Notification;
|
||||
|
||||
|
||||
@ -11,9 +11,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Core.Abstractions.Cqrs.Query;
|
||||
using GFramework.Core.Rule;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Query;
|
||||
|
||||
namespace GFramework.Core.Cqrs.Query;
|
||||
|
||||
|
||||
@ -12,8 +12,8 @@
|
||||
// limitations under the License.
|
||||
|
||||
using GFramework.Core.Rule;
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Core.Abstractions.Cqrs.Query;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Query;
|
||||
|
||||
namespace GFramework.Core.Cqrs.Query;
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
using GFramework.Core.Abstractions.Cqrs.Query;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Query;
|
||||
|
||||
namespace GFramework.Core.Cqrs.Query;
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
using GFramework.Core.Rule;
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
namespace GFramework.Core.Cqrs.Request;
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
using GFramework.Core.Rule;
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
namespace GFramework.Core.Cqrs.Request;
|
||||
|
||||
|
||||
@ -11,8 +11,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
using GFramework.Core.Abstractions.Cqrs.Request;
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Request;
|
||||
|
||||
namespace GFramework.Core.Cqrs.Request;
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
using GFramework.Core.Abstractions.Cqrs.Command;
|
||||
using GFramework.Core.Abstractions.Rule;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Command;
|
||||
|
||||
namespace GFramework.Core.Cqrs.Extensions;
|
||||
namespace GFramework.Core.Extensions;
|
||||
|
||||
/// <summary>
|
||||
/// 提供对 <see cref="IContextAware" /> 接口的 CQRS 命令扩展方法。
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Core.Abstractions.Rule;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
namespace GFramework.Core.Cqrs.Extensions;
|
||||
namespace GFramework.Core.Extensions;
|
||||
|
||||
/// <summary>
|
||||
/// 提供对 <see cref="IContextAware" /> 接口的 CQRS 统一扩展方法。
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
using GFramework.Core.Abstractions.Cqrs.Query;
|
||||
using GFramework.Core.Abstractions.Rule;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Query;
|
||||
|
||||
namespace GFramework.Core.Cqrs.Extensions;
|
||||
namespace GFramework.Core.Extensions;
|
||||
|
||||
/// <summary>
|
||||
/// 提供对 <see cref="IContextAware" /> 接口的 CQRS 查询扩展方法。
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
using System.ComponentModel;
|
||||
using GFramework.Core.Abstractions.Cqrs.Command;
|
||||
using GFramework.Core.Abstractions.Rule;
|
||||
using GFramework.Core.Cqrs.Extensions;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Command;
|
||||
|
||||
namespace GFramework.Core.Extensions;
|
||||
|
||||
/// <summary>
|
||||
/// 提供对 <see cref="IContextAware" /> 接口的 CQRS 命令扩展方法。
|
||||
/// 该类型保留旧名称以兼容历史调用点;新代码应改用 <see cref="GFramework.Core.Cqrs.Extensions.ContextAwareCqrsCommandExtensions" />。
|
||||
/// 该类型保留旧名称以兼容历史调用点;新代码应改用 <see cref="ContextAwareCqrsCommandExtensions" />。
|
||||
/// 兼容层计划在未来的 major 版本中移除,因此不会继续承载新能力。
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
using System.ComponentModel;
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Core.Abstractions.Rule;
|
||||
using GFramework.Core.Cqrs.Extensions;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
namespace GFramework.Core.Extensions;
|
||||
|
||||
/// <summary>
|
||||
/// 提供对 <see cref="IContextAware" /> 接口的 CQRS 统一接口扩展方法。
|
||||
/// 该类型保留旧名称以兼容历史调用点;新代码应改用 <see cref="GFramework.Core.Cqrs.Extensions.ContextAwareCqrsExtensions" />。
|
||||
/// 该类型保留旧名称以兼容历史调用点;新代码应改用 <see cref="ContextAwareCqrsExtensions" />。
|
||||
/// 兼容层计划在未来的 major 版本中移除,因此不会继续承载新能力。
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
using System.ComponentModel;
|
||||
using GFramework.Core.Abstractions.Cqrs.Query;
|
||||
using GFramework.Core.Abstractions.Rule;
|
||||
using GFramework.Core.Cqrs.Extensions;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Query;
|
||||
|
||||
namespace GFramework.Core.Extensions;
|
||||
|
||||
/// <summary>
|
||||
/// 提供对 <see cref="IContextAware" /> 接口的 CQRS 查询扩展方法。
|
||||
/// 该类型保留旧名称以兼容历史调用点;新代码应改用 <see cref="GFramework.Core.Cqrs.Extensions.ContextAwareCqrsQueryExtensions" />。
|
||||
/// 该类型保留旧名称以兼容历史调用点;新代码应改用 <see cref="ContextAwareCqrsQueryExtensions" />。
|
||||
/// 兼容层计划在未来的 major 版本中移除,因此不会继续承载新能力。
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
using System.ComponentModel;
|
||||
using System.Reflection;
|
||||
using GFramework.Core.Abstractions.Bases;
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Core.Abstractions.Ioc;
|
||||
using GFramework.Core.Abstractions.Logging;
|
||||
using GFramework.Core.Abstractions.Systems;
|
||||
using GFramework.Core.Logging;
|
||||
using GFramework.Core.Rule;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
namespace GFramework.Core.Ioc;
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
using GFramework.Core.Abstractions.Cqrs.Query;
|
||||
using GFramework.Core.Abstractions.Query;
|
||||
using GFramework.Core.Abstractions.Query;
|
||||
using GFramework.Core.Rule;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Query;
|
||||
|
||||
namespace GFramework.Core.Query;
|
||||
|
||||
@ -30,4 +30,4 @@ public abstract class AbstractAsyncQuery<TInput, TResult>(
|
||||
/// <param name="input">查询输入参数</param>
|
||||
/// <returns>返回查询结果的异步任务</returns>
|
||||
protected abstract Task<TResult> OnDoAsync(TInput input);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
using GFramework.Core.Abstractions.Cqrs.Query;
|
||||
using GFramework.Core.Abstractions.Query;
|
||||
using GFramework.Core.Rule;
|
||||
using GFramework.Core.Rule;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Query;
|
||||
|
||||
namespace GFramework.Core.Query;
|
||||
|
||||
@ -9,7 +8,8 @@ namespace GFramework.Core.Query;
|
||||
/// </summary>
|
||||
/// <typeparam name="TInput">查询输入参数的类型,必须实现IQueryInput接口</typeparam>
|
||||
/// <typeparam name="TResult">查询结果的类型</typeparam>
|
||||
public abstract class AbstractQuery<TInput, TResult>(TInput input) : ContextAwareBase, GFramework.Core.Abstractions.Query.IQuery<TResult>
|
||||
public abstract class AbstractQuery<TInput, TResult>(TInput input)
|
||||
: ContextAwareBase, Abstractions.Query.IQuery<TResult>
|
||||
where TInput : IQueryInput
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using GFramework.Core.Abstractions.Cqrs.Query;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Query;
|
||||
|
||||
namespace GFramework.Core.Query;
|
||||
|
||||
@ -8,4 +8,4 @@ namespace GFramework.Core.Query;
|
||||
/// <remarks>
|
||||
/// 该类实现了IQueryInput接口,作为占位符使用,适用于那些不需要额外输入参数的查询场景
|
||||
/// </remarks>
|
||||
public sealed class EmptyQueryInput : IQueryInput;
|
||||
public sealed class EmptyQueryInput : IQueryInput;
|
||||
|
||||
@ -3,6 +3,7 @@ using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Core.Abstractions.Ioc;
|
||||
using GFramework.Core.Cqrs.Internal;
|
||||
using GFramework.Core.Logging;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
namespace GFramework.Core.Services.Modules;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.Core.Abstractions.Cqrs.Command;
|
||||
namespace GFramework.Cqrs.Abstractions.Cqrs.Command;
|
||||
|
||||
/// <summary>
|
||||
/// 表示一个 CQRS 命令。
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.Core.Abstractions.Cqrs.Command;
|
||||
namespace GFramework.Cqrs.Abstractions.Cqrs.Command;
|
||||
|
||||
/// <summary>
|
||||
/// 命令输入接口,定义命令模式中输入数据的契约
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
using System.Reflection;
|
||||
|
||||
namespace GFramework.Core.Abstractions.Cqrs;
|
||||
namespace GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
/// <summary>
|
||||
/// 定义 CQRS 处理器程序集接入的 runtime seam。
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
namespace GFramework.Core.Abstractions.Cqrs;
|
||||
namespace GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
/// <summary>
|
||||
/// 表示输入数据的标记接口。
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.Core.Abstractions.Cqrs;
|
||||
namespace GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
/// <summary>
|
||||
/// 表示一个一对多发布的通知消息。
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.Core.Abstractions.Cqrs;
|
||||
namespace GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
/// <summary>
|
||||
/// 表示处理通知消息的处理器契约。
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.Core.Abstractions.Cqrs;
|
||||
namespace GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
/// <summary>
|
||||
/// 定义 CQRS 请求处理前后的管道行为。
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.Core.Abstractions.Cqrs;
|
||||
namespace GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
/// <summary>
|
||||
/// 表示一个有响应的 CQRS 请求。
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.Core.Abstractions.Cqrs;
|
||||
namespace GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
/// <summary>
|
||||
/// 表示处理单个 CQRS 请求的处理器契约。
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.Core.Abstractions.Cqrs;
|
||||
namespace GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
/// <summary>
|
||||
/// 表示一个流式 CQRS 请求。
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.Core.Abstractions.Cqrs;
|
||||
namespace GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
/// <summary>
|
||||
/// 表示处理流式 CQRS 请求的处理器契约。
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.Core.Abstractions.Cqrs;
|
||||
namespace GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
/// <summary>
|
||||
/// 表示 CQRS 请求在管道中继续向下执行的处理委托。
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
namespace GFramework.Core.Abstractions.Cqrs.Notification;
|
||||
namespace GFramework.Cqrs.Abstractions.Cqrs.Notification;
|
||||
|
||||
/// <summary>
|
||||
/// 表示通知输入数据的标记接口。
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.Core.Abstractions.Cqrs.Query;
|
||||
namespace GFramework.Cqrs.Abstractions.Cqrs.Query;
|
||||
|
||||
/// <summary>
|
||||
/// 表示一个 CQRS 查询。
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.Core.Abstractions.Cqrs.Query;
|
||||
namespace GFramework.Cqrs.Abstractions.Cqrs.Query;
|
||||
|
||||
/// <summary>
|
||||
/// 查询输入接口,定义了查询操作的输入规范
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
namespace GFramework.Core.Abstractions.Cqrs.Request;
|
||||
namespace GFramework.Cqrs.Abstractions.Cqrs.Request;
|
||||
|
||||
/// <summary>
|
||||
/// 表示请求输入数据的标记接口。
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.Core.Abstractions.Cqrs;
|
||||
namespace GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
/// <summary>
|
||||
/// 表示没有实际返回值的 CQRS 响应类型。
|
||||
|
||||
@ -13,11 +13,10 @@
|
||||
|
||||
using GFramework.Core.Abstractions.Architectures;
|
||||
using GFramework.Core.Abstractions.Coroutine;
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Core.Abstractions.Rule;
|
||||
using GFramework.Core.Cqrs.Extensions;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
namespace GFramework.Core.Tests.Coroutine;
|
||||
namespace GFramework.Cqrs.Tests.Coroutine;
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="CqrsCoroutineExtensions" /> 的单元测试类。
|
||||
|
||||
@ -3,9 +3,10 @@ using GFramework.Core.Abstractions.Logging;
|
||||
using GFramework.Core.Architectures;
|
||||
using GFramework.Core.Ioc;
|
||||
using GFramework.Core.Logging;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
using GFramework.Cqrs.Tests.Logging;
|
||||
|
||||
namespace GFramework.Core.Tests.Cqrs;
|
||||
namespace GFramework.Cqrs.Tests.Cqrs;
|
||||
|
||||
/// <summary>
|
||||
/// 验证 CQRS 处理器自动注册在顺序与容错层面的可观察行为。
|
||||
|
||||
@ -4,8 +4,9 @@ using GFramework.Core.Abstractions.Logging;
|
||||
using GFramework.Core.Architectures;
|
||||
using GFramework.Core.Ioc;
|
||||
using GFramework.Core.Logging;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
namespace GFramework.Core.Tests;
|
||||
namespace GFramework.Cqrs.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// 为测试项目提供对 CQRS 处理器真实注册入口的受控访问。
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Core.Architectures;
|
||||
using GFramework.Core.Ioc;
|
||||
using GFramework.Core.Logging;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
|
||||
namespace GFramework.Core.Tests.Mediator;
|
||||
namespace GFramework.Cqrs.Tests.Mediator;
|
||||
|
||||
/// <summary>
|
||||
/// Mediator高级特性专项测试
|
||||
@ -12,10 +12,6 @@ namespace GFramework.Core.Tests.Mediator;
|
||||
[TestFixture]
|
||||
public class MediatorAdvancedFeaturesTests
|
||||
{
|
||||
private MicrosoftDiContainer? _container;
|
||||
|
||||
private ArchitectureContext? _context;
|
||||
|
||||
[SetUp]
|
||||
public void SetUp()
|
||||
{
|
||||
@ -44,6 +40,10 @@ public class MediatorAdvancedFeaturesTests
|
||||
_container = null;
|
||||
}
|
||||
|
||||
private MicrosoftDiContainer? _container;
|
||||
|
||||
private ArchitectureContext? _context;
|
||||
|
||||
|
||||
[Test]
|
||||
public async Task Request_With_Validation_Behavior_Should_Validate_Input()
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
using GFramework.Core.Abstractions.Architectures;
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Core.Architectures;
|
||||
using GFramework.Core.Command;
|
||||
using GFramework.Core.Ioc;
|
||||
using GFramework.Core.Logging;
|
||||
using GFramework.Core.Rule;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
using ICommand = GFramework.Core.Abstractions.Command.ICommand;
|
||||
|
||||
namespace GFramework.Core.Tests.Mediator;
|
||||
namespace GFramework.Cqrs.Tests.Mediator;
|
||||
|
||||
/// <summary>
|
||||
/// Mediator与架构上下文集成测试
|
||||
@ -16,11 +16,6 @@ namespace GFramework.Core.Tests.Mediator;
|
||||
[TestFixture]
|
||||
public class MediatorArchitectureIntegrationTests
|
||||
{
|
||||
private CommandExecutor? _commandBus;
|
||||
private MicrosoftDiContainer? _container;
|
||||
|
||||
private ArchitectureContext? _context;
|
||||
|
||||
[SetUp]
|
||||
public void SetUp()
|
||||
{
|
||||
@ -54,6 +49,11 @@ public class MediatorArchitectureIntegrationTests
|
||||
_commandBus = null;
|
||||
}
|
||||
|
||||
private CommandExecutor? _commandBus;
|
||||
private MicrosoftDiContainer? _container;
|
||||
|
||||
private ArchitectureContext? _context;
|
||||
|
||||
[Test]
|
||||
public async Task Handler_Can_Access_Architecture_Context()
|
||||
{
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using GFramework.Core.Abstractions.Architectures;
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Core.Abstractions.Events;
|
||||
using GFramework.Core.Architectures;
|
||||
using GFramework.Core.Command;
|
||||
@ -8,23 +7,14 @@ using GFramework.Core.Events;
|
||||
using GFramework.Core.Ioc;
|
||||
using GFramework.Core.Logging;
|
||||
using GFramework.Core.Query;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
using ICommand = GFramework.Core.Abstractions.Command.ICommand;
|
||||
using Unit = GFramework.Core.Abstractions.Cqrs.Unit;
|
||||
|
||||
namespace GFramework.Core.Tests.Mediator;
|
||||
namespace GFramework.Cqrs.Tests.Mediator;
|
||||
|
||||
[TestFixture]
|
||||
public class MediatorComprehensiveTests
|
||||
{
|
||||
private AsyncQueryExecutor? _asyncQueryBus;
|
||||
private CommandExecutor? _commandBus;
|
||||
private MicrosoftDiContainer? _container;
|
||||
|
||||
private ArchitectureContext? _context;
|
||||
private DefaultEnvironment? _environment;
|
||||
private EventBus? _eventBus;
|
||||
private QueryExecutor? _queryBus;
|
||||
|
||||
/// <summary>
|
||||
/// 测试初始化方法,在每个测试方法执行前运行。
|
||||
/// 负责初始化日志工厂、依赖注入容器、自有 CQRS 处理器以及各种总线服务。
|
||||
@ -79,6 +69,15 @@ public class MediatorComprehensiveTests
|
||||
_environment = null;
|
||||
}
|
||||
|
||||
private AsyncQueryExecutor? _asyncQueryBus;
|
||||
private CommandExecutor? _commandBus;
|
||||
private MicrosoftDiContainer? _container;
|
||||
|
||||
private ArchitectureContext? _context;
|
||||
private DefaultEnvironment? _environment;
|
||||
private EventBus? _eventBus;
|
||||
private QueryExecutor? _queryBus;
|
||||
|
||||
/// <summary>
|
||||
/// 测试SendRequestAsync方法在请求有效时返回结果
|
||||
/// </summary>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.Godot.SourceGenerators.Abstractions;
|
||||
namespace GFramework.Godot.SourceGenerators.Abstractions.UI;
|
||||
|
||||
/// <summary>
|
||||
/// 标记类型允许为带映射特性的导出集合生成批量注册代码。
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.Godot.SourceGenerators.Abstractions;
|
||||
namespace GFramework.Godot.SourceGenerators.Abstractions.UI;
|
||||
|
||||
/// <summary>
|
||||
/// 标记场景根节点类型,Source Generator 会生成场景行为样板代码。
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.Godot.SourceGenerators.Abstractions;
|
||||
namespace GFramework.Godot.SourceGenerators.Abstractions.UI;
|
||||
|
||||
/// <summary>
|
||||
/// 标记 UI 页面类型,Source Generator 会生成页面行为样板代码。
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace GFramework.Godot.SourceGenerators.Abstractions;
|
||||
namespace GFramework.Godot.SourceGenerators.Abstractions.UI;
|
||||
|
||||
/// <summary>
|
||||
/// 声明导出集合应当转发到哪个注册器成员及其方法。
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
using GFramework.Core.Abstractions.Cqrs;
|
||||
using GFramework.Core.Abstractions.Cqrs.Command;
|
||||
using GFramework.Core.Abstractions.Cqrs.Query;
|
||||
using GFramework.Core.Abstractions.Rule;
|
||||
using GFramework.Core.Abstractions.Rule;
|
||||
using GFramework.Core.Coroutine;
|
||||
using GFramework.Core.Coroutine.Extensions;
|
||||
using GFramework.Core.Cqrs.Extensions;
|
||||
using GFramework.Core.Extensions;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Command;
|
||||
using GFramework.Cqrs.Abstractions.Cqrs.Query;
|
||||
|
||||
namespace GFramework.Godot.Coroutine;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user