框架更新
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
namespace Fantasy.SourceGenerator.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Source Generator 使用的常量定义
|
||||
/// </summary>
|
||||
internal static class GeneratorConstants
|
||||
{
|
||||
/// <summary>
|
||||
/// 生成文件的命名空间
|
||||
/// </summary>
|
||||
public const string GeneratedNamespace = "Fantasy.Generated";
|
||||
/// <summary>
|
||||
/// 诊断 ID 前缀
|
||||
/// </summary>
|
||||
public const string DiagnosticIdPrefix = "FANTASY";
|
||||
/// <summary>
|
||||
/// 生成的代码文件注释头
|
||||
/// </summary>
|
||||
public const string AutoGeneratedHeader = @"//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Fantasy.SourceGenerator.
|
||||
// Runtime Version: 1.0.0
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#nullable enable
|
||||
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
|
||||
// ReSharper disable ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
|
||||
// ReSharper disable MergeIntoPattern
|
||||
// ReSharper disable SuspiciousTypeConversion.Global
|
||||
// ReSharper disable NullCoalescingConditionIsAlwaysNotNullAccordingToAPIContract
|
||||
// ReSharper disable CheckNamespace
|
||||
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
|
||||
#pragma warning disable CS8603 // Possible null reference return.
|
||||
#pragma warning disable CS8602 // Dereference of a possibly null reference.
|
||||
#pragma warning disable CS8600 // Converting null literal or possible null value to non-nullable type.
|
||||
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
||||
";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user