From a34fca758185fa525207d6e97eb524fc2e322ccb Mon Sep 17 00:00:00 2001 From: hzhang Date: Fri, 14 Feb 2025 13:31:11 +0000 Subject: [PATCH] refactor: move global classes def into package --- src/Generators/GlobalRegistryGenerator.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Generators/GlobalRegistryGenerator.cs b/src/Generators/GlobalRegistryGenerator.cs index 239be67..dc5ec0e 100644 --- a/src/Generators/GlobalRegistryGenerator.cs +++ b/src/Generators/GlobalRegistryGenerator.cs @@ -20,6 +20,7 @@ public class GlobalRegistryGenerator : ISourceGenerator .AppendLine("using System.Reflection;") .AppendLine("using Polonium.Attributes;") .AppendLine("using Polonium;") + .AppendLine("using Polonium.Interfaces;") .AppendLine("public static partial class GlobalRegistry") .AppendLine("{") .AppendLine(" public static void Start()") @@ -50,6 +51,8 @@ public class GlobalRegistryGenerator : ISourceGenerator .AppendLine(" }") .AppendLine(" }") .AppendLine(" public static PoloniumRegistry PoloniumRegistry => PoloniumRegistry.Instance;") + .AppendLine(" public static bool Paused { get; set; }") + .AppendLine(" public static HashSet TimeConsumers { get; } = new ();") .AppendLine("}"); context.AddSource("GlobalRegistry.g.cs", sb.ToString()); }