diff --git a/GFramework.SourceGenerators.Common/Constants/PathContests.cs b/GFramework.SourceGenerators.Common/Constants/PathContests.cs
index a9416fbe..cae0748c 100644
--- a/GFramework.SourceGenerators.Common/Constants/PathContests.cs
+++ b/GFramework.SourceGenerators.Common/Constants/PathContests.cs
@@ -39,7 +39,7 @@ public static class PathContests
///
/// GFramework源代码生成器抽象层命名空间
///
- public const string SourceGeneratorsAbstractionsPath = $"{BaseNamespace}.SourceGenerators.Abstractions";
+ public const string SourceGeneratorsAbstractionsPath = $"{CoreNamespace}.SourceGenerators.Abstractions";
///
/// GFramework Godot源代码生成器抽象层命名空间
diff --git a/GFramework.SourceGenerators.Tests/Analyzers/ContextRegistrationAnalyzerTests.cs b/GFramework.SourceGenerators.Tests/Analyzers/ContextRegistrationAnalyzerTests.cs
index abcb4ccf..20d25f24 100644
--- a/GFramework.SourceGenerators.Tests/Analyzers/ContextRegistrationAnalyzerTests.cs
+++ b/GFramework.SourceGenerators.Tests/Analyzers/ContextRegistrationAnalyzerTests.cs
@@ -121,7 +121,7 @@ public sealed class ContextRegistrationAnalyzerTests
}
}
- namespace GFramework.SourceGenerators.Abstractions.Rule
+ namespace GFramework.Core.SourceGenerators.Abstractions.Rule
{
public sealed class GetModelAttribute : Attribute { }
public sealed class GetModelsAttribute : Attribute { }
@@ -142,7 +142,7 @@ public sealed class ContextRegistrationAnalyzerTests
using GFramework.Core.Abstractions.Model;
using GFramework.Core.Abstractions.Systems;
using GFramework.Core.Architectures;
- using GFramework.SourceGenerators.Abstractions.Rule;
+ using GFramework.Core.SourceGenerators.Abstractions.Rule;
public interface IInventoryModel : IModel { }
@@ -180,7 +180,7 @@ public sealed class ContextRegistrationAnalyzerTests
using GFramework.Core.Abstractions.Model;
using GFramework.Core.Abstractions.Systems;
using GFramework.Core.Architectures;
- using GFramework.SourceGenerators.Abstractions.Rule;
+ using GFramework.Core.SourceGenerators.Abstractions.Rule;
public interface IInventoryModel : IModel { }
@@ -255,7 +255,7 @@ public sealed class ContextRegistrationAnalyzerTests
using GFramework.Core.Abstractions.Model;
using GFramework.Core.Abstractions.Systems;
using GFramework.Core.Architectures;
- using GFramework.SourceGenerators.Abstractions.Rule;
+ using GFramework.Core.SourceGenerators.Abstractions.Rule;
public interface IInventoryModel : IModel { }
@@ -297,7 +297,7 @@ public sealed class ContextRegistrationAnalyzerTests
using GFramework.Core.Abstractions.Model;
using GFramework.Core.Abstractions.Systems;
using GFramework.Core.Architectures;
- using GFramework.SourceGenerators.Abstractions.Rule;
+ using GFramework.Core.SourceGenerators.Abstractions.Rule;
public interface IInventoryModel : IModel { }
@@ -337,7 +337,7 @@ public sealed class ContextRegistrationAnalyzerTests
using GFramework.Core.Abstractions.Systems;
using GFramework.Core.Abstractions.Utility;
using GFramework.Core.Architectures;
- using GFramework.SourceGenerators.Abstractions.Rule;
+ using GFramework.Core.SourceGenerators.Abstractions.Rule;
public interface IInventoryUtility : IUtility { }
@@ -376,7 +376,7 @@ public sealed class ContextRegistrationAnalyzerTests
using GFramework.Core.Abstractions.Model;
using GFramework.Core.Abstractions.Systems;
using GFramework.Core.Architectures;
- using GFramework.SourceGenerators.Abstractions.Rule;
+ using GFramework.Core.SourceGenerators.Abstractions.Rule;
public interface IInventoryModel : IModel { }
@@ -423,7 +423,7 @@ public sealed class ContextRegistrationAnalyzerTests
using GFramework.Core.Abstractions.Model;
using GFramework.Core.Abstractions.Systems;
using GFramework.Core.Architectures;
- using GFramework.SourceGenerators.Abstractions.Rule;
+ using GFramework.Core.SourceGenerators.Abstractions.Rule;
public interface IInventoryModel : IModel { }
@@ -477,7 +477,7 @@ public sealed class ContextRegistrationAnalyzerTests
using GFramework.Core.Abstractions.Model;
using GFramework.Core.Abstractions.Systems;
using GFramework.Core.Architectures;
- using GFramework.SourceGenerators.Abstractions.Rule;
+ using GFramework.Core.SourceGenerators.Abstractions.Rule;
public interface IInventoryModel : IModel { }
@@ -532,7 +532,7 @@ public sealed class ContextRegistrationAnalyzerTests
using GFramework.Core.Abstractions.Model;
using GFramework.Core.Abstractions.Systems;
using GFramework.Core.Architectures;
- using GFramework.SourceGenerators.Abstractions.Rule;
+ using GFramework.Core.SourceGenerators.Abstractions.Rule;
public interface IInventoryModel : IModel { }
diff --git a/GFramework.SourceGenerators.Tests/Architectures/AutoRegisterModuleGeneratorTests.cs b/GFramework.SourceGenerators.Tests/Architectures/AutoRegisterModuleGeneratorTests.cs
index ae44a8ed..5eafa7c2 100644
--- a/GFramework.SourceGenerators.Tests/Architectures/AutoRegisterModuleGeneratorTests.cs
+++ b/GFramework.SourceGenerators.Tests/Architectures/AutoRegisterModuleGeneratorTests.cs
@@ -14,9 +14,9 @@ public class AutoRegisterModuleGeneratorTests
{
const string source = """
using System;
- using GFramework.SourceGenerators.Abstractions.Architectures;
+ using GFramework.Core.SourceGenerators.Abstractions.Architectures;
- namespace GFramework.SourceGenerators.Abstractions.Architectures
+ namespace GFramework.Core.SourceGenerators.Abstractions.Architectures
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
public sealed class AutoRegisterModuleAttribute : Attribute { }
@@ -70,7 +70,7 @@ public class AutoRegisterModuleGeneratorTests
using GFramework.Core.Abstractions.Model;
using GFramework.Core.Abstractions.Systems;
using GFramework.Core.Abstractions.Utility;
- using GFramework.SourceGenerators.Abstractions.Architectures;
+ using GFramework.Core.SourceGenerators.Abstractions.Architectures;
public sealed class PlayerModel : IModel { }
public sealed class CombatSystem : ISystem { }
@@ -118,7 +118,7 @@ public class AutoRegisterModuleGeneratorTests
const string commonSource = """
using System;
- namespace GFramework.SourceGenerators.Abstractions.Architectures
+ namespace GFramework.Core.SourceGenerators.Abstractions.Architectures
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
public sealed class AutoRegisterModuleAttribute : Attribute { }
@@ -182,7 +182,7 @@ public class AutoRegisterModuleGeneratorTests
const string partASource = """
namespace TestApp
{
- using GFramework.SourceGenerators.Abstractions.Architectures;
+ using GFramework.Core.SourceGenerators.Abstractions.Architectures;
// Padding ensures this attribute lives later in the file than the attributes in PartB.
// The generator should still place it first because PartA sorts before PartB.
@@ -207,7 +207,7 @@ public class AutoRegisterModuleGeneratorTests
const string partBSource = """
namespace TestApp
{
- using GFramework.SourceGenerators.Abstractions.Architectures;
+ using GFramework.Core.SourceGenerators.Abstractions.Architectures;
[RegisterSystem(typeof(CombatSystem))]
[RegisterModel(typeof(PlayerModel))]
@@ -266,9 +266,9 @@ public class AutoRegisterModuleGeneratorTests
const string source = """
#nullable enable
using System;
- using GFramework.SourceGenerators.Abstractions.Architectures;
+ using GFramework.Core.SourceGenerators.Abstractions.Architectures;
- namespace GFramework.SourceGenerators.Abstractions.Architectures
+ namespace GFramework.Core.SourceGenerators.Abstractions.Architectures
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
public sealed class AutoRegisterModuleAttribute : Attribute { }
@@ -320,7 +320,7 @@ public class AutoRegisterModuleGeneratorTests
namespace TestApp
{
using GFramework.Core.Abstractions.Model;
- using GFramework.SourceGenerators.Abstractions.Architectures;
+ using GFramework.Core.SourceGenerators.Abstractions.Architectures;
public sealed class PlayerModel : IModel { }
diff --git a/GFramework.SourceGenerators.Tests/Bases/PriorityGeneratorSnapshotTests.cs b/GFramework.SourceGenerators.Tests/Bases/PriorityGeneratorSnapshotTests.cs
index bb29762a..79da21bb 100644
--- a/GFramework.SourceGenerators.Tests/Bases/PriorityGeneratorSnapshotTests.cs
+++ b/GFramework.SourceGenerators.Tests/Bases/PriorityGeneratorSnapshotTests.cs
@@ -19,7 +19,7 @@ public class PriorityGeneratorSnapshotTests
const string source = """
using System;
- namespace GFramework.SourceGenerators.Abstractions.Bases
+ namespace GFramework.Core.SourceGenerators.Abstractions.Bases
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
public sealed class PriorityAttribute : Attribute
@@ -39,7 +39,7 @@ public class PriorityGeneratorSnapshotTests
namespace TestApp
{
- using GFramework.SourceGenerators.Abstractions.Bases;
+ using GFramework.Core.SourceGenerators.Abstractions.Bases;
[Priority(10)]
public partial class MySystem
@@ -67,7 +67,7 @@ public class PriorityGeneratorSnapshotTests
const string source = """
using System;
- namespace GFramework.SourceGenerators.Abstractions.Bases
+ namespace GFramework.Core.SourceGenerators.Abstractions.Bases
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
public sealed class PriorityAttribute : Attribute
@@ -87,7 +87,7 @@ public class PriorityGeneratorSnapshotTests
namespace TestApp
{
- using GFramework.SourceGenerators.Abstractions.Bases;
+ using GFramework.Core.SourceGenerators.Abstractions.Bases;
[Priority(-100)]
public partial class CriticalSystem
@@ -115,7 +115,7 @@ public class PriorityGeneratorSnapshotTests
const string source = """
using System;
- namespace GFramework.SourceGenerators.Abstractions.Bases
+ namespace GFramework.Core.SourceGenerators.Abstractions.Bases
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
public sealed class PriorityAttribute : Attribute
@@ -144,7 +144,7 @@ public class PriorityGeneratorSnapshotTests
namespace TestApp
{
- using GFramework.SourceGenerators.Abstractions.Bases;
+ using GFramework.Core.SourceGenerators.Abstractions.Bases;
using GFramework.Core.Abstractions.Bases;
[Priority(PriorityGroup.High)]
@@ -173,7 +173,7 @@ public class PriorityGeneratorSnapshotTests
const string source = """
using System;
- namespace GFramework.SourceGenerators.Abstractions.Bases
+ namespace GFramework.Core.SourceGenerators.Abstractions.Bases
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
public sealed class PriorityAttribute : Attribute
@@ -193,7 +193,7 @@ public class PriorityGeneratorSnapshotTests
namespace TestApp
{
- using GFramework.SourceGenerators.Abstractions.Bases;
+ using GFramework.Core.SourceGenerators.Abstractions.Bases;
[Priority(20)]
public partial class GenericSystem
diff --git a/GFramework.SourceGenerators.Tests/Enums/EnumExtensionsGeneratorSnapshotTests.cs b/GFramework.SourceGenerators.Tests/Enums/EnumExtensionsGeneratorSnapshotTests.cs
index f9ddf5c0..e70b4020 100644
--- a/GFramework.SourceGenerators.Tests/Enums/EnumExtensionsGeneratorSnapshotTests.cs
+++ b/GFramework.SourceGenerators.Tests/Enums/EnumExtensionsGeneratorSnapshotTests.cs
@@ -13,7 +13,7 @@ public class EnumExtensionsGeneratorSnapshotTests
const string source = """
using System;
- namespace GFramework.SourceGenerators.Abstractions.Enums
+ namespace GFramework.Core.SourceGenerators.Abstractions.Enums
{
[AttributeUsage(AttributeTargets.Enum)]
public sealed class GenerateEnumExtensionsAttribute : Attribute
@@ -25,7 +25,7 @@ public class EnumExtensionsGeneratorSnapshotTests
namespace TestApp
{
- using GFramework.SourceGenerators.Abstractions.Enums;
+ using GFramework.Core.SourceGenerators.Abstractions.Enums;
[GenerateEnumExtensions]
public enum Status
@@ -53,7 +53,7 @@ public class EnumExtensionsGeneratorSnapshotTests
const string source = """
using System;
- namespace GFramework.SourceGenerators.Abstractions.Enums
+ namespace GFramework.Core.SourceGenerators.Abstractions.Enums
{
[AttributeUsage(AttributeTargets.Enum)]
public sealed class GenerateEnumExtensionsAttribute : Attribute
@@ -65,7 +65,7 @@ public class EnumExtensionsGeneratorSnapshotTests
namespace TestApp
{
- using GFramework.SourceGenerators.Abstractions.Enums;
+ using GFramework.Core.SourceGenerators.Abstractions.Enums;
[GenerateEnumExtensions]
public enum Status
@@ -92,7 +92,7 @@ public class EnumExtensionsGeneratorSnapshotTests
const string source = """
using System;
- namespace GFramework.SourceGenerators.Abstractions.Enums
+ namespace GFramework.Core.SourceGenerators.Abstractions.Enums
{
[AttributeUsage(AttributeTargets.Enum)]
public sealed class GenerateEnumExtensionsAttribute : Attribute
@@ -104,7 +104,7 @@ public class EnumExtensionsGeneratorSnapshotTests
namespace TestApp
{
- using GFramework.SourceGenerators.Abstractions.Enums;
+ using GFramework.Core.SourceGenerators.Abstractions.Enums;
[GenerateEnumExtensions]
[Flags]
@@ -134,7 +134,7 @@ public class EnumExtensionsGeneratorSnapshotTests
const string source = """
using System;
- namespace GFramework.SourceGenerators.Abstractions.Enums
+ namespace GFramework.Core.SourceGenerators.Abstractions.Enums
{
[AttributeUsage(AttributeTargets.Enum)]
public sealed class GenerateEnumExtensionsAttribute : Attribute
@@ -146,7 +146,7 @@ public class EnumExtensionsGeneratorSnapshotTests
namespace TestApp
{
- using GFramework.SourceGenerators.Abstractions.Enums;
+ using GFramework.Core.SourceGenerators.Abstractions.Enums;
[GenerateEnumExtensions(GenerateIsMethods = false)]
public enum Status
@@ -173,7 +173,7 @@ public class EnumExtensionsGeneratorSnapshotTests
const string source = """
using System;
- namespace GFramework.SourceGenerators.Abstractions.Enums
+ namespace GFramework.Core.SourceGenerators.Abstractions.Enums
{
[AttributeUsage(AttributeTargets.Enum)]
public sealed class GenerateEnumExtensionsAttribute : Attribute
@@ -185,7 +185,7 @@ public class EnumExtensionsGeneratorSnapshotTests
namespace TestApp
{
- using GFramework.SourceGenerators.Abstractions.Enums;
+ using GFramework.Core.SourceGenerators.Abstractions.Enums;
[GenerateEnumExtensions(GenerateIsInMethod = false)]
public enum Status
diff --git a/GFramework.SourceGenerators.Tests/Logging/LoggerGeneratorSnapshotTests.cs b/GFramework.SourceGenerators.Tests/Logging/LoggerGeneratorSnapshotTests.cs
index e1263a0f..07bb60a2 100644
--- a/GFramework.SourceGenerators.Tests/Logging/LoggerGeneratorSnapshotTests.cs
+++ b/GFramework.SourceGenerators.Tests/Logging/LoggerGeneratorSnapshotTests.cs
@@ -13,7 +13,7 @@ public class LoggerGeneratorSnapshotTests
const string source = """
using System;
- namespace GFramework.SourceGenerators.Abstractions.Logging
+ namespace GFramework.Core.SourceGenerators.Abstractions.Logging
{
[AttributeUsage(AttributeTargets.Class)]
public sealed class LogAttribute : Attribute
@@ -85,7 +85,7 @@ public class LoggerGeneratorSnapshotTests
namespace TestApp
{
- using GFramework.SourceGenerators.Abstractions.Logging;
+ using GFramework.Core.SourceGenerators.Abstractions.Logging;
[Log]
public partial class MyService
@@ -110,7 +110,7 @@ public class LoggerGeneratorSnapshotTests
const string source = """
using System;
- namespace GFramework.SourceGenerators.Abstractions.Logging
+ namespace GFramework.Core.SourceGenerators.Abstractions.Logging
{
[AttributeUsage(AttributeTargets.Class)]
public sealed class LogAttribute : Attribute
@@ -182,7 +182,7 @@ public class LoggerGeneratorSnapshotTests
namespace TestApp
{
- using GFramework.SourceGenerators.Abstractions.Logging;
+ using GFramework.Core.SourceGenerators.Abstractions.Logging;
[Log(Name = "CustomLogger")]
public partial class MyService
@@ -207,7 +207,7 @@ public class LoggerGeneratorSnapshotTests
const string source = """
using System;
- namespace GFramework.SourceGenerators.Abstractions.Logging
+ namespace GFramework.Core.SourceGenerators.Abstractions.Logging
{
[AttributeUsage(AttributeTargets.Class)]
public sealed class LogAttribute : Attribute
@@ -279,7 +279,7 @@ public class LoggerGeneratorSnapshotTests
namespace TestApp
{
- using GFramework.SourceGenerators.Abstractions.Logging;
+ using GFramework.Core.SourceGenerators.Abstractions.Logging;
[Log(FieldName = "MyLogger")]
public partial class MyService
@@ -304,7 +304,7 @@ public class LoggerGeneratorSnapshotTests
const string source = """
using System;
- namespace GFramework.SourceGenerators.Abstractions.Logging
+ namespace GFramework.Core.SourceGenerators.Abstractions.Logging
{
[AttributeUsage(AttributeTargets.Class)]
public sealed class LogAttribute : Attribute
@@ -376,7 +376,7 @@ public class LoggerGeneratorSnapshotTests
namespace TestApp
{
- using GFramework.SourceGenerators.Abstractions.Logging;
+ using GFramework.Core.SourceGenerators.Abstractions.Logging;
[Log(IsStatic = false)]
public partial class MyService
@@ -401,7 +401,7 @@ public class LoggerGeneratorSnapshotTests
const string source = """
using System;
- namespace GFramework.SourceGenerators.Abstractions.Logging
+ namespace GFramework.Core.SourceGenerators.Abstractions.Logging
{
[AttributeUsage(AttributeTargets.Class)]
public sealed class LogAttribute : Attribute
@@ -473,7 +473,7 @@ public class LoggerGeneratorSnapshotTests
namespace TestApp
{
- using GFramework.SourceGenerators.Abstractions.Logging;
+ using GFramework.Core.SourceGenerators.Abstractions.Logging;
[Log(AccessModifier = "public")]
public partial class MyService
@@ -498,7 +498,7 @@ public class LoggerGeneratorSnapshotTests
const string source = """
using System;
- namespace GFramework.SourceGenerators.Abstractions.Logging
+ namespace GFramework.Core.SourceGenerators.Abstractions.Logging
{
[AttributeUsage(AttributeTargets.Class)]
public sealed class LogAttribute : Attribute
@@ -570,7 +570,7 @@ public class LoggerGeneratorSnapshotTests
namespace TestApp
{
- using GFramework.SourceGenerators.Abstractions.Logging;
+ using GFramework.Core.SourceGenerators.Abstractions.Logging;
[Log]
public partial class MyService
diff --git a/GFramework.SourceGenerators.Tests/Rule/ContextAwareGeneratorSnapshotTests.cs b/GFramework.SourceGenerators.Tests/Rule/ContextAwareGeneratorSnapshotTests.cs
index 415a7f09..e7b352bf 100644
--- a/GFramework.SourceGenerators.Tests/Rule/ContextAwareGeneratorSnapshotTests.cs
+++ b/GFramework.SourceGenerators.Tests/Rule/ContextAwareGeneratorSnapshotTests.cs
@@ -23,7 +23,7 @@ public class ContextAwareGeneratorSnapshotTests
const string source = """
using System;
- namespace GFramework.SourceGenerators.Abstractions.Rule
+ namespace GFramework.Core.SourceGenerators.Abstractions.Rule
{
[AttributeUsage(AttributeTargets.Class)]
public sealed class ContextAwareAttribute : Attribute { }
@@ -73,7 +73,7 @@ public class ContextAwareGeneratorSnapshotTests
namespace TestApp
{
- using GFramework.SourceGenerators.Abstractions.Rule;
+ using GFramework.Core.SourceGenerators.Abstractions.Rule;
using GFramework.Core.Abstractions.Rule;
[ContextAware]
diff --git a/GFramework.SourceGenerators.Tests/Rule/ContextGetGeneratorTests.cs b/GFramework.SourceGenerators.Tests/Rule/ContextGetGeneratorTests.cs
index d16806e6..bae2d00c 100644
--- a/GFramework.SourceGenerators.Tests/Rule/ContextGetGeneratorTests.cs
+++ b/GFramework.SourceGenerators.Tests/Rule/ContextGetGeneratorTests.cs
@@ -12,9 +12,9 @@ public class ContextGetGeneratorTests
var source = """
using System;
using System.Collections.Generic;
- using GFramework.SourceGenerators.Abstractions.Rule;
+ using GFramework.Core.SourceGenerators.Abstractions.Rule;
- namespace GFramework.SourceGenerators.Abstractions.Rule
+ namespace GFramework.Core.SourceGenerators.Abstractions.Rule
{
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public sealed class ContextAwareAttribute : Attribute { }
@@ -102,9 +102,9 @@ public class ContextGetGeneratorTests
{
var source = """
using System;
- using GFramework.SourceGenerators.Abstractions.Rule;
+ using GFramework.Core.SourceGenerators.Abstractions.Rule;
- namespace GFramework.SourceGenerators.Abstractions.Rule
+ namespace GFramework.Core.SourceGenerators.Abstractions.Rule
{
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public sealed class ContextAwareAttribute : Attribute { }
@@ -148,7 +148,7 @@ public class ContextGetGeneratorTests
[ContextAware]
public partial class InventoryPanel
{
- [global::GFramework.SourceGenerators.Abstractions.Rule.GetModel]
+ [global::GFramework.Core.SourceGenerators.Abstractions.Rule.GetModel]
private IInventoryModel _model = null!;
}
}
@@ -184,9 +184,9 @@ public class ContextGetGeneratorTests
var source = """
using System;
using System.Collections.Generic;
- using GFramework.SourceGenerators.Abstractions.Rule;
+ using GFramework.Core.SourceGenerators.Abstractions.Rule;
- namespace GFramework.SourceGenerators.Abstractions.Rule
+ namespace GFramework.Core.SourceGenerators.Abstractions.Rule
{
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public sealed class GetAllAttribute : Attribute { }
@@ -291,9 +291,9 @@ public class ContextGetGeneratorTests
{
var source = """
using System;
- using GFramework.SourceGenerators.Abstractions.Rule;
+ using GFramework.Core.SourceGenerators.Abstractions.Rule;
- namespace GFramework.SourceGenerators.Abstractions.Rule
+ namespace GFramework.Core.SourceGenerators.Abstractions.Rule
{
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public sealed class GetAllAttribute : Attribute { }
@@ -382,9 +382,9 @@ public class ContextGetGeneratorTests
{
var source = """
using System;
- using GFramework.SourceGenerators.Abstractions.Rule;
+ using GFramework.Core.SourceGenerators.Abstractions.Rule;
- namespace GFramework.SourceGenerators.Abstractions.Rule
+ namespace GFramework.Core.SourceGenerators.Abstractions.Rule
{
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public sealed class ContextAwareAttribute : Attribute { }
@@ -460,9 +460,9 @@ public class ContextGetGeneratorTests
{
var source = """
using System;
- using GFramework.SourceGenerators.Abstractions.Rule;
+ using GFramework.Core.SourceGenerators.Abstractions.Rule;
- namespace GFramework.SourceGenerators.Abstractions.Rule
+ namespace GFramework.Core.SourceGenerators.Abstractions.Rule
{
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public sealed class GetAllAttribute : Attribute { }
@@ -543,9 +543,9 @@ public class ContextGetGeneratorTests
{
var source = MarkupTestSource.Parse("""
using System;
- using GFramework.SourceGenerators.Abstractions.Rule;
+ using GFramework.Core.SourceGenerators.Abstractions.Rule;
- namespace GFramework.SourceGenerators.Abstractions.Rule
+ namespace GFramework.Core.SourceGenerators.Abstractions.Rule
{
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public sealed class GetAllAttribute : Attribute { }
@@ -644,9 +644,9 @@ public class ContextGetGeneratorTests
{
var source = MarkupTestSource.Parse("""
using System;
- using GFramework.SourceGenerators.Abstractions.Rule;
+ using GFramework.Core.SourceGenerators.Abstractions.Rule;
- namespace GFramework.SourceGenerators.Abstractions.Rule
+ namespace GFramework.Core.SourceGenerators.Abstractions.Rule
{
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public sealed class GetAllAttribute : Attribute { }
@@ -753,9 +753,9 @@ public class ContextGetGeneratorTests
{
var source = """
using System;
- using GFramework.SourceGenerators.Abstractions.Rule;
+ using GFramework.Core.SourceGenerators.Abstractions.Rule;
- namespace GFramework.SourceGenerators.Abstractions.Rule
+ namespace GFramework.Core.SourceGenerators.Abstractions.Rule
{
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public sealed class ContextAwareAttribute : Attribute { }
@@ -845,9 +845,9 @@ public class ContextGetGeneratorTests
{
var source = """
using System;
- using GFramework.SourceGenerators.Abstractions.Rule;
+ using GFramework.Core.SourceGenerators.Abstractions.Rule;
- namespace GFramework.SourceGenerators.Abstractions.Rule
+ namespace GFramework.Core.SourceGenerators.Abstractions.Rule
{
[AttributeUsage(AttributeTargets.Field, Inherited = false)]
public sealed class GetServiceAttribute : Attribute { }
@@ -922,9 +922,9 @@ public class ContextGetGeneratorTests
{
var source = MarkupTestSource.Parse("""
using System;
- using GFramework.SourceGenerators.Abstractions.Rule;
+ using GFramework.Core.SourceGenerators.Abstractions.Rule;
- namespace GFramework.SourceGenerators.Abstractions.Rule
+ namespace GFramework.Core.SourceGenerators.Abstractions.Rule
{
[AttributeUsage(AttributeTargets.Field, Inherited = false)]
public sealed class GetModelAttribute : Attribute { }
@@ -989,9 +989,9 @@ public class ContextGetGeneratorTests
var source = MarkupTestSource.Parse("""
using System;
using System.Collections.Generic;
- using GFramework.SourceGenerators.Abstractions.Rule;
+ using GFramework.Core.SourceGenerators.Abstractions.Rule;
- namespace GFramework.SourceGenerators.Abstractions.Rule
+ namespace GFramework.Core.SourceGenerators.Abstractions.Rule
{
[AttributeUsage(AttributeTargets.Field, Inherited = false)]
public sealed class GetModelsAttribute : Attribute { }
@@ -1060,9 +1060,9 @@ public class ContextGetGeneratorTests
{
var source = MarkupTestSource.Parse("""
using System;
- using GFramework.SourceGenerators.Abstractions.Rule;
+ using GFramework.Core.SourceGenerators.Abstractions.Rule;
- namespace GFramework.SourceGenerators.Abstractions.Rule
+ namespace GFramework.Core.SourceGenerators.Abstractions.Rule
{
[AttributeUsage(AttributeTargets.Field, Inherited = false)]
public sealed class GetModelAttribute : Attribute { }
@@ -1131,9 +1131,9 @@ public class ContextGetGeneratorTests
{
var source = MarkupTestSource.Parse("""
using System;
- using GFramework.SourceGenerators.Abstractions.Rule;
+ using GFramework.Core.SourceGenerators.Abstractions.Rule;
- namespace GFramework.SourceGenerators.Abstractions.Rule
+ namespace GFramework.Core.SourceGenerators.Abstractions.Rule
{
[AttributeUsage(AttributeTargets.Field, Inherited = false)]
public sealed class GetModelAttribute : Attribute { }
@@ -1203,9 +1203,9 @@ public class ContextGetGeneratorTests
var source = """
using System;
using System.Collections.Generic;
- using GFramework.SourceGenerators.Abstractions.Rule;
+ using GFramework.Core.SourceGenerators.Abstractions.Rule;
- namespace GFramework.SourceGenerators.Abstractions.Rule
+ namespace GFramework.Core.SourceGenerators.Abstractions.Rule
{
[AttributeUsage(AttributeTargets.Field, Inherited = false)]
public sealed class GetModelsAttribute : Attribute { }
diff --git a/docs/zh-CN/source-generators/index.md b/docs/zh-CN/source-generators/index.md
index c1d65128..1b4638d1 100644
--- a/docs/zh-CN/source-generators/index.md
+++ b/docs/zh-CN/source-generators/index.md
@@ -89,10 +89,10 @@ GFramework 的 source generators 利用 Roslyn 源代码生成器技术,在编
-
-
@@ -102,6 +102,7 @@ GFramework 的 source generators 利用 Roslyn 源代码生成器技术,在编
如果你只使用 Godot 生成器或 CQRS 处理器注册生成器,请把上面的包替换为对应的
`GeWuYou.GFramework.Godot.SourceGenerators` 或 `GeWuYou.GFramework.Cqrs.SourceGenerators`。
这些拆分包会同时带上各自需要的 abstractions 程序集,不需要再额外安装单独的 `*.Attributes` 包。
+实际接入时请替换为当前发布版本,或与项目中其余 `GeWuYou.GFramework.*` 包保持同一版本。
### Config Schema 文件约定
@@ -1235,11 +1236,14 @@ public partial class ServiceComponent : IService
```mermaid
graph TD
- A[GFramework.SourceGenerators] --> B[GFramework.Core.SourceGenerators.Abstractions]
+ A[GeWuYou.GFramework.Core.SourceGenerators] --> B[GFramework.Core.SourceGenerators.Abstractions]
A --> C[GFramework.SourceGenerators.Common]
A --> D[GFramework.Core.Abstractions]
A --> E[Microsoft.CodeAnalysis.CSharp]
A --> F[Microsoft.CodeAnalysis.Analyzers]
+ G[GeWuYou.GFramework.Game.SourceGenerators] --> C
+ H[GeWuYou.GFramework.Godot.SourceGenerators] --> C
+ I[GeWuYou.GFramework.Cqrs.SourceGenerators] --> C
```
## 版本兼容性