mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
- 将架构相关接口从 GFramework.Core 迁移至 GFramework.Core.Abstractions 项目 - 更新项目引用配置,添加对抽象层项目的项目引用 - 修正命名空间引用,使用新的抽象层命名空间 - 调整类型定义,将 List<T> 替换为更通用的 IList<T> 接口 - 修复控制器接口命名空间错误 - 添加必要的 using 语句以支持新的抽象层引用
29 lines
869 B
C#
29 lines
869 B
C#
using Microsoft.CodeAnalysis;
|
|
|
|
namespace GFramework.SourceGenerators.Common.diagnostics;
|
|
|
|
/// <summary>
|
|
/// 提供通用诊断描述符的静态类
|
|
/// </summary>
|
|
public static class CommonDiagnostics
|
|
{
|
|
/// <summary>
|
|
/// 定义类必须为partial的诊断描述符
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// 诊断ID: GF001
|
|
/// 诊断消息: "Class '{0}' must be declared partial for code generation"
|
|
/// 分类: GFramework.Common
|
|
/// 严重性: Error
|
|
/// 是否启用: true
|
|
/// </remarks>
|
|
public static readonly DiagnosticDescriptor ClassMustBePartial =
|
|
new(
|
|
"GF_Common_Class_001",
|
|
"Class must be partial",
|
|
"Class '{0}' must be declared partial for code generation",
|
|
"GFramework.Common",
|
|
DiagnosticSeverity.Error,
|
|
isEnabledByDefault: true
|
|
);
|
|
} |