mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-07 00:39:00 +08:00
- 新增 CQRS 核心概念、命令查询处理器实现指南 - 添加 CQRS 高级用法包括通知发布、管道行为和流式处理 - 提供 CQRS 最佳实践和常见问题解决方案 - 添加游戏配置系统完整接入模板和运行时读取示例 - 包含 YAML 配置文件和 JSON Schema 结构定义说明 - 提供 Godot 引擎配置桥接和热重载功能使用指南 - 添加架构模块集成和生成查询辅助功能文档
49 lines
1.9 KiB
C#
49 lines
1.9 KiB
C#
using GFramework.SourceGenerators.Common.Constants;
|
|
|
|
namespace GFramework.SourceGenerators.Diagnostics;
|
|
|
|
internal static class AutoRegisterModuleDiagnostics
|
|
{
|
|
private const string Category = $"{PathContests.SourceGeneratorsPath}.Architecture";
|
|
|
|
public static readonly DiagnosticDescriptor NestedClassNotSupported = new(
|
|
"GF_AutoModule_001",
|
|
"AutoRegisterModule does not support nested classes",
|
|
"AutoRegisterModule does not support nested class '{0}'",
|
|
Category,
|
|
DiagnosticSeverity.Error,
|
|
true);
|
|
|
|
public static readonly DiagnosticDescriptor RegistrationTypeRequired = new(
|
|
"GF_AutoModule_002",
|
|
"Registration attribute requires a concrete type",
|
|
"Attribute '{0}' on '{1}' requires a concrete type argument",
|
|
Category,
|
|
DiagnosticSeverity.Error,
|
|
true);
|
|
|
|
public static readonly DiagnosticDescriptor RegistrationTypeMustImplementExpectedInterface = new(
|
|
"GF_AutoModule_003",
|
|
"Registration type does not implement the expected interface",
|
|
"Type '{0}' used by '{1}' must implement '{2}'",
|
|
Category,
|
|
DiagnosticSeverity.Error,
|
|
true);
|
|
|
|
public static readonly DiagnosticDescriptor RegistrationTypeMustHaveParameterlessConstructor = new(
|
|
"GF_AutoModule_004",
|
|
"Registration type must have an accessible parameterless constructor",
|
|
"Type '{0}' used by '{1}' must have an accessible parameterless constructor",
|
|
Category,
|
|
DiagnosticSeverity.Error,
|
|
true);
|
|
|
|
public static readonly DiagnosticDescriptor InstallMethodConflict = new(
|
|
"GF_AutoModule_005",
|
|
"Install method conflicts with generated code",
|
|
"Class '{0}' already defines 'Install(IArchitecture)', which conflicts with AutoRegisterModule generated code",
|
|
Category,
|
|
DiagnosticSeverity.Error,
|
|
true);
|
|
}
|