fix: passthrough should point to polonium registry
This commit is contained in:
@@ -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(" }");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user