From 607d5cb6a50d890b221f098bf9dd77b444a86297 Mon Sep 17 00:00:00 2001 From: hzhang Date: Thu, 20 Feb 2025 09:31:11 +0000 Subject: [PATCH] fix: passthrough should point to polonium registry --- src/Tasks/GenerateRegistryPassThrough.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Tasks/GenerateRegistryPassThrough.cs b/src/Tasks/GenerateRegistryPassThrough.cs index 50eedcc..bb1f5fb 100644 --- a/src/Tasks/GenerateRegistryPassThrough.cs +++ b/src/Tasks/GenerateRegistryPassThrough.cs @@ -29,6 +29,7 @@ public class GenerateRegistryPassThrough : PoloniumTask foreach (string use in GetUsings(code)) sb.AppendLine(use); sb + .AppendLine("using System.Collections.Generic;") .AppendLine("// ReSharper disable once CheckNamespace") .AppendLine("public static partial class GlobalRegistry") .AppendLine("{"); @@ -47,14 +48,14 @@ public class GenerateRegistryPassThrough : PoloniumTask foreach (PropertyDeclarationSyntax property in properties) { if (HasGetterOnly(property)) - sb.AppendLine($" public static {GetDisplayName(property.Type)} {property.Identifier.ToString()} => GlobalRegistry.{property.Identifier.ValueText};"); + sb.AppendLine($" public static {GetDisplayName(property.Type)} {property.Identifier.ToString()} => PoloniumRegistry.{property.Identifier.ValueText};"); else { sb .AppendLine($" public static {GetDisplayName(property.Type)} {property.Identifier.ToString()}") .AppendLine(" {") - .AppendLine($" get => GlobalRegistry.{property.Identifier.ValueText};") - .AppendLine($" set => GlobalRegistry.{property.Identifier.ValueText} = value;") + .AppendLine($" get => PoloniumRegistry.{property.Identifier.ValueText};") + .AppendLine($" set => PoloniumRegistry.{property.Identifier.ValueText} = value;") .AppendLine(" }"); } }