From 1c19e54e113975f601a3e2fa534e7b85ad44e9ba Mon Sep 17 00:00:00 2001 From: PTKu <61538034+PTKu@users.noreply.github.com> Date: Mon, 2 Dec 2024 14:37:28 +0100 Subject: [PATCH] removes CLR attributes from pocos due to possible conflicts --- .../AXSharp.Cs.Compiler/Plain/CsPlainSourceBuilder.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Plain/CsPlainSourceBuilder.cs b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Plain/CsPlainSourceBuilder.cs index 7af3e64d..e6943165 100644 --- a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Plain/CsPlainSourceBuilder.cs +++ b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Plain/CsPlainSourceBuilder.cs @@ -113,8 +113,7 @@ public void CreateNamespaceDeclaration(INamespaceDeclarationSyntax namespaceDecl public void CreateFieldDeclaration(IFieldDeclaration fieldDeclaration, IxNodeVisitor visitor) { if (fieldDeclaration.IsMemberEligibleForTranspile(this)) - { - AddToSource(fieldDeclaration.Pragmas.AddAttributes()); + { AddToSource(fieldDeclaration.Pragmas.AddedPropertiesAsAttributes()); switch (fieldDeclaration.Type) { @@ -195,8 +194,10 @@ public void CreateFile(IFileSyntax fileSyntax, IxNodeVisitor visitor) fileSyntax.UsingDirectives .Where(p => this.Compilation.GetSemanticTree().Namespaces.Select(p => p.FullyQualifiedName).Contains(p.QualifiedIdentifierList.GetText()))) { - AddToSource($"using Pocos.{fileSyntaxUsingDirective.QualifiedIdentifierList.GetText()};"); + //AddToSource($"using {fileSyntaxUsingDirective.QualifiedIdentifierList.GetText()};"); + AddToSource($"using Pocos.{fileSyntaxUsingDirective.QualifiedIdentifierList.GetText()};"); } + AddToSource("namespace Pocos {"); fileSyntax.Declarations.ToList().ForEach(p => p.Visit(visitor, this)); AddToSource("}"); @@ -266,8 +267,7 @@ public void CreateConfigDeclaration(IConfigurationDeclaration configurationDecla public void CreateVariableDeclaration(IVariableDeclaration fieldDeclaration, IxNodeVisitor visitor) { if (fieldDeclaration.IsMemberEligibleForTranspile(this)) - { - AddToSource(fieldDeclaration.Pragmas.AddAttributes()); + { AddToSource(fieldDeclaration.Pragmas.AddedPropertiesAsAttributes()); switch (fieldDeclaration.Type) {