mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-07 08:44:29 +08:00
- 新增 CQRS 架构模式详细文档,包括命令查询职责分离核心概念 - 添加命令、查询、处理器、请求分发器等基本用法示例 - 包含高级用法如通知、管道行为、流式处理等完整功能介绍 - 提供最佳实践指南和常见问题解决方案 - 添加游戏内容配置系统文档,涵盖 YAML 配置源文件和 JSON Schema 结构描述 - 包含推荐目录结构、Schema 示例和 YAML 示例配置 - 提供完整的接入模板,包括 csproj 配置、启动帮助器和运行时读取模板 - 添加 Godot 文本配置桥接、热重载和 Architecture 接入等高级功能说明
45 lines
1.8 KiB
C#
45 lines
1.8 KiB
C#
using GFramework.SourceGenerators.Common.Constants;
|
|
|
|
namespace GFramework.Core.SourceGenerators.Diagnostics;
|
|
|
|
/// <summary>
|
|
/// 提供 Context Get 注册可见性分析相关诊断。
|
|
/// </summary>
|
|
public static class ContextRegistrationDiagnostics
|
|
{
|
|
private const string SourceGeneratorsRuleCategory = $"{PathContests.SourceGeneratorsPath}.Rule";
|
|
|
|
/// <summary>
|
|
/// 当模型使用点在所属架构中找不到静态可见注册时报告。
|
|
/// </summary>
|
|
public static readonly DiagnosticDescriptor ModelRegistrationMissing = new(
|
|
"GF_ContextRegistration_001",
|
|
"Model usage has no statically discoverable registration",
|
|
"Model '{0}' used by '{1}' is not statically registered in architecture '{2}'",
|
|
SourceGeneratorsRuleCategory,
|
|
DiagnosticSeverity.Warning,
|
|
true);
|
|
|
|
/// <summary>
|
|
/// 当系统使用点在所属架构中找不到静态可见注册时报告。
|
|
/// </summary>
|
|
public static readonly DiagnosticDescriptor SystemRegistrationMissing = new(
|
|
"GF_ContextRegistration_002",
|
|
"System usage has no statically discoverable registration",
|
|
"System '{0}' used by '{1}' is not statically registered in architecture '{2}'",
|
|
SourceGeneratorsRuleCategory,
|
|
DiagnosticSeverity.Warning,
|
|
true);
|
|
|
|
/// <summary>
|
|
/// 当工具使用点在所属架构中找不到静态可见注册时报告。
|
|
/// </summary>
|
|
public static readonly DiagnosticDescriptor UtilityRegistrationMissing = new(
|
|
"GF_ContextRegistration_003",
|
|
"Utility usage has no statically discoverable registration",
|
|
"Utility '{0}' used by '{1}' is not statically registered in architecture '{2}'",
|
|
SourceGeneratorsRuleCategory,
|
|
DiagnosticSeverity.Warning,
|
|
true);
|
|
}
|