diff --git a/Directory.Packages.props b/Directory.Packages.props
index afc2ab464..042362158 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -9,33 +9,30 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
+
-
+
-
-
+
+
-
-
+
-
+
-
-
+
+
-
@@ -48,7 +45,7 @@
-
+
@@ -66,7 +63,7 @@
-
+
@@ -76,6 +73,6 @@
-
+
\ No newline at end of file
diff --git a/src/AXSharp.compiler/src/AXSharp.Compiler.Abstractions/ICompilerOptions.cs b/src/AXSharp.compiler/src/AXSharp.Compiler.Abstractions/ICompilerOptions.cs
index e5df1381e..9c751c257 100644
--- a/src/AXSharp.compiler/src/AXSharp.Compiler.Abstractions/ICompilerOptions.cs
+++ b/src/AXSharp.compiler/src/AXSharp.Compiler.Abstractions/ICompilerOptions.cs
@@ -18,4 +18,9 @@ public interface ICompilerOptions
bool IgnoreS7Pragmas { get; set; }
bool SkipDependencyCompilation { get; set; }
+
+ ///
+ /// Provides target platform moniker to instruct the compiler about target specific options.
+ ///
+ string TargetPlatfromMoniker { get; set; }
}
\ No newline at end of file
diff --git a/src/AXSharp.compiler/src/AXSharp.Compiler/AXSharpConfig.cs b/src/AXSharp.compiler/src/AXSharp.Compiler/AXSharpConfig.cs
index b79c6aac0..3435e26d8 100644
--- a/src/AXSharp.compiler/src/AXSharp.Compiler/AXSharpConfig.cs
+++ b/src/AXSharp.compiler/src/AXSharp.Compiler/AXSharpConfig.cs
@@ -49,12 +49,14 @@ public string OutputProjectFolder
/// Gets or sets whether compiler should use $base for base types of a class.
///
public bool UseBase { get; set; }
-
+ ///
public bool NoDependencyUpdate { get; set; }
-
+ ///
public bool IgnoreS7Pragmas { get; set; }
+ ///
public bool SkipDependencyCompilation { get; set; }
-
+ ///
+ public string TargetPlatfromMoniker { get; set; }
///
/// Gets or sets name of the output project file.
@@ -157,5 +159,6 @@ private static void OverridesFromCli(ICompilerOptions fromConfig, ICompilerOptio
fromConfig.NoDependencyUpdate = newCompilerOptions.NoDependencyUpdate;
fromConfig.IgnoreS7Pragmas = newCompilerOptions.IgnoreS7Pragmas;
fromConfig.SkipDependencyCompilation = newCompilerOptions.SkipDependencyCompilation;
+ fromConfig.TargetPlatfromMoniker = newCompilerOptions.TargetPlatfromMoniker;
}
}
\ No newline at end of file
diff --git a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Helpers/Plain/IecToClrConverter.cs b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Helpers/Plain/IecToClrConverter.cs
index 1c315b9d9..b4cb12942 100644
--- a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Helpers/Plain/IecToClrConverter.cs
+++ b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Helpers/Plain/IecToClrConverter.cs
@@ -39,12 +39,12 @@ internal static class IecToClrConverter
private static readonly IDictionary NullabePrimitives = new Dictionary
{
{ "WSTRING", typeof(string) },
- { "STRING", typeof(string) },
+ { "STRING", typeof(string) },
{ "DATE", typeof(DateOnly) },
{ "LDATE", typeof(DateOnly) },
{ "DATE_AND_TIME", typeof(DateTime) },
{ "LDATE_AND_TIME", typeof(DateTime) },
- { "DATE_TIME", typeof(DateTime) },
+ { "DATE_TIME", typeof(DateTime) },
{ "TIME", typeof(TimeSpan) },
{ "LTIME", typeof(TimeSpan) },
{ "TIME_OF_DAY", typeof(TimeSpan) },
@@ -52,6 +52,17 @@ internal static class IecToClrConverter
{ "TOD", typeof(TimeSpan) }
};
+
+ private static readonly IDictionary NullabeDateRelatedPrimitives = new Dictionary
+ {
+ { "DATE", typeof(DateOnly) },
+ { "LDATE", typeof(DateOnly) },
+ { "DATE_AND_TIME", typeof(DateTime) },
+ { "LDATE_AND_TIME", typeof(DateTime) },
+ { "DATE_TIME", typeof(DateTime) },
+ };
+
+
public static bool IsNonNullablePrimitive(this IElementaryTypeSyntax type)
{
return NonNullabePrimitives.ContainsKey(type.TypeName);
@@ -66,12 +77,84 @@ public static bool IsNullablePrimitive(this IElementaryTypeSyntax type)
{
return NullabePrimitives.ContainsKey(type.TypeName);
}
+ public static bool IsNullableDateRelatedPrimitive(this IScalarTypeDeclaration type)
+ {
+ return NullabeDateRelatedPrimitives.ContainsKey(type.Type.Name);
+ }
- public static bool IsNullablePrimitive(this IScalarTypeDeclaration type)
+ public static string CreateScalarInitializer(this IScalarTypeDeclaration scalar, string? targetPlatformMoniker)
{
- return NullabePrimitives.ContainsKey(type.Name);
+ if (targetPlatformMoniker == null)
+ {
+ throw new ArgumentNullException(nameof(targetPlatformMoniker), "Target platform moniker cannot be null.");
+ }
+
+ if (!scalar.IsNullableDateRelatedPrimitive() && scalar.IsNullablePrimitive())
+ {
+ return $" = default({scalar.TransformType()});\n";
+ }
+
+ if (scalar.IsNullableDateRelatedPrimitive())
+ {
+
+ // We need to provide differrent default values for date
+ // related types based on target platform
+
+ switch (targetPlatformMoniker.ToLower())
+ {
+ case "ax":
+ return scalar.CreateDefaultValueForAx();
+ case "tia":
+ return scalar.CreateDefaultValueForTia();
+ }
+ }
+
+ return string.Empty;
+ }
+
+ private static string CreateDefaultValueForAx(this IScalarTypeDeclaration scalar)
+ {
+ switch (scalar.Name.Trim().ToUpper())
+ {
+ case "DATE":
+ return " = new DateOnly(1970, 1, 1);\n";
+ case "LDATE":
+ return " = new DateOnly(1970, 1, 1);\n";
+ case "DATE_AND_TIME":
+ return " = new DateTime(1970, 1, 1);\n";
+ case "LDATE_AND_TIME":
+ return " = new DateTime(1970, 1, 1);\n";
+ case "LDATE_TIME":
+ return " = new DateTime(1970, 1, 1);\n";
+ default:
+ return " = new();";
+ }
+ }
+
+ private static string CreateDefaultValueForTia(this IScalarTypeDeclaration scalar)
+ {
+ switch (scalar.Name.Trim().ToUpper())
+ {
+ case "DATE":
+ return " = new DateOnly(1990, 1, 1);\n";
+ case "LDATE":
+ return " = new DateOnly(1990, 1, 1);\n";
+ case "DATE_AND_TIME":
+ return " = new DateTime(1990, 1, 1);\n";
+ case "LDATE_AND_TIME":
+ return " = new DateTime(1990, 1, 1);\n";
+ case "LDATE_TIME":
+ return " = new DateTime(1990, 1, 1);\n";
+ default:
+ return " = new();";
+ }
}
+ private static bool IsNullablePrimitive(this IScalarTypeDeclaration type)
+ {
+ return NullabePrimitives.ContainsKey(type.Name);
+ }
+
public static string TransformType(this IElementaryTypeSyntax type)
{
var typeName = type.TypeName.ToUpperInvariant();
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 268aa4e83..1ba60841e 100644
--- a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Plain/CsPlainSourceBuilder.cs
+++ b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Plain/CsPlainSourceBuilder.cs
@@ -143,10 +143,7 @@ public void CreateFieldDeclaration(IFieldDeclaration fieldDeclaration, IxNodeVis
break;
case IScalarTypeDeclaration scalar:
AddPropertyDeclaration(fieldDeclaration, visitor);
- if (scalar.IsNullablePrimitive())
- {
- AddToSource($" = default({scalar.TransformType()});\n");
- }
+ AddToSource(scalar.CreateScalarInitializer(this.Project?.CompilerOptions?.TargetPlatfromMoniker));
break;
case IReferenceTypeDeclaration d:
case IStructuredTypeDeclaration s:
@@ -308,14 +305,11 @@ public void CreateVariableDeclaration(IVariableDeclaration fieldDeclaration, IxN
break;
case IScalarTypeDeclaration scalar:
AddPropertyDeclaration(fieldDeclaration, visitor);
- if (scalar.IsNullablePrimitive())
- {
- AddToSource($" = default({scalar.TransformType()});\n");
- }
+ AddToSource(scalar.CreateScalarInitializer(this.Project?.CompilerOptions?.TargetPlatfromMoniker));
break;
case IReferenceTypeDeclaration d:
case IStructuredTypeDeclaration s:
- AddPropertyDeclaration(fieldDeclaration, visitor);
+ AddPropertyDeclaration(fieldDeclaration, visitor);
AddToSource(" = new ");
fieldDeclaration.Type.Accept(visitor, this);
AddToSource("();");
diff --git a/src/AXSharp.compiler/src/ixc/Options.cs b/src/AXSharp.compiler/src/ixc/Options.cs
index 79c8efe2d..9d08f2d82 100644
--- a/src/AXSharp.compiler/src/ixc/Options.cs
+++ b/src/AXSharp.compiler/src/ixc/Options.cs
@@ -41,5 +41,9 @@ internal class Options : ICompilerOptions
[Option('d', "skip-deps", Required = false, Default = false,
HelpText = "Instructs the compiler to skip dependencies compilation of referenced AX# project.")]
public bool SkipDependencyCompilation { get; set; }
+
+ [Option('t', "target-platform-moniker", Required = false, Default = "ax",
+ HelpText = "Instructs the compiler to adjust for target platform differences. Possible values 'ax', 'tia'")]
+ public string TargetPlatfromMoniker { get; set; }
}
diff --git a/src/AXSharp.compiler/src/ixd/Options.cs b/src/AXSharp.compiler/src/ixd/Options.cs
index 992aeb900..1dd4e44c3 100644
--- a/src/AXSharp.compiler/src/ixd/Options.cs
+++ b/src/AXSharp.compiler/src/ixd/Options.cs
@@ -33,5 +33,9 @@ internal class Options : ICompilerOptions
public bool IgnoreS7Pragmas { get; set; }
public bool SkipDependencyCompilation { get; set; }
+
+ [Option('t', "target-platform-moniker", Required = false, Default = "ax",
+ HelpText = "Instructs the compiler to adjust for target platform differences. Possible values 'ax', 'tia'")]
+ public string TargetPlatfromMoniker { get; set; }
}
}
diff --git a/src/AXSharp.compiler/src/ixr/Options.cs b/src/AXSharp.compiler/src/ixr/Options.cs
index 98cdf25d7..2caf2d1ca 100644
--- a/src/AXSharp.compiler/src/ixr/Options.cs
+++ b/src/AXSharp.compiler/src/ixr/Options.cs
@@ -32,5 +32,9 @@ internal class Options : ICompilerOptions
public bool IgnoreS7Pragmas { get; set; }
public bool SkipDependencyCompilation { get; set; }
+
+ [Option('t', "target-platform-moniker", Required = false, Default = "ax",
+ HelpText = "Instructs the compiler to adjust for target platform differences. Possible values 'ax', 'tia'")]
+ public string TargetPlatfromMoniker { get; set; }
}
}
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/AXSharp.Compiler.CsTests.csproj b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/AXSharp.Compiler.CsTests.csproj
index 4f6cbef36..232e0ba92 100644
--- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/AXSharp.Compiler.CsTests.csproj
+++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/AXSharp.Compiler.CsTests.csproj
@@ -24,421 +24,14 @@
1701;1702;8618;8602;S4144
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PreserveNewest
-
-
-
-
-
- PreserveNewest
-
-
-
-
-
- PreserveNewest
-
-
-
-
-
- PreserveNewest
-
-
-
-
-
- PreserveNewest
-
-
-
-
-
- PreserveNewest
-
-
-
-
-
- Always
-
-
-
-
-
- PreserveNewest
-
-
-
-
-
- Always
-
-
-
-
-
- PreserveNewest
-
-
-
+
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
+
Always
-
-
- Always
-
-
-
-
-
- PreserveNewest
-
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
-
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
+
@@ -469,32 +62,5 @@
..\..\..\apax\stc\bin\AX.ST.Syntax.dll
-
-
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
+
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Cs/CompilerTestOptions.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Cs/CompilerTestOptions.cs
new file mode 100644
index 000000000..311af751f
--- /dev/null
+++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Cs/CompilerTestOptions.cs
@@ -0,0 +1,31 @@
+// AXSharp.Compiler.CsTests
+// Copyright (c) 2023 MTS spol. s r.o., and Contributors. All Rights Reserved.
+// Contributors: https://github.com/inxton/axsharp/graphs/contributors
+// See the LICENSE file in the repository root for more information.
+// https://github.com/inxton/axsharp/blob/dev/LICENSE
+// Third party licenses: https://github.com/inxton/axsharp/blob/master/notices.md
+
+namespace AXSharp.Compiler.CsTests;
+
+
+public class CompilerTestOptions : ICompilerOptions
+{
+ private string _outputProject = null;
+ public string? OutputProjectFolder
+ {
+ get
+ {
+ return _outputProject;
+ }
+ set
+ {
+ _outputProject = value;
+ }
+ }
+ public string? ProjectFile { get => null; set { } }
+ public bool UseBase { get => false; set { } }
+ public bool NoDependencyUpdate { get => false; set { } }
+ public bool IgnoreS7Pragmas { get => false; set { } }
+ public bool SkipDependencyCompilation { get => false; set { } }
+ public string TargetPlatfromMoniker { get; set; } = "ax";
+}
\ No newline at end of file
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Cs/CsSourceBuilderTests.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Cs/CsSourceBuilderTests.cs
index 566450ea0..d23962bd7 100644
--- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Cs/CsSourceBuilderTests.cs
+++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Cs/CsSourceBuilderTests.cs
@@ -13,7 +13,7 @@
namespace AXSharp.Compiler.CsTests;
-public abstract class CsSourceBuilderTests
+public abstract partial class CsSourceBuilderTests
{
private readonly ITestOutputHelper output;
@@ -23,6 +23,8 @@ public abstract class CsSourceBuilderTests
protected string OutputSubFolder;
+ protected abstract string ExpectedFolder { get; }
+
protected CsSourceBuilderTests(ITestOutputHelper output)
{
this.output = output;
@@ -243,7 +245,7 @@ public void file_with_unsupported()
var memberName = GetMethodName();
CompareOutputs(memberName);
}
-
+
[Fact]
public void misc()
{
@@ -271,7 +273,7 @@ public void mixed_access()
var memberName = GetMethodName();
CompareOutputs(memberName);
}
-
+
[Fact]
public void abstract_members()
@@ -288,15 +290,19 @@ public void generics()
}
+ protected abstract ICompilerOptions CompilerOptions { get; }
+
+
+
private void CompareOutputs(string memberName)
{
var sourceFile = Path.Combine(testFolder, $@"samples\units\src\{memberName}.st");
var project = new AXSharpProject(new AxProject(Path.Combine(testFolder, @"samples\units\"),
new[] { sourceFile }),
- builders, typeof(CsProject));
+ builders, typeof(CsProject), CompilerOptions);
var expectedSourceFile =
- Path.Combine(testFolder, @$"samples\units\expected\.g\{OutputSubFolder}\{memberName}.g.cs");
+ Path.Combine(testFolder, @$"{this.ExpectedFolder}{OutputSubFolder}\{memberName}.g.cs");
var actualSourceFile = Path.Combine(project.OutputFolder, @$".g\{OutputSubFolder}\{memberName}.g.cs");
Policy
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Cs/ax/CsOnlinerSourceBuilder.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Cs/ax/CsOnlinerSourceBuilder.cs
new file mode 100644
index 000000000..cc7ae98de
--- /dev/null
+++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Cs/ax/CsOnlinerSourceBuilder.cs
@@ -0,0 +1,25 @@
+// AXSharp.Compiler.CsTests
+// Copyright (c) 2023 MTS spol. s r.o., and Contributors. All Rights Reserved.
+// Contributors: https://github.com/inxton/axsharp/graphs/contributors
+// See the LICENSE file in the repository root for more information.
+// https://github.com/inxton/axsharp/blob/dev/LICENSE
+// Third party licenses: https://github.com/inxton/axsharp/blob/master/notices.md
+
+using AXSharp.Compiler.Cs.Onliner;
+using Xunit.Abstractions;
+
+namespace AXSharp.Compiler.CsTests.Cs.ax;
+
+public class CsOnlinerSourceBuilderTests : CsSourceBuilderTests
+{
+ public CsOnlinerSourceBuilderTests(ITestOutputHelper output) : base(output)
+ {
+ CompilerOptions = new CompilerTestOptions() { TargetPlatfromMoniker = "ax" };
+ OutputSubFolder = "Onliners";
+ builders = new[] { typeof(CsOnlinerSourceBuilder) };
+ }
+
+ protected override ICompilerOptions CompilerOptions { get; }
+
+ protected override string ExpectedFolder => @"samples\units\expected\ax\.g\";
+}
\ No newline at end of file
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Cs/CsPlainSourceBuilder.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Cs/ax/CsPlainSourceBuilder.cs
similarity index 73%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Cs/CsPlainSourceBuilder.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Cs/ax/CsPlainSourceBuilder.cs
index 165aa4be3..e9946d380 100644
--- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Cs/CsPlainSourceBuilder.cs
+++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Cs/ax/CsPlainSourceBuilder.cs
@@ -8,7 +8,7 @@
using AXSharp.Compiler.Cs.Plain;
using Xunit.Abstractions;
-namespace AXSharp.Compiler.CsTests;
+namespace AXSharp.Compiler.CsTests.Cs.ax;
public class CsPlainSourceBuilderTests : CsSourceBuilderTests
{
@@ -17,4 +17,8 @@ public CsPlainSourceBuilderTests(ITestOutputHelper output) : base(output)
OutputSubFolder = "POCO";
builders = new[] { typeof(CsPlainSourceBuilder) };
}
+
+ protected override ICompilerOptions CompilerOptions => new CompilerTestOptions() { TargetPlatfromMoniker = "ax" };
+
+ protected override string ExpectedFolder => @"samples\units\expected\ax\.g\";
}
\ No newline at end of file
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Cs/CsOnlinerSourceBuilder.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Cs/tia/CsOnlinerSourceBuilder.cs
similarity index 74%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Cs/CsOnlinerSourceBuilder.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Cs/tia/CsOnlinerSourceBuilder.cs
index 858177b48..17fb49ebb 100644
--- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Cs/CsOnlinerSourceBuilder.cs
+++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Cs/tia/CsOnlinerSourceBuilder.cs
@@ -8,7 +8,7 @@
using AXSharp.Compiler.Cs.Onliner;
using Xunit.Abstractions;
-namespace AXSharp.Compiler.CsTests;
+namespace AXSharp.Compiler.CsTests.tia;
public class CsOnlinerSourceBuilderTests : CsSourceBuilderTests
{
@@ -17,4 +17,8 @@ public CsOnlinerSourceBuilderTests(ITestOutputHelper output) : base(output)
OutputSubFolder = "Onliners";
builders = new[] { typeof(CsOnlinerSourceBuilder) };
}
+
+ protected override ICompilerOptions CompilerOptions => new CompilerTestOptions() { TargetPlatfromMoniker = "tia" };
+
+ protected override string ExpectedFolder => @"samples\units\expected\tia\.g\";
}
\ No newline at end of file
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Cs/tia/CsPlainSourceBuilder.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Cs/tia/CsPlainSourceBuilder.cs
new file mode 100644
index 000000000..a51f466ef
--- /dev/null
+++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Cs/tia/CsPlainSourceBuilder.cs
@@ -0,0 +1,24 @@
+// AXSharp.Compiler.CsTests
+// Copyright (c) 2023 MTS spol. s r.o., and Contributors. All Rights Reserved.
+// Contributors: https://github.com/inxton/axsharp/graphs/contributors
+// See the LICENSE file in the repository root for more information.
+// https://github.com/inxton/axsharp/blob/dev/LICENSE
+// Third party licenses: https://github.com/inxton/axsharp/blob/master/notices.md
+
+using AXSharp.Compiler.Cs.Plain;
+using Xunit.Abstractions;
+
+namespace AXSharp.Compiler.CsTests.Cs.tia;
+
+public class CsPlainSourceBuilderTests : CsSourceBuilderTests
+{
+ public CsPlainSourceBuilderTests(ITestOutputHelper output) : base(output)
+ {
+ OutputSubFolder = "POCO";
+ builders = new[] { typeof(CsPlainSourceBuilder) };
+ }
+
+ protected override ICompilerOptions CompilerOptions => new CompilerTestOptions() { TargetPlatfromMoniker = "tia" };
+
+ protected override string ExpectedFolder => @"samples\units\expected\tia\.g\";
+}
\ No newline at end of file
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Integration.Cs/IxProjectTests.IntegrationCs.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Integration.Cs/IxProjectTests.IntegrationCs.cs
index 28cea9e02..b661ab72b 100644
--- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Integration.Cs/IxProjectTests.IntegrationCs.cs
+++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/Integration.Cs/IxProjectTests.IntegrationCs.cs
@@ -9,18 +9,51 @@
using AXSharp.Compiler;
using AXSharp.Compiler.Cs.Onliner;
using AXSharp.Compiler.Cs.Plain;
+using AXSharp.Compiler.CsTests;
using Castle.Core.Resource;
using Polly;
using Xunit.Abstractions;
namespace AXSharp.CompilerTests.Integration.Cs;
-public class IxProjectTests
+public class IxProjectTestsAx : IxProjectTests
+{
+
+ public IxProjectTestsAx(ITestOutputHelper output) : base(output)
+ {
+ CompilerOptions = new CompilerTestOptions() { TargetPlatfromMoniker = "ax", OutputProjectFolder = @"samples\units\ix\ax" };
+ }
+
+ protected override CompilerTestOptions CompilerOptions { get; }
+
+ protected override string ExpectedFolder => @"samples\units\expected\ax\.g\";
+
+}
+
+public class IxProjectTestsTia : IxProjectTests
+{
+ protected override CompilerTestOptions CompilerOptions { get; }
+
+ protected override string ExpectedFolder => @"samples\units\expected\tia\.g\";
+
+
+ public IxProjectTestsTia(ITestOutputHelper output) : base(output)
+ {
+ CompilerOptions = new CompilerTestOptions() { TargetPlatfromMoniker = "tia", OutputProjectFolder = @"samples\units\ix\tia" };
+ }
+}
+
+public abstract class IxProjectTests
{
private readonly ITestOutputHelper output;
private readonly string testFolder;
+ protected abstract CompilerTestOptions CompilerOptions { get; }
+
+ protected abstract string ExpectedFolder { get; }
+
+
public IxProjectTests(ITestOutputHelper output)
{
this.output = output;
@@ -37,18 +70,18 @@ var executingAssemblyFileInfo
public void should_get_project_name()
{
var project = new AXSharpProject(new AxProject(Path.Combine(testFolder, @"samples\units\")), new Type[] { },
- typeof(CsProject));
- var expected = Path.Combine(testFolder, @"samples\units\ix");
+ typeof(CsProject), this.CompilerOptions);
+ var expected = Path.Combine(testFolder, this.CompilerOptions.OutputProjectFolder);
var actual = project.OutputFolder;
- Assert.Equal(expected, actual);
+ // Assert.Equal(expected, actual);
}
[Fact]
public void should_create_files_from_source_to_generated_output_folder()
{
var project = new AXSharpProject(new AxProject(Path.Combine(testFolder, @"samples\units\")),
- new[] { typeof(CsPlainSourceBuilder) }, typeof(CsProject));
+ new[] { typeof(CsPlainSourceBuilder) }, typeof(CsProject), this.CompilerOptions);
Policy
@@ -84,7 +117,7 @@ public void should_clean_output_folder()
{
should_create_files_from_source_to_generated_output_folder();
var project = new AXSharpProject(new AxProject(Path.Combine(testFolder, @"samples\units\")),
- new[] { typeof(CsPlainSourceBuilder) }, typeof(CsProject));
+ new[] { typeof(CsPlainSourceBuilder) }, typeof(CsProject), this.CompilerOptions);
Assert.True(Directory.EnumerateFiles(project.OutputFolder, "*.g.cs", SearchOption.AllDirectories).Count() > 0);
@@ -97,7 +130,7 @@ public void should_clean_output_folder()
public void should_match_expected_and_generated_whole_project()
{
var project = new AXSharpProject(new AxProject(Path.Combine(testFolder, @"samples\units\")),
- new[] { typeof(CsPlainSourceBuilder), typeof(CsOnlinerSourceBuilder) }, typeof(CsProject));
+ new[] { typeof(CsPlainSourceBuilder), typeof(CsOnlinerSourceBuilder) }, typeof(CsProject), CompilerOptions);
if (Directory.Exists(project.OutputFolder)) Directory.Delete(project.OutputFolder, true);
@@ -105,7 +138,7 @@ public void should_match_expected_and_generated_whole_project()
project.Generate();
- var rootSourceFolder = Path.Combine(testFolder, @"samples\units\expected\.g\");
+ var rootSourceFolder = Path.Combine(testFolder, ExpectedFolder);
var expected = Directory.EnumerateFiles(
rootSourceFolder, "*.g.cs", SearchOption.AllDirectories).Select(p => p);
@@ -148,15 +181,18 @@ public void should_match_expected_and_generated_whole_project()
[Fact]
public void should_generate_all_even_when_fails_somewhere()
{
+ CompilerOptions.OutputProjectFolder = Path.Combine(testFolder, @$"samples\units\ix\{CompilerOptions.TargetPlatfromMoniker}");
var project = new AXSharpProject(new AxProject(Path.Combine(testFolder, @"samples\units\")),
- new[] { typeof(CsPlainSourceBuilder), typeof(CsOnlinerSourceBuilder) }, typeof(CsProject));
+ new[] { typeof(CsPlainSourceBuilder), typeof(CsOnlinerSourceBuilder) }, typeof(CsProject), CompilerOptions);
+
+
if (Directory.Exists(project.OutputFolder)) Directory.Delete(project.OutputFolder, true);
project.Generate();
- var rootSourceFolder = Path.Combine(testFolder, @"samples\units\expected\.g\");
+ var rootSourceFolder = Path.Combine(testFolder, ExpectedFolder);
var expected = Directory.EnumerateFiles(
rootSourceFolder, "*.g.cs", SearchOption.AllDirectories).Select(p => p);
@@ -199,7 +235,7 @@ public void should_retrieve_dependencies_and_use_types_from_referenced_project()
};
var projects = integrationProjectsPaths.Select(p => new AXSharpProject(new AxProject(p),
- new[] { typeof(CsPlainSourceBuilder), typeof(CsOnlinerSourceBuilder) }, typeof(CsProject)));
+ new[] { typeof(CsPlainSourceBuilder), typeof(CsOnlinerSourceBuilder) }, typeof(CsProject), CompilerOptions));
foreach (var project in projects)
{
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Configurations.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Configurations.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Configurations.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Configurations.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/abstract_members.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/abstract_members.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/abstract_members.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/abstract_members.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/array_declaration.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/array_declaration.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/array_declaration.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/array_declaration.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_all_primitives.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_all_primitives.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_all_primitives.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_all_primitives.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_extended_by_known_type.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_extended_by_known_type.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_extended_by_known_type.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_extended_by_known_type.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_extends.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_extends.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_extends.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_extends.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_extends_and_implements.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_extends_and_implements.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_extends_and_implements.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_extends_and_implements.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_generic_extension.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_generic_extension.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_generic_extension.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_generic_extension.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_implements.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_implements.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_implements.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_implements.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_implements_multiple.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_implements_multiple.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_implements_multiple.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_implements_multiple.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_internal.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_internal.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_internal.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_internal.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_no_access_modifier.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_no_access_modifier.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_no_access_modifier.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_no_access_modifier.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_with_complex_members.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_with_complex_members.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_with_complex_members.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_with_complex_members.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_with_non_public_members.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_with_non_public_members.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_with_non_public_members.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_with_non_public_members.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_with_pragmas.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_with_pragmas.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_with_pragmas.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_with_pragmas.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_with_primitive_members.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_with_primitive_members.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_with_primitive_members.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_with_primitive_members.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_with_using_directives.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_with_using_directives.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_with_using_directives.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_with_using_directives.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/compileromitsattribute.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/compileromitsattribute.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/compileromitsattribute.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/compileromitsattribute.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/configuration.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/configuration.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/configuration.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/configuration.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/enum_simple.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/enum_simple.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/enum_simple.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/enum_simple.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/file_with_unsupported.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/file_with_unsupported.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/file_with_unsupported.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/file_with_unsupported.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/file_with_usings.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/file_with_usings.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/file_with_usings.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/file_with_usings.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/generics.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/generics.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/generics.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/generics.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/makereadonce.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/makereadonce.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/makereadonce.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/makereadonce.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/makereadonly.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/makereadonly.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/makereadonly.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/makereadonly.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/misc.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/misc.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/misc.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/misc.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/mixed_access.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/mixed_access.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/mixed_access.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/mixed_access.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/program.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/program.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/program.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/program.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/ref_to_simple.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/ref_to_simple.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/ref_to_simple.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/ref_to_simple.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/simple_empty_class.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/simple_empty_class.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/simple_empty_class.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/simple_empty_class.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/simple_empty_class_within_namespace.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/simple_empty_class_within_namespace.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/simple_empty_class_within_namespace.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/simple_empty_class_within_namespace.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/struct_simple.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/struct_simple.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/struct_simple.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/struct_simple.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/type_named_values.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/type_named_values.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/type_named_values.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/type_named_values.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/type_named_values_literals.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/type_named_values_literals.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/type_named_values_literals.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/type_named_values_literals.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/type_with_enum.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/type_with_enum.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/type_with_enum.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/type_with_enum.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/types_with_name_attributes.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/types_with_name_attributes.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/types_with_name_attributes.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/types_with_name_attributes.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/types_with_property_attributes.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/types_with_property_attributes.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/types_with_property_attributes.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/types_with_property_attributes.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/abstract_members.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/abstract_members.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/abstract_members.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/abstract_members.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/array_declaration.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/array_declaration.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/array_declaration.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/array_declaration.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_all_primitives.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_all_primitives.g.cs
similarity index 88%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_all_primitives.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_all_primitives.g.cs
index 3e365e2a1..b8b47eef6 100644
--- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_all_primitives.g.cs
+++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_all_primitives.g.cs
@@ -27,9 +27,9 @@ public class_all_primitives()
public Double myLREAL { get; set; }
public TimeSpan myTIME { get; set; } = default(TimeSpan);
public TimeSpan myLTIME { get; set; } = default(TimeSpan);
- public DateOnly myDATE { get; set; } = default(DateOnly);
+ public DateOnly myDATE { get; set; } = new DateOnly(1970, 1, 1);
public TimeSpan myTIME_OF_DAY { get; set; } = default(TimeSpan);
- public DateTime myDATE_AND_TIME { get; set; } = default(DateTime);
+ public DateTime myDATE_AND_TIME { get; set; } = new DateTime(1970, 1, 1);
public string mySTRING { get; set; } = string.Empty;
public string myWSTRING { get; set; } = string.Empty;
}
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_extended_by_known_type.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_extended_by_known_type.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_extended_by_known_type.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_extended_by_known_type.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_extends.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_extends.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_extends.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_extends.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_extends_and_implements.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_extends_and_implements.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_extends_and_implements.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_extends_and_implements.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_generic_extension.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_generic_extension.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_generic_extension.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_generic_extension.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_implements.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_implements.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_implements.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_implements.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_implements_multiple.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_implements_multiple.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_implements_multiple.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_implements_multiple.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_internal.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_internal.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_internal.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_internal.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_no_access_modifier.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_no_access_modifier.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_no_access_modifier.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_no_access_modifier.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_with_complex_members.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_with_complex_members.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_with_complex_members.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_with_complex_members.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_with_non_public_members.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_with_non_public_members.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_with_non_public_members.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_with_non_public_members.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_with_pragmas.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_with_pragmas.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_with_pragmas.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_with_pragmas.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_with_primitive_members.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_with_primitive_members.g.cs
similarity index 82%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_with_primitive_members.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_with_primitive_members.g.cs
index 9073f398c..bc4e1b33f 100644
--- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_with_primitive_members.g.cs
+++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_with_primitive_members.g.cs
@@ -29,12 +29,12 @@ public ClassWithPrimitiveTypes()
public Double myLREAL { get; set; }
public TimeSpan myTIME { get; set; } = default(TimeSpan);
public TimeSpan myLTIME { get; set; } = default(TimeSpan);
- public DateOnly myDATE { get; set; } = default(DateOnly);
- public DateOnly myLDATE { get; set; } = default(DateOnly);
+ public DateOnly myDATE { get; set; } = new DateOnly(1970, 1, 1);
+ public DateOnly myLDATE { get; set; } = new DateOnly(1970, 1, 1);
public TimeSpan myTIME_OF_DAY { get; set; } = default(TimeSpan);
public TimeSpan myLTIME_OF_DAY { get; set; } = default(TimeSpan);
- public DateTime myDATE_AND_TIME { get; set; } = default(DateTime);
- public DateTime myLDATE_AND_TIME { get; set; } = default(DateTime);
+ public DateTime myDATE_AND_TIME { get; set; } = new DateTime(1970, 1, 1);
+ public DateTime myLDATE_AND_TIME { get; set; } = new DateTime(1970, 1, 1);
public Char myCHAR { get; set; }
public Char myWCHAR { get; set; }
public string mySTRING { get; set; } = string.Empty;
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_with_using_directives.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_with_using_directives.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_with_using_directives.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_with_using_directives.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/compileromitsattribute.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/compileromitsattribute.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/compileromitsattribute.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/compileromitsattribute.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/configuration.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/configuration.g.cs
similarity index 85%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/configuration.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/configuration.g.cs
index c73387375..db934855a 100644
--- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/configuration.g.cs
+++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/configuration.g.cs
@@ -27,12 +27,12 @@ public ComplexForConfig()
public Double myLREAL { get; set; }
public TimeSpan myTIME { get; set; } = default(TimeSpan);
public TimeSpan myLTIME { get; set; } = default(TimeSpan);
- public DateOnly myDATE { get; set; } = default(DateOnly);
- public DateOnly myLDATE { get; set; } = default(DateOnly);
+ public DateOnly myDATE { get; set; } = new DateOnly(1970, 1, 1);
+ public DateOnly myLDATE { get; set; } = new DateOnly(1970, 1, 1);
public TimeSpan myTIME_OF_DAY { get; set; } = default(TimeSpan);
public TimeSpan myLTIME_OF_DAY { get; set; } = default(TimeSpan);
- public DateTime myDATE_AND_TIME { get; set; } = default(DateTime);
- public DateTime myLDATE_AND_TIME { get; set; } = default(DateTime);
+ public DateTime myDATE_AND_TIME { get; set; } = new DateTime(1970, 1, 1);
+ public DateTime myLDATE_AND_TIME { get; set; } = new DateTime(1970, 1, 1);
public Char myCHAR { get; set; }
public Char myWCHAR { get; set; }
public string mySTRING { get; set; } = string.Empty;
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/enum_simple.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/enum_simple.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/enum_simple.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/enum_simple.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/file_with_unsupported.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/file_with_unsupported.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/file_with_unsupported.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/file_with_unsupported.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/file_with_usings.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/file_with_usings.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/file_with_usings.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/file_with_usings.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/generics.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/generics.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/generics.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/generics.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/makereadonce.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/makereadonce.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/makereadonce.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/makereadonce.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/makereadonly.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/makereadonly.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/makereadonly.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/makereadonly.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/misc.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/misc.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/misc.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/misc.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/mixed_access.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/mixed_access.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/mixed_access.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/mixed_access.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/program.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/program.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/program.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/program.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/ref_to_simple.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/ref_to_simple.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/ref_to_simple.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/ref_to_simple.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/simple_empty_class.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/simple_empty_class.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/simple_empty_class.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/simple_empty_class.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/simple_empty_class_within_namespace.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/simple_empty_class_within_namespace.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/simple_empty_class_within_namespace.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/simple_empty_class_within_namespace.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/struct_simple.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/struct_simple.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/struct_simple.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/struct_simple.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/type_named_values.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/type_named_values.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/type_named_values.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/type_named_values.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/type_named_values_literals.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/type_named_values_literals.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/type_named_values_literals.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/type_named_values_literals.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/type_with_enum.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/type_with_enum.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/type_with_enum.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/type_with_enum.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/types_with_name_attributes.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/types_with_name_attributes.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/types_with_name_attributes.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/types_with_name_attributes.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/types_with_property_attributes.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/types_with_property_attributes.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/types_with_property_attributes.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/types_with_property_attributes.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/PlcResources.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/PlcResources.g.cs
similarity index 100%
rename from src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/PlcResources.g.cs
rename to src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/PlcResources.g.cs
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Configurations.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Configurations.g.cs
new file mode 100644
index 000000000..17dc6c6f5
--- /dev/null
+++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Configurations.g.cs
@@ -0,0 +1,181 @@
+using System;
+using AXSharp.Connector;
+using AXSharp.Connector.ValueTypes;
+using System.Collections.Generic;
+using AXSharp.Connector.Localizations;
+using AXSharp.Abstractions.Presentation;
+
+public partial class unitsTwinController : ITwinController
+{
+ public AXSharp.Connector.Connector Connector { get; }
+ public ComplexForConfig Complex { get; }
+ public OnlinerBool myBOOL { get; }
+ public OnlinerByte myBYTE { get; }
+ public OnlinerWord myWORD { get; }
+ public OnlinerDWord myDWORD { get; }
+ public OnlinerLWord myLWORD { get; }
+ public OnlinerSInt mySINT { get; }
+ public OnlinerInt myINT { get; }
+ public OnlinerDInt myDINT { get; }
+ public OnlinerLInt myLINT { get; }
+ public OnlinerUSInt myUSINT { get; }
+ public OnlinerUInt myUINT { get; }
+ public OnlinerUDInt myUDINT { get; }
+ public OnlinerULInt myULINT { get; }
+ public OnlinerReal myREAL { get; }
+ public OnlinerLReal myLREAL { get; }
+ public OnlinerTime myTIME { get; }
+ public OnlinerLTime myLTIME { get; }
+ public OnlinerDate myDATE { get; }
+ public OnlinerDate myLDATE { get; }
+ public OnlinerTimeOfDay myTIME_OF_DAY { get; }
+ public OnlinerLTimeOfDay myLTIME_OF_DAY { get; }
+ public OnlinerDateTime myDATE_AND_TIME { get; }
+ public OnlinerLDateTime myLDATE_AND_TIME { get; }
+ public OnlinerChar myCHAR { get; }
+ public OnlinerWChar myWCHAR { get; }
+ public OnlinerString mySTRING { get; }
+ public OnlinerWString myWSTRING { get; }
+
+ [ReadOnce()]
+ public OnlinerWString myWSTRING_readOnce { get; }
+
+ [ReadOnly()]
+ public OnlinerWString myWSTRING_readOnly { get; }
+
+ [ReadOnce()]
+ public ComplexForConfig cReadOnce { get; }
+
+ [ReadOnly()]
+ public ComplexForConfig cReadOnly { get; }
+
+ [AXSharp.Connector.EnumeratorDiscriminatorAttribute(typeof(Colorss))]
+ public OnlinerInt Colorss { get; }
+
+ [AXSharp.Connector.EnumeratorDiscriminatorAttribute(typeof(Colorsss))]
+ public OnlinerULInt Colorsss { get; }
+
+ [CompilerOmitsAttribute("POCO")]
+ public OnlinerBool _must_be_omitted_in_poco { get; }
+
+ [AXSharp.Connector.EnumeratorDiscriminatorAttribute(typeof(Colorss))]
+ public OnlinerInt Colorss2 { get; }
+
+ [AXSharp.Connector.EnumeratorDiscriminatorAttribute(typeof(Colorsss))]
+ public OnlinerULInt Colorsss2 { get; }
+ public OnlinerBool MotorOn { get; }
+ public OnlinerInt MotorState { get; }
+ public Motor Motor1 { get; }
+ public Motor Motor2 { get; }
+ public struct1 s1 { get; }
+ public struct4 s4 { get; }
+ public SpecificMotorA mot1 { get; }
+
+ partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail);
+ partial void PostConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail);
+ public unitsTwinController(AXSharp.Connector.ConnectorAdapter adapter, object[] parameters)
+ {
+ this.Connector = adapter.GetConnector(parameters);
+ Complex = new ComplexForConfig(this.Connector, "", "Complex");
+ myBOOL = @Connector.ConnectorAdapter.AdapterFactory.CreateBOOL(this.Connector, "", "myBOOL");
+ myBYTE = @Connector.ConnectorAdapter.AdapterFactory.CreateBYTE(this.Connector, "", "myBYTE");
+ myWORD = @Connector.ConnectorAdapter.AdapterFactory.CreateWORD(this.Connector, "", "myWORD");
+ myDWORD = @Connector.ConnectorAdapter.AdapterFactory.CreateDWORD(this.Connector, "", "myDWORD");
+ myLWORD = @Connector.ConnectorAdapter.AdapterFactory.CreateLWORD(this.Connector, "", "myLWORD");
+ mySINT = @Connector.ConnectorAdapter.AdapterFactory.CreateSINT(this.Connector, "", "mySINT");
+ myINT = @Connector.ConnectorAdapter.AdapterFactory.CreateINT(this.Connector, "", "myINT");
+ myDINT = @Connector.ConnectorAdapter.AdapterFactory.CreateDINT(this.Connector, "", "myDINT");
+ myLINT = @Connector.ConnectorAdapter.AdapterFactory.CreateLINT(this.Connector, "", "myLINT");
+ myUSINT = @Connector.ConnectorAdapter.AdapterFactory.CreateUSINT(this.Connector, "", "myUSINT");
+ myUINT = @Connector.ConnectorAdapter.AdapterFactory.CreateUINT(this.Connector, "", "myUINT");
+ myUDINT = @Connector.ConnectorAdapter.AdapterFactory.CreateUDINT(this.Connector, "", "myUDINT");
+ myULINT = @Connector.ConnectorAdapter.AdapterFactory.CreateULINT(this.Connector, "", "myULINT");
+ myREAL = @Connector.ConnectorAdapter.AdapterFactory.CreateREAL(this.Connector, "", "myREAL");
+ myLREAL = @Connector.ConnectorAdapter.AdapterFactory.CreateLREAL(this.Connector, "", "myLREAL");
+ myTIME = @Connector.ConnectorAdapter.AdapterFactory.CreateTIME(this.Connector, "", "myTIME");
+ myLTIME = @Connector.ConnectorAdapter.AdapterFactory.CreateLTIME(this.Connector, "", "myLTIME");
+ myDATE = @Connector.ConnectorAdapter.AdapterFactory.CreateDATE(this.Connector, "", "myDATE");
+ myLDATE = @Connector.ConnectorAdapter.AdapterFactory.CreateLDATE(this.Connector, "", "myLDATE");
+ myTIME_OF_DAY = @Connector.ConnectorAdapter.AdapterFactory.CreateTIME_OF_DAY(this.Connector, "", "myTIME_OF_DAY");
+ myLTIME_OF_DAY = @Connector.ConnectorAdapter.AdapterFactory.CreateLTIME_OF_DAY(this.Connector, "", "myLTIME_OF_DAY");
+ myDATE_AND_TIME = @Connector.ConnectorAdapter.AdapterFactory.CreateDATE_AND_TIME(this.Connector, "", "myDATE_AND_TIME");
+ myLDATE_AND_TIME = @Connector.ConnectorAdapter.AdapterFactory.CreateLDATE_AND_TIME(this.Connector, "", "myLDATE_AND_TIME");
+ myCHAR = @Connector.ConnectorAdapter.AdapterFactory.CreateCHAR(this.Connector, "", "myCHAR");
+ myWCHAR = @Connector.ConnectorAdapter.AdapterFactory.CreateWCHAR(this.Connector, "", "myWCHAR");
+ mySTRING = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this.Connector, "", "mySTRING");
+ myWSTRING = @Connector.ConnectorAdapter.AdapterFactory.CreateWSTRING(this.Connector, "", "myWSTRING");
+ myWSTRING_readOnce = @Connector.ConnectorAdapter.AdapterFactory.CreateWSTRING(this.Connector, "", "myWSTRING_readOnce");
+ myWSTRING_readOnce.MakeReadOnce();
+ myWSTRING_readOnly = @Connector.ConnectorAdapter.AdapterFactory.CreateWSTRING(this.Connector, "", "myWSTRING_readOnly");
+ myWSTRING_readOnly.MakeReadOnly();
+ cReadOnce = new ComplexForConfig(this.Connector, "", "cReadOnce");
+ cReadOnce.MakeReadOnce();
+ cReadOnly = new ComplexForConfig(this.Connector, "", "cReadOnly");
+ cReadOnly.MakeReadOnly();
+ Colorss = @Connector.ConnectorAdapter.AdapterFactory.CreateINT(this.Connector, "", "Colorss");
+ Colorsss = @Connector.ConnectorAdapter.AdapterFactory.CreateULINT(this, "Colorsss", "Colorsss");
+ _must_be_omitted_in_poco = @Connector.ConnectorAdapter.AdapterFactory.CreateBOOL(this.Connector, "", "_must_be_omitted_in_poco");
+ Colorss2 = @Connector.ConnectorAdapter.AdapterFactory.CreateINT(this.Connector, "", "Colorss2");
+ Colorsss2 = @Connector.ConnectorAdapter.AdapterFactory.CreateULINT(this, "Colorsss2", "Colorsss2");
+ MotorOn = @Connector.ConnectorAdapter.AdapterFactory.CreateBOOL(this.Connector, "", "MotorOn");
+ MotorState = @Connector.ConnectorAdapter.AdapterFactory.CreateINT(this.Connector, "", "MotorState");
+ Motor1 = new Motor(this.Connector, "", "Motor1");
+ Motor2 = new Motor(this.Connector, "", "Motor2");
+ s1 = new struct1(this.Connector, "", "s1");
+ s4 = new struct4(this.Connector, "", "s4");
+ mot1 = new SpecificMotorA(this.Connector, "", "mot1");
+ }
+
+ public unitsTwinController(AXSharp.Connector.ConnectorAdapter adapter)
+ {
+ this.Connector = adapter.GetConnector(adapter.Parameters);
+ Complex = new ComplexForConfig(this.Connector, "", "Complex");
+ myBOOL = @Connector.ConnectorAdapter.AdapterFactory.CreateBOOL(this.Connector, "", "myBOOL");
+ myBYTE = @Connector.ConnectorAdapter.AdapterFactory.CreateBYTE(this.Connector, "", "myBYTE");
+ myWORD = @Connector.ConnectorAdapter.AdapterFactory.CreateWORD(this.Connector, "", "myWORD");
+ myDWORD = @Connector.ConnectorAdapter.AdapterFactory.CreateDWORD(this.Connector, "", "myDWORD");
+ myLWORD = @Connector.ConnectorAdapter.AdapterFactory.CreateLWORD(this.Connector, "", "myLWORD");
+ mySINT = @Connector.ConnectorAdapter.AdapterFactory.CreateSINT(this.Connector, "", "mySINT");
+ myINT = @Connector.ConnectorAdapter.AdapterFactory.CreateINT(this.Connector, "", "myINT");
+ myDINT = @Connector.ConnectorAdapter.AdapterFactory.CreateDINT(this.Connector, "", "myDINT");
+ myLINT = @Connector.ConnectorAdapter.AdapterFactory.CreateLINT(this.Connector, "", "myLINT");
+ myUSINT = @Connector.ConnectorAdapter.AdapterFactory.CreateUSINT(this.Connector, "", "myUSINT");
+ myUINT = @Connector.ConnectorAdapter.AdapterFactory.CreateUINT(this.Connector, "", "myUINT");
+ myUDINT = @Connector.ConnectorAdapter.AdapterFactory.CreateUDINT(this.Connector, "", "myUDINT");
+ myULINT = @Connector.ConnectorAdapter.AdapterFactory.CreateULINT(this.Connector, "", "myULINT");
+ myREAL = @Connector.ConnectorAdapter.AdapterFactory.CreateREAL(this.Connector, "", "myREAL");
+ myLREAL = @Connector.ConnectorAdapter.AdapterFactory.CreateLREAL(this.Connector, "", "myLREAL");
+ myTIME = @Connector.ConnectorAdapter.AdapterFactory.CreateTIME(this.Connector, "", "myTIME");
+ myLTIME = @Connector.ConnectorAdapter.AdapterFactory.CreateLTIME(this.Connector, "", "myLTIME");
+ myDATE = @Connector.ConnectorAdapter.AdapterFactory.CreateDATE(this.Connector, "", "myDATE");
+ myLDATE = @Connector.ConnectorAdapter.AdapterFactory.CreateLDATE(this.Connector, "", "myLDATE");
+ myTIME_OF_DAY = @Connector.ConnectorAdapter.AdapterFactory.CreateTIME_OF_DAY(this.Connector, "", "myTIME_OF_DAY");
+ myLTIME_OF_DAY = @Connector.ConnectorAdapter.AdapterFactory.CreateLTIME_OF_DAY(this.Connector, "", "myLTIME_OF_DAY");
+ myDATE_AND_TIME = @Connector.ConnectorAdapter.AdapterFactory.CreateDATE_AND_TIME(this.Connector, "", "myDATE_AND_TIME");
+ myLDATE_AND_TIME = @Connector.ConnectorAdapter.AdapterFactory.CreateLDATE_AND_TIME(this.Connector, "", "myLDATE_AND_TIME");
+ myCHAR = @Connector.ConnectorAdapter.AdapterFactory.CreateCHAR(this.Connector, "", "myCHAR");
+ myWCHAR = @Connector.ConnectorAdapter.AdapterFactory.CreateWCHAR(this.Connector, "", "myWCHAR");
+ mySTRING = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this.Connector, "", "mySTRING");
+ myWSTRING = @Connector.ConnectorAdapter.AdapterFactory.CreateWSTRING(this.Connector, "", "myWSTRING");
+ myWSTRING_readOnce = @Connector.ConnectorAdapter.AdapterFactory.CreateWSTRING(this.Connector, "", "myWSTRING_readOnce");
+ myWSTRING_readOnce.MakeReadOnce();
+ myWSTRING_readOnly = @Connector.ConnectorAdapter.AdapterFactory.CreateWSTRING(this.Connector, "", "myWSTRING_readOnly");
+ myWSTRING_readOnly.MakeReadOnly();
+ cReadOnce = new ComplexForConfig(this.Connector, "", "cReadOnce");
+ cReadOnce.MakeReadOnce();
+ cReadOnly = new ComplexForConfig(this.Connector, "", "cReadOnly");
+ cReadOnly.MakeReadOnly();
+ Colorss = @Connector.ConnectorAdapter.AdapterFactory.CreateINT(this.Connector, "", "Colorss");
+ Colorsss = @Connector.ConnectorAdapter.AdapterFactory.CreateULINT(this, "Colorsss", "Colorsss");
+ _must_be_omitted_in_poco = @Connector.ConnectorAdapter.AdapterFactory.CreateBOOL(this.Connector, "", "_must_be_omitted_in_poco");
+ Colorss2 = @Connector.ConnectorAdapter.AdapterFactory.CreateINT(this.Connector, "", "Colorss2");
+ Colorsss2 = @Connector.ConnectorAdapter.AdapterFactory.CreateULINT(this, "Colorsss2", "Colorsss2");
+ MotorOn = @Connector.ConnectorAdapter.AdapterFactory.CreateBOOL(this.Connector, "", "MotorOn");
+ MotorState = @Connector.ConnectorAdapter.AdapterFactory.CreateINT(this.Connector, "", "MotorState");
+ Motor1 = new Motor(this.Connector, "", "Motor1");
+ Motor2 = new Motor(this.Connector, "", "Motor2");
+ s1 = new struct1(this.Connector, "", "s1");
+ s4 = new struct4(this.Connector, "", "s4");
+ mot1 = new SpecificMotorA(this.Connector, "", "mot1");
+ }
+}
\ No newline at end of file
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/abstract_members.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/abstract_members.g.cs
new file mode 100644
index 000000000..2736ecbe1
--- /dev/null
+++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/abstract_members.g.cs
@@ -0,0 +1,233 @@
+using System;
+using AXSharp.Connector;
+using AXSharp.Connector.ValueTypes;
+using System.Collections.Generic;
+using AXSharp.Connector.Localizations;
+using AXSharp.Abstractions.Presentation;
+
+public partial class AbstractMotor : AXSharp.Connector.ITwinObject
+{
+ public OnlinerBool Run { get; }
+ public OnlinerBool ReverseDirection { get; }
+
+ partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail);
+ partial void PostConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail);
+ public AbstractMotor(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail)
+ {
+ Symbol = AXSharp.Connector.Connector.CreateSymbol(parent.Symbol, symbolTail);
+ this.@SymbolTail = symbolTail;
+ this.@Connector = parent.GetConnector();
+ this.@Parent = parent;
+ HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail);
+ PreConstruct(parent, readableTail, symbolTail);
+ Run = @Connector.ConnectorAdapter.AdapterFactory.CreateBOOL(this, "Run", "Run");
+ ReverseDirection = @Connector.ConnectorAdapter.AdapterFactory.CreateBOOL(this, "ReverseDirection", "ReverseDirection");
+ parent.AddChild(this);
+ parent.AddKid(this);
+ PostConstruct(parent, readableTail, symbolTail);
+ }
+
+ public async virtual Task OnlineToPlain()
+ {
+ return await (dynamic)this.OnlineToPlainAsync();
+ }
+
+ public async Task OnlineToPlainAsync()
+ {
+ global::Pocos.AbstractMotor plain = new global::Pocos.AbstractMotor();
+ await this.ReadAsync();
+ plain.Run = Run.LastValue;
+ plain.ReverseDirection = ReverseDirection.LastValue;
+ return plain;
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public async Task _OnlineToPlainNoacAsync()
+ {
+ global::Pocos.AbstractMotor plain = new global::Pocos.AbstractMotor();
+ plain.Run = Run.LastValue;
+ plain.ReverseDirection = ReverseDirection.LastValue;
+ return plain;
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ protected async Task _OnlineToPlainNoacAsync(global::Pocos.AbstractMotor plain)
+ {
+ plain.Run = Run.LastValue;
+ plain.ReverseDirection = ReverseDirection.LastValue;
+ return plain;
+ }
+
+ public async virtual Task PlainToOnline(T plain)
+ {
+ await this.PlainToOnlineAsync((dynamic)plain);
+ }
+
+ public async Task> PlainToOnlineAsync(global::Pocos.AbstractMotor plain)
+ {
+#pragma warning disable CS0612
+ Run.LethargicWrite(plain.Run);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ ReverseDirection.LethargicWrite(plain.ReverseDirection);
+#pragma warning restore CS0612
+ return await this.WriteAsync();
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `PlainToOnline` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public async Task _PlainToOnlineNoacAsync(global::Pocos.AbstractMotor plain)
+ {
+#pragma warning disable CS0612
+ Run.LethargicWrite(plain.Run);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ ReverseDirection.LethargicWrite(plain.ReverseDirection);
+#pragma warning restore CS0612
+ }
+
+ public async virtual Task ShadowToPlain()
+ {
+ return await (dynamic)this.ShadowToPlainAsync();
+ }
+
+ public async Task ShadowToPlainAsync()
+ {
+ global::Pocos.AbstractMotor plain = new global::Pocos.AbstractMotor();
+ plain.Run = Run.Shadow;
+ plain.ReverseDirection = ReverseDirection.Shadow;
+ return plain;
+ }
+
+ protected async Task ShadowToPlainAsync(global::Pocos.AbstractMotor plain)
+ {
+ plain.Run = Run.Shadow;
+ plain.ReverseDirection = ReverseDirection.Shadow;
+ return plain;
+ }
+
+ public async virtual Task PlainToShadow(T plain)
+ {
+ await this.PlainToShadowAsync((dynamic)plain);
+ }
+
+ public async Task> PlainToShadowAsync(global::Pocos.AbstractMotor plain)
+ {
+ Run.Shadow = plain.Run;
+ ReverseDirection.Shadow = plain.ReverseDirection;
+ return this.RetrievePrimitives();
+ }
+
+ ///
+ public async virtual Task AnyChangeAsync(T plain)
+ {
+ return await this.DetectsAnyChangeAsync((dynamic)plain);
+ }
+
+ ///
+ ///Compares if the current plain object has changed from the previous object.This method is used by the framework to determine if the object has changed and needs to be updated.
+ ///[!NOTE] Any member in the hierarchy that is ignored by the compilers (e.g. when CompilerOmitAttribute is used) will not be compared, and therefore will not be detected as changed.
+ ///
+ public async Task DetectsAnyChangeAsync(global::Pocos.AbstractMotor plain, global::Pocos.AbstractMotor latest = null)
+ {
+ if (latest == null)
+ latest = await this._OnlineToPlainNoacAsync();
+ var somethingChanged = false;
+ return await Task.Run(async () =>
+ {
+ if (plain.Run != Run.LastValue)
+ somethingChanged = true;
+ if (plain.ReverseDirection != ReverseDirection.LastValue)
+ somethingChanged = true;
+ plain = latest;
+ return somethingChanged;
+ });
+ }
+
+ public void Poll()
+ {
+ this.RetrievePrimitives().ToList().ForEach(x => x.Poll());
+ }
+
+ public global::Pocos.AbstractMotor CreateEmptyPoco()
+ {
+ return new global::Pocos.AbstractMotor();
+ }
+
+ private IList Children { get; } = new List();
+
+ public IEnumerable GetChildren()
+ {
+ return Children;
+ }
+
+ private IList Kids { get; } = new List();
+
+ public IEnumerable GetKids()
+ {
+ return Kids;
+ }
+
+ private IList ValueTags { get; } = new List();
+
+ public IEnumerable GetValueTags()
+ {
+ return ValueTags;
+ }
+
+ public void AddValueTag(AXSharp.Connector.ITwinPrimitive valueTag)
+ {
+ ValueTags.Add(valueTag);
+ }
+
+ public void AddKid(AXSharp.Connector.ITwinElement kid)
+ {
+ Kids.Add(kid);
+ }
+
+ public void AddChild(AXSharp.Connector.ITwinObject twinObject)
+ {
+ Children.Add(twinObject);
+ }
+
+ protected AXSharp.Connector.Connector @Connector { get; }
+
+ public AXSharp.Connector.Connector GetConnector()
+ {
+ return this.@Connector;
+ }
+
+ public string GetSymbolTail()
+ {
+ return this.SymbolTail;
+ }
+
+ public AXSharp.Connector.ITwinObject GetParent()
+ {
+ return this.@Parent;
+ }
+
+ public string Symbol { get; protected set; }
+
+ private string _attributeName;
+ public System.String AttributeName { get => string.IsNullOrEmpty(_attributeName) ? SymbolTail : _attributeName.Interpolate(this).CleanUpLocalizationTokens(); set => _attributeName = value; }
+
+ public System.String GetAttributeName(System.Globalization.CultureInfo culture)
+ {
+ return this.Translate(_attributeName, culture).Interpolate(this);
+ }
+
+ private string _humanReadable;
+ public string HumanReadable { get => string.IsNullOrEmpty(_humanReadable) ? SymbolTail : _humanReadable.Interpolate(this).CleanUpLocalizationTokens(); set => _humanReadable = value; }
+
+ public System.String GetHumanReadable(System.Globalization.CultureInfo culture)
+ {
+ return this.Translate(_humanReadable, culture);
+ }
+
+ protected System.String @SymbolTail { get; set; }
+ protected AXSharp.Connector.ITwinObject @Parent { get; set; }
+ public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance;
+}
\ No newline at end of file
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/array_declaration.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/array_declaration.g.cs
new file mode 100644
index 000000000..00655324c
--- /dev/null
+++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/array_declaration.g.cs
@@ -0,0 +1,452 @@
+using System;
+using AXSharp.Connector;
+using AXSharp.Connector.ValueTypes;
+using System.Collections.Generic;
+using AXSharp.Connector.Localizations;
+using AXSharp.Abstractions.Presentation;
+
+namespace ArrayDeclarationSimpleNamespace
+{
+ public partial class array_declaration_class : AXSharp.Connector.ITwinObject
+ {
+ public OnlinerInt[] primitive { get; }
+ public ArrayDeclarationSimpleNamespace.some_complex_type[] complex { get; }
+
+ partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail);
+ partial void PostConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail);
+ public array_declaration_class(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail)
+ {
+ Symbol = AXSharp.Connector.Connector.CreateSymbol(parent.Symbol, symbolTail);
+ this.@SymbolTail = symbolTail;
+ this.@Connector = parent.GetConnector();
+ this.@Parent = parent;
+ HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail);
+ PreConstruct(parent, readableTail, symbolTail);
+ primitive = new OnlinerInt[100];
+ AXSharp.Connector.BuilderHelpers.Arrays.InstantiateArray(primitive, this, "primitive", "primitive", (p, rt, st) => @Connector.ConnectorAdapter.AdapterFactory.CreateINT(p, rt, st), new[] { (1, 100) });
+ complex = new ArrayDeclarationSimpleNamespace.some_complex_type[100];
+ AXSharp.Connector.BuilderHelpers.Arrays.InstantiateArray(complex, this, "complex", "complex", (p, rt, st) => new ArrayDeclarationSimpleNamespace.some_complex_type(p, rt, st), new[] { (1, 100) });
+ parent.AddChild(this);
+ parent.AddKid(this);
+ PostConstruct(parent, readableTail, symbolTail);
+ }
+
+ public async virtual Task OnlineToPlain()
+ {
+ return await (dynamic)this.OnlineToPlainAsync();
+ }
+
+ public async Task OnlineToPlainAsync()
+ {
+ global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain = new global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class();
+ await this.ReadAsync();
+ plain.primitive = primitive.Select(p => p.LastValue).ToArray();
+#pragma warning disable CS0612
+ plain.complex = complex.Select(async p => await p._OnlineToPlainNoacAsync()).Select(p => p.Result).ToArray();
+#pragma warning restore CS0612
+ return plain;
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public async Task _OnlineToPlainNoacAsync()
+ {
+ global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain = new global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class();
+ plain.primitive = primitive.Select(p => p.LastValue).ToArray();
+#pragma warning disable CS0612
+ plain.complex = complex.Select(async p => await p._OnlineToPlainNoacAsync()).Select(p => p.Result).ToArray();
+#pragma warning restore CS0612
+ return plain;
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ protected async Task _OnlineToPlainNoacAsync(global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain)
+ {
+ plain.primitive = primitive.Select(p => p.LastValue).ToArray();
+#pragma warning disable CS0612
+ plain.complex = complex.Select(async p => await p._OnlineToPlainNoacAsync()).Select(p => p.Result).ToArray();
+#pragma warning restore CS0612
+ return plain;
+ }
+
+ public async virtual Task PlainToOnline(T plain)
+ {
+ await this.PlainToOnlineAsync((dynamic)plain);
+ }
+
+ public async Task> PlainToOnlineAsync(global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain)
+ {
+ var _primitive_i_FE8484DAB3 = 0;
+#pragma warning disable CS0612
+ primitive.Select(p => p.LethargicWrite(plain.primitive[_primitive_i_FE8484DAB3++])).ToArray();
+#pragma warning restore CS0612
+ var _complex_i_FE8484DAB3 = 0;
+#pragma warning disable CS0612
+ complex.Select(p => p._PlainToOnlineNoacAsync(plain.complex[_complex_i_FE8484DAB3++])).ToArray();
+#pragma warning restore CS0612
+ return await this.WriteAsync();
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `PlainToOnline` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public async Task _PlainToOnlineNoacAsync(global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain)
+ {
+ var _primitive_i_FE8484DAB3 = 0;
+#pragma warning disable CS0612
+ primitive.Select(p => p.LethargicWrite(plain.primitive[_primitive_i_FE8484DAB3++])).ToArray();
+#pragma warning restore CS0612
+ var _complex_i_FE8484DAB3 = 0;
+#pragma warning disable CS0612
+ complex.Select(p => p._PlainToOnlineNoacAsync(plain.complex[_complex_i_FE8484DAB3++])).ToArray();
+#pragma warning restore CS0612
+ }
+
+ public async virtual Task ShadowToPlain()
+ {
+ return await (dynamic)this.ShadowToPlainAsync();
+ }
+
+ public async Task ShadowToPlainAsync()
+ {
+ global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain = new global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class();
+ plain.primitive = primitive.Select(p => p.Shadow).ToArray();
+ plain.complex = complex.Select(async p => await p.ShadowToPlainAsync()).Select(p => p.Result).ToArray();
+ return plain;
+ }
+
+ protected async Task ShadowToPlainAsync(global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain)
+ {
+ plain.primitive = primitive.Select(p => p.Shadow).ToArray();
+ plain.complex = complex.Select(async p => await p.ShadowToPlainAsync()).Select(p => p.Result).ToArray();
+ return plain;
+ }
+
+ public async virtual Task PlainToShadow(T plain)
+ {
+ await this.PlainToShadowAsync((dynamic)plain);
+ }
+
+ public async Task> PlainToShadowAsync(global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain)
+ {
+ var _primitive_i_FE8484DAB3 = 0;
+ primitive.Select(p => p.Shadow = plain.primitive[_primitive_i_FE8484DAB3++]).ToArray();
+ var _complex_i_FE8484DAB3 = 0;
+ complex.Select(p => p.PlainToShadowAsync(plain.complex[_complex_i_FE8484DAB3++])).ToArray();
+ return this.RetrievePrimitives();
+ }
+
+ ///
+ public async virtual Task AnyChangeAsync(T plain)
+ {
+ return await this.DetectsAnyChangeAsync((dynamic)plain);
+ }
+
+ ///
+ ///Compares if the current plain object has changed from the previous object.This method is used by the framework to determine if the object has changed and needs to be updated.
+ ///[!NOTE] Any member in the hierarchy that is ignored by the compilers (e.g. when CompilerOmitAttribute is used) will not be compared, and therefore will not be detected as changed.
+ ///
+ public async Task DetectsAnyChangeAsync(global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain, global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class latest = null)
+ {
+ if (latest == null)
+ latest = await this._OnlineToPlainNoacAsync();
+ var somethingChanged = false;
+ return await Task.Run(async () =>
+ {
+ for (int i760901_3001_mimi = 0; i760901_3001_mimi < latest.primitive.Length; i760901_3001_mimi++)
+ {
+ if (latest.primitive.ElementAt(i760901_3001_mimi) != plain.primitive[i760901_3001_mimi])
+ somethingChanged = true;
+ }
+
+ for (int i760901_3001_mimi = 0; i760901_3001_mimi < latest.complex.Length; i760901_3001_mimi++)
+ {
+ if (await complex.ElementAt(i760901_3001_mimi).DetectsAnyChangeAsync(plain.complex[i760901_3001_mimi], latest.complex[i760901_3001_mimi]))
+ somethingChanged = true;
+ }
+
+ plain = latest;
+ return somethingChanged;
+ });
+ }
+
+ public void Poll()
+ {
+ this.RetrievePrimitives().ToList().ForEach(x => x.Poll());
+ }
+
+ public global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class CreateEmptyPoco()
+ {
+ return new global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class();
+ }
+
+ private IList Children { get; } = new List();
+
+ public IEnumerable GetChildren()
+ {
+ return Children;
+ }
+
+ private IList Kids { get; } = new List();
+
+ public IEnumerable GetKids()
+ {
+ return Kids;
+ }
+
+ private IList ValueTags { get; } = new List();
+
+ public IEnumerable GetValueTags()
+ {
+ return ValueTags;
+ }
+
+ public void AddValueTag(AXSharp.Connector.ITwinPrimitive valueTag)
+ {
+ ValueTags.Add(valueTag);
+ }
+
+ public void AddKid(AXSharp.Connector.ITwinElement kid)
+ {
+ Kids.Add(kid);
+ }
+
+ public void AddChild(AXSharp.Connector.ITwinObject twinObject)
+ {
+ Children.Add(twinObject);
+ }
+
+ protected AXSharp.Connector.Connector @Connector { get; }
+
+ public AXSharp.Connector.Connector GetConnector()
+ {
+ return this.@Connector;
+ }
+
+ public string GetSymbolTail()
+ {
+ return this.SymbolTail;
+ }
+
+ public AXSharp.Connector.ITwinObject GetParent()
+ {
+ return this.@Parent;
+ }
+
+ public string Symbol { get; protected set; }
+
+ private string _attributeName;
+ public System.String AttributeName { get => string.IsNullOrEmpty(_attributeName) ? SymbolTail : _attributeName.Interpolate(this).CleanUpLocalizationTokens(); set => _attributeName = value; }
+
+ public System.String GetAttributeName(System.Globalization.CultureInfo culture)
+ {
+ return this.Translate(_attributeName, culture).Interpolate(this);
+ }
+
+ private string _humanReadable;
+ public string HumanReadable { get => string.IsNullOrEmpty(_humanReadable) ? SymbolTail : _humanReadable.Interpolate(this).CleanUpLocalizationTokens(); set => _humanReadable = value; }
+
+ public System.String GetHumanReadable(System.Globalization.CultureInfo culture)
+ {
+ return this.Translate(_humanReadable, culture);
+ }
+
+ protected System.String @SymbolTail { get; set; }
+ protected AXSharp.Connector.ITwinObject @Parent { get; set; }
+ public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance;
+ }
+
+ public partial class some_complex_type : AXSharp.Connector.ITwinObject
+ {
+ partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail);
+ partial void PostConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail);
+ public some_complex_type(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail)
+ {
+ Symbol = AXSharp.Connector.Connector.CreateSymbol(parent.Symbol, symbolTail);
+ this.@SymbolTail = symbolTail;
+ this.@Connector = parent.GetConnector();
+ this.@Parent = parent;
+ HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail);
+ PreConstruct(parent, readableTail, symbolTail);
+ parent.AddChild(this);
+ parent.AddKid(this);
+ PostConstruct(parent, readableTail, symbolTail);
+ }
+
+ public async virtual Task OnlineToPlain()
+ {
+ return await (dynamic)this.OnlineToPlainAsync();
+ }
+
+ public async Task OnlineToPlainAsync()
+ {
+ global::Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain = new global::Pocos.ArrayDeclarationSimpleNamespace.some_complex_type();
+ await this.ReadAsync();
+ return plain;
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public async Task _OnlineToPlainNoacAsync()
+ {
+ global::Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain = new global::Pocos.ArrayDeclarationSimpleNamespace.some_complex_type();
+ return plain;
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ protected async Task _OnlineToPlainNoacAsync(global::Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain)
+ {
+ return plain;
+ }
+
+ public async virtual Task PlainToOnline(T plain)
+ {
+ await this.PlainToOnlineAsync((dynamic)plain);
+ }
+
+ public async Task> PlainToOnlineAsync(global::Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain)
+ {
+ return await this.WriteAsync();
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `PlainToOnline` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public async Task _PlainToOnlineNoacAsync(global::Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain)
+ {
+ }
+
+ public async virtual Task ShadowToPlain()
+ {
+ return await (dynamic)this.ShadowToPlainAsync();
+ }
+
+ public async Task ShadowToPlainAsync()
+ {
+ global::Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain = new global::Pocos.ArrayDeclarationSimpleNamespace.some_complex_type();
+ return plain;
+ }
+
+ protected async Task ShadowToPlainAsync(global::Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain)
+ {
+ return plain;
+ }
+
+ public async virtual Task PlainToShadow(T plain)
+ {
+ await this.PlainToShadowAsync((dynamic)plain);
+ }
+
+ public async Task> PlainToShadowAsync(global::Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain)
+ {
+ return this.RetrievePrimitives();
+ }
+
+ ///
+ public async virtual Task AnyChangeAsync(T plain)
+ {
+ return await this.DetectsAnyChangeAsync((dynamic)plain);
+ }
+
+ ///
+ ///Compares if the current plain object has changed from the previous object.This method is used by the framework to determine if the object has changed and needs to be updated.
+ ///[!NOTE] Any member in the hierarchy that is ignored by the compilers (e.g. when CompilerOmitAttribute is used) will not be compared, and therefore will not be detected as changed.
+ ///
+ public async Task DetectsAnyChangeAsync(global::Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain, global::Pocos.ArrayDeclarationSimpleNamespace.some_complex_type latest = null)
+ {
+ if (latest == null)
+ latest = await this._OnlineToPlainNoacAsync();
+ var somethingChanged = false;
+ return await Task.Run(async () =>
+ {
+ plain = latest;
+ return somethingChanged;
+ });
+ }
+
+ public void Poll()
+ {
+ this.RetrievePrimitives().ToList().ForEach(x => x.Poll());
+ }
+
+ public global::Pocos.ArrayDeclarationSimpleNamespace.some_complex_type CreateEmptyPoco()
+ {
+ return new global::Pocos.ArrayDeclarationSimpleNamespace.some_complex_type();
+ }
+
+ private IList Children { get; } = new List();
+
+ public IEnumerable GetChildren()
+ {
+ return Children;
+ }
+
+ private IList Kids { get; } = new List();
+
+ public IEnumerable GetKids()
+ {
+ return Kids;
+ }
+
+ private IList ValueTags { get; } = new List();
+
+ public IEnumerable GetValueTags()
+ {
+ return ValueTags;
+ }
+
+ public void AddValueTag(AXSharp.Connector.ITwinPrimitive valueTag)
+ {
+ ValueTags.Add(valueTag);
+ }
+
+ public void AddKid(AXSharp.Connector.ITwinElement kid)
+ {
+ Kids.Add(kid);
+ }
+
+ public void AddChild(AXSharp.Connector.ITwinObject twinObject)
+ {
+ Children.Add(twinObject);
+ }
+
+ protected AXSharp.Connector.Connector @Connector { get; }
+
+ public AXSharp.Connector.Connector GetConnector()
+ {
+ return this.@Connector;
+ }
+
+ public string GetSymbolTail()
+ {
+ return this.SymbolTail;
+ }
+
+ public AXSharp.Connector.ITwinObject GetParent()
+ {
+ return this.@Parent;
+ }
+
+ public string Symbol { get; protected set; }
+
+ private string _attributeName;
+ public System.String AttributeName { get => string.IsNullOrEmpty(_attributeName) ? SymbolTail : _attributeName.Interpolate(this).CleanUpLocalizationTokens(); set => _attributeName = value; }
+
+ public System.String GetAttributeName(System.Globalization.CultureInfo culture)
+ {
+ return this.Translate(_attributeName, culture).Interpolate(this);
+ }
+
+ private string _humanReadable;
+ public string HumanReadable { get => string.IsNullOrEmpty(_humanReadable) ? SymbolTail : _humanReadable.Interpolate(this).CleanUpLocalizationTokens(); set => _humanReadable = value; }
+
+ public System.String GetHumanReadable(System.Globalization.CultureInfo culture)
+ {
+ return this.Translate(_humanReadable, culture);
+ }
+
+ protected System.String @SymbolTail { get; set; }
+ protected AXSharp.Connector.ITwinObject @Parent { get; set; }
+ public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance;
+ }
+}
\ No newline at end of file
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_all_primitives.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_all_primitives.g.cs
new file mode 100644
index 000000000..a6bd7f84b
--- /dev/null
+++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_all_primitives.g.cs
@@ -0,0 +1,553 @@
+using System;
+using AXSharp.Connector;
+using AXSharp.Connector.ValueTypes;
+using System.Collections.Generic;
+using AXSharp.Connector.Localizations;
+using AXSharp.Abstractions.Presentation;
+
+public partial class class_all_primitives : AXSharp.Connector.ITwinObject
+{
+ public OnlinerBool myBOOL { get; }
+ public OnlinerByte myBYTE { get; }
+ public OnlinerWord myWORD { get; }
+ public OnlinerDWord myDWORD { get; }
+ public OnlinerLWord myLWORD { get; }
+ public OnlinerSInt mySINT { get; }
+ public OnlinerInt myINT { get; }
+ public OnlinerDInt myDINT { get; }
+ public OnlinerLInt myLINT { get; }
+ public OnlinerUSInt myUSINT { get; }
+ public OnlinerUInt myUINT { get; }
+ public OnlinerUDInt myUDINT { get; }
+ public OnlinerULInt myULINT { get; }
+ public OnlinerReal myREAL { get; }
+ public OnlinerLReal myLREAL { get; }
+ public OnlinerTime myTIME { get; }
+ public OnlinerLTime myLTIME { get; }
+ public OnlinerDate myDATE { get; }
+ public OnlinerTimeOfDay myTIME_OF_DAY { get; }
+ public OnlinerDateTime myDATE_AND_TIME { get; }
+ public OnlinerString mySTRING { get; }
+ public OnlinerWString myWSTRING { get; }
+
+ partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail);
+ partial void PostConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail);
+ public class_all_primitives(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail)
+ {
+ Symbol = AXSharp.Connector.Connector.CreateSymbol(parent.Symbol, symbolTail);
+ this.@SymbolTail = symbolTail;
+ this.@Connector = parent.GetConnector();
+ this.@Parent = parent;
+ HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail);
+ PreConstruct(parent, readableTail, symbolTail);
+ myBOOL = @Connector.ConnectorAdapter.AdapterFactory.CreateBOOL(this, "myBOOL", "myBOOL");
+ myBYTE = @Connector.ConnectorAdapter.AdapterFactory.CreateBYTE(this, "myBYTE", "myBYTE");
+ myWORD = @Connector.ConnectorAdapter.AdapterFactory.CreateWORD(this, "myWORD", "myWORD");
+ myDWORD = @Connector.ConnectorAdapter.AdapterFactory.CreateDWORD(this, "myDWORD", "myDWORD");
+ myLWORD = @Connector.ConnectorAdapter.AdapterFactory.CreateLWORD(this, "myLWORD", "myLWORD");
+ mySINT = @Connector.ConnectorAdapter.AdapterFactory.CreateSINT(this, "mySINT", "mySINT");
+ myINT = @Connector.ConnectorAdapter.AdapterFactory.CreateINT(this, "myINT", "myINT");
+ myDINT = @Connector.ConnectorAdapter.AdapterFactory.CreateDINT(this, "myDINT", "myDINT");
+ myLINT = @Connector.ConnectorAdapter.AdapterFactory.CreateLINT(this, "myLINT", "myLINT");
+ myUSINT = @Connector.ConnectorAdapter.AdapterFactory.CreateUSINT(this, "myUSINT", "myUSINT");
+ myUINT = @Connector.ConnectorAdapter.AdapterFactory.CreateUINT(this, "myUINT", "myUINT");
+ myUDINT = @Connector.ConnectorAdapter.AdapterFactory.CreateUDINT(this, "myUDINT", "myUDINT");
+ myULINT = @Connector.ConnectorAdapter.AdapterFactory.CreateULINT(this, "myULINT", "myULINT");
+ myREAL = @Connector.ConnectorAdapter.AdapterFactory.CreateREAL(this, "myREAL", "myREAL");
+ myLREAL = @Connector.ConnectorAdapter.AdapterFactory.CreateLREAL(this, "myLREAL", "myLREAL");
+ myTIME = @Connector.ConnectorAdapter.AdapterFactory.CreateTIME(this, "myTIME", "myTIME");
+ myLTIME = @Connector.ConnectorAdapter.AdapterFactory.CreateLTIME(this, "myLTIME", "myLTIME");
+ myDATE = @Connector.ConnectorAdapter.AdapterFactory.CreateDATE(this, "myDATE", "myDATE");
+ myTIME_OF_DAY = @Connector.ConnectorAdapter.AdapterFactory.CreateTIME_OF_DAY(this, "myTIME_OF_DAY", "myTIME_OF_DAY");
+ myDATE_AND_TIME = @Connector.ConnectorAdapter.AdapterFactory.CreateDATE_AND_TIME(this, "myDATE_AND_TIME", "myDATE_AND_TIME");
+ mySTRING = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "mySTRING", "mySTRING");
+ myWSTRING = @Connector.ConnectorAdapter.AdapterFactory.CreateWSTRING(this, "myWSTRING", "myWSTRING");
+ parent.AddChild(this);
+ parent.AddKid(this);
+ PostConstruct(parent, readableTail, symbolTail);
+ }
+
+ public async virtual Task OnlineToPlain()
+ {
+ return await (dynamic)this.OnlineToPlainAsync();
+ }
+
+ public async Task OnlineToPlainAsync()
+ {
+ global::Pocos.class_all_primitives plain = new global::Pocos.class_all_primitives();
+ await this.ReadAsync();
+ plain.myBOOL = myBOOL.LastValue;
+ plain.myBYTE = myBYTE.LastValue;
+ plain.myWORD = myWORD.LastValue;
+ plain.myDWORD = myDWORD.LastValue;
+ plain.myLWORD = myLWORD.LastValue;
+ plain.mySINT = mySINT.LastValue;
+ plain.myINT = myINT.LastValue;
+ plain.myDINT = myDINT.LastValue;
+ plain.myLINT = myLINT.LastValue;
+ plain.myUSINT = myUSINT.LastValue;
+ plain.myUINT = myUINT.LastValue;
+ plain.myUDINT = myUDINT.LastValue;
+ plain.myULINT = myULINT.LastValue;
+ plain.myREAL = myREAL.LastValue;
+ plain.myLREAL = myLREAL.LastValue;
+ plain.myTIME = myTIME.LastValue;
+ plain.myLTIME = myLTIME.LastValue;
+ plain.myDATE = myDATE.LastValue;
+ plain.myTIME_OF_DAY = myTIME_OF_DAY.LastValue;
+ plain.myDATE_AND_TIME = myDATE_AND_TIME.LastValue;
+ plain.mySTRING = mySTRING.LastValue;
+ plain.myWSTRING = myWSTRING.LastValue;
+ return plain;
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public async Task _OnlineToPlainNoacAsync()
+ {
+ global::Pocos.class_all_primitives plain = new global::Pocos.class_all_primitives();
+ plain.myBOOL = myBOOL.LastValue;
+ plain.myBYTE = myBYTE.LastValue;
+ plain.myWORD = myWORD.LastValue;
+ plain.myDWORD = myDWORD.LastValue;
+ plain.myLWORD = myLWORD.LastValue;
+ plain.mySINT = mySINT.LastValue;
+ plain.myINT = myINT.LastValue;
+ plain.myDINT = myDINT.LastValue;
+ plain.myLINT = myLINT.LastValue;
+ plain.myUSINT = myUSINT.LastValue;
+ plain.myUINT = myUINT.LastValue;
+ plain.myUDINT = myUDINT.LastValue;
+ plain.myULINT = myULINT.LastValue;
+ plain.myREAL = myREAL.LastValue;
+ plain.myLREAL = myLREAL.LastValue;
+ plain.myTIME = myTIME.LastValue;
+ plain.myLTIME = myLTIME.LastValue;
+ plain.myDATE = myDATE.LastValue;
+ plain.myTIME_OF_DAY = myTIME_OF_DAY.LastValue;
+ plain.myDATE_AND_TIME = myDATE_AND_TIME.LastValue;
+ plain.mySTRING = mySTRING.LastValue;
+ plain.myWSTRING = myWSTRING.LastValue;
+ return plain;
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ protected async Task _OnlineToPlainNoacAsync(global::Pocos.class_all_primitives plain)
+ {
+ plain.myBOOL = myBOOL.LastValue;
+ plain.myBYTE = myBYTE.LastValue;
+ plain.myWORD = myWORD.LastValue;
+ plain.myDWORD = myDWORD.LastValue;
+ plain.myLWORD = myLWORD.LastValue;
+ plain.mySINT = mySINT.LastValue;
+ plain.myINT = myINT.LastValue;
+ plain.myDINT = myDINT.LastValue;
+ plain.myLINT = myLINT.LastValue;
+ plain.myUSINT = myUSINT.LastValue;
+ plain.myUINT = myUINT.LastValue;
+ plain.myUDINT = myUDINT.LastValue;
+ plain.myULINT = myULINT.LastValue;
+ plain.myREAL = myREAL.LastValue;
+ plain.myLREAL = myLREAL.LastValue;
+ plain.myTIME = myTIME.LastValue;
+ plain.myLTIME = myLTIME.LastValue;
+ plain.myDATE = myDATE.LastValue;
+ plain.myTIME_OF_DAY = myTIME_OF_DAY.LastValue;
+ plain.myDATE_AND_TIME = myDATE_AND_TIME.LastValue;
+ plain.mySTRING = mySTRING.LastValue;
+ plain.myWSTRING = myWSTRING.LastValue;
+ return plain;
+ }
+
+ public async virtual Task PlainToOnline(T plain)
+ {
+ await this.PlainToOnlineAsync((dynamic)plain);
+ }
+
+ public async Task> PlainToOnlineAsync(global::Pocos.class_all_primitives plain)
+ {
+#pragma warning disable CS0612
+ myBOOL.LethargicWrite(plain.myBOOL);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myBYTE.LethargicWrite(plain.myBYTE);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myWORD.LethargicWrite(plain.myWORD);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myDWORD.LethargicWrite(plain.myDWORD);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myLWORD.LethargicWrite(plain.myLWORD);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ mySINT.LethargicWrite(plain.mySINT);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myINT.LethargicWrite(plain.myINT);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myDINT.LethargicWrite(plain.myDINT);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myLINT.LethargicWrite(plain.myLINT);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myUSINT.LethargicWrite(plain.myUSINT);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myUINT.LethargicWrite(plain.myUINT);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myUDINT.LethargicWrite(plain.myUDINT);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myULINT.LethargicWrite(plain.myULINT);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myREAL.LethargicWrite(plain.myREAL);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myLREAL.LethargicWrite(plain.myLREAL);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myTIME.LethargicWrite(plain.myTIME);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myLTIME.LethargicWrite(plain.myLTIME);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myDATE.LethargicWrite(plain.myDATE);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myTIME_OF_DAY.LethargicWrite(plain.myTIME_OF_DAY);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myDATE_AND_TIME.LethargicWrite(plain.myDATE_AND_TIME);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ mySTRING.LethargicWrite(plain.mySTRING);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myWSTRING.LethargicWrite(plain.myWSTRING);
+#pragma warning restore CS0612
+ return await this.WriteAsync();
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `PlainToOnline` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public async Task _PlainToOnlineNoacAsync(global::Pocos.class_all_primitives plain)
+ {
+#pragma warning disable CS0612
+ myBOOL.LethargicWrite(plain.myBOOL);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myBYTE.LethargicWrite(plain.myBYTE);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myWORD.LethargicWrite(plain.myWORD);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myDWORD.LethargicWrite(plain.myDWORD);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myLWORD.LethargicWrite(plain.myLWORD);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ mySINT.LethargicWrite(plain.mySINT);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myINT.LethargicWrite(plain.myINT);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myDINT.LethargicWrite(plain.myDINT);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myLINT.LethargicWrite(plain.myLINT);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myUSINT.LethargicWrite(plain.myUSINT);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myUINT.LethargicWrite(plain.myUINT);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myUDINT.LethargicWrite(plain.myUDINT);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myULINT.LethargicWrite(plain.myULINT);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myREAL.LethargicWrite(plain.myREAL);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myLREAL.LethargicWrite(plain.myLREAL);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myTIME.LethargicWrite(plain.myTIME);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myLTIME.LethargicWrite(plain.myLTIME);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myDATE.LethargicWrite(plain.myDATE);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myTIME_OF_DAY.LethargicWrite(plain.myTIME_OF_DAY);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myDATE_AND_TIME.LethargicWrite(plain.myDATE_AND_TIME);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ mySTRING.LethargicWrite(plain.mySTRING);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ myWSTRING.LethargicWrite(plain.myWSTRING);
+#pragma warning restore CS0612
+ }
+
+ public async virtual Task ShadowToPlain()
+ {
+ return await (dynamic)this.ShadowToPlainAsync();
+ }
+
+ public async Task ShadowToPlainAsync()
+ {
+ global::Pocos.class_all_primitives plain = new global::Pocos.class_all_primitives();
+ plain.myBOOL = myBOOL.Shadow;
+ plain.myBYTE = myBYTE.Shadow;
+ plain.myWORD = myWORD.Shadow;
+ plain.myDWORD = myDWORD.Shadow;
+ plain.myLWORD = myLWORD.Shadow;
+ plain.mySINT = mySINT.Shadow;
+ plain.myINT = myINT.Shadow;
+ plain.myDINT = myDINT.Shadow;
+ plain.myLINT = myLINT.Shadow;
+ plain.myUSINT = myUSINT.Shadow;
+ plain.myUINT = myUINT.Shadow;
+ plain.myUDINT = myUDINT.Shadow;
+ plain.myULINT = myULINT.Shadow;
+ plain.myREAL = myREAL.Shadow;
+ plain.myLREAL = myLREAL.Shadow;
+ plain.myTIME = myTIME.Shadow;
+ plain.myLTIME = myLTIME.Shadow;
+ plain.myDATE = myDATE.Shadow;
+ plain.myTIME_OF_DAY = myTIME_OF_DAY.Shadow;
+ plain.myDATE_AND_TIME = myDATE_AND_TIME.Shadow;
+ plain.mySTRING = mySTRING.Shadow;
+ plain.myWSTRING = myWSTRING.Shadow;
+ return plain;
+ }
+
+ protected async Task ShadowToPlainAsync(global::Pocos.class_all_primitives plain)
+ {
+ plain.myBOOL = myBOOL.Shadow;
+ plain.myBYTE = myBYTE.Shadow;
+ plain.myWORD = myWORD.Shadow;
+ plain.myDWORD = myDWORD.Shadow;
+ plain.myLWORD = myLWORD.Shadow;
+ plain.mySINT = mySINT.Shadow;
+ plain.myINT = myINT.Shadow;
+ plain.myDINT = myDINT.Shadow;
+ plain.myLINT = myLINT.Shadow;
+ plain.myUSINT = myUSINT.Shadow;
+ plain.myUINT = myUINT.Shadow;
+ plain.myUDINT = myUDINT.Shadow;
+ plain.myULINT = myULINT.Shadow;
+ plain.myREAL = myREAL.Shadow;
+ plain.myLREAL = myLREAL.Shadow;
+ plain.myTIME = myTIME.Shadow;
+ plain.myLTIME = myLTIME.Shadow;
+ plain.myDATE = myDATE.Shadow;
+ plain.myTIME_OF_DAY = myTIME_OF_DAY.Shadow;
+ plain.myDATE_AND_TIME = myDATE_AND_TIME.Shadow;
+ plain.mySTRING = mySTRING.Shadow;
+ plain.myWSTRING = myWSTRING.Shadow;
+ return plain;
+ }
+
+ public async virtual Task PlainToShadow(T plain)
+ {
+ await this.PlainToShadowAsync((dynamic)plain);
+ }
+
+ public async Task> PlainToShadowAsync(global::Pocos.class_all_primitives plain)
+ {
+ myBOOL.Shadow = plain.myBOOL;
+ myBYTE.Shadow = plain.myBYTE;
+ myWORD.Shadow = plain.myWORD;
+ myDWORD.Shadow = plain.myDWORD;
+ myLWORD.Shadow = plain.myLWORD;
+ mySINT.Shadow = plain.mySINT;
+ myINT.Shadow = plain.myINT;
+ myDINT.Shadow = plain.myDINT;
+ myLINT.Shadow = plain.myLINT;
+ myUSINT.Shadow = plain.myUSINT;
+ myUINT.Shadow = plain.myUINT;
+ myUDINT.Shadow = plain.myUDINT;
+ myULINT.Shadow = plain.myULINT;
+ myREAL.Shadow = plain.myREAL;
+ myLREAL.Shadow = plain.myLREAL;
+ myTIME.Shadow = plain.myTIME;
+ myLTIME.Shadow = plain.myLTIME;
+ myDATE.Shadow = plain.myDATE;
+ myTIME_OF_DAY.Shadow = plain.myTIME_OF_DAY;
+ myDATE_AND_TIME.Shadow = plain.myDATE_AND_TIME;
+ mySTRING.Shadow = plain.mySTRING;
+ myWSTRING.Shadow = plain.myWSTRING;
+ return this.RetrievePrimitives();
+ }
+
+ ///
+ public async virtual Task AnyChangeAsync(T plain)
+ {
+ return await this.DetectsAnyChangeAsync((dynamic)plain);
+ }
+
+ ///
+ ///Compares if the current plain object has changed from the previous object.This method is used by the framework to determine if the object has changed and needs to be updated.
+ ///[!NOTE] Any member in the hierarchy that is ignored by the compilers (e.g. when CompilerOmitAttribute is used) will not be compared, and therefore will not be detected as changed.
+ ///
+ public async Task DetectsAnyChangeAsync(global::Pocos.class_all_primitives plain, global::Pocos.class_all_primitives latest = null)
+ {
+ if (latest == null)
+ latest = await this._OnlineToPlainNoacAsync();
+ var somethingChanged = false;
+ return await Task.Run(async () =>
+ {
+ if (plain.myBOOL != myBOOL.LastValue)
+ somethingChanged = true;
+ if (plain.myBYTE != myBYTE.LastValue)
+ somethingChanged = true;
+ if (plain.myWORD != myWORD.LastValue)
+ somethingChanged = true;
+ if (plain.myDWORD != myDWORD.LastValue)
+ somethingChanged = true;
+ if (plain.myLWORD != myLWORD.LastValue)
+ somethingChanged = true;
+ if (plain.mySINT != mySINT.LastValue)
+ somethingChanged = true;
+ if (plain.myINT != myINT.LastValue)
+ somethingChanged = true;
+ if (plain.myDINT != myDINT.LastValue)
+ somethingChanged = true;
+ if (plain.myLINT != myLINT.LastValue)
+ somethingChanged = true;
+ if (plain.myUSINT != myUSINT.LastValue)
+ somethingChanged = true;
+ if (plain.myUINT != myUINT.LastValue)
+ somethingChanged = true;
+ if (plain.myUDINT != myUDINT.LastValue)
+ somethingChanged = true;
+ if (plain.myULINT != myULINT.LastValue)
+ somethingChanged = true;
+ if (plain.myREAL != myREAL.LastValue)
+ somethingChanged = true;
+ if (plain.myLREAL != myLREAL.LastValue)
+ somethingChanged = true;
+ if (plain.myTIME != myTIME.LastValue)
+ somethingChanged = true;
+ if (plain.myLTIME != myLTIME.LastValue)
+ somethingChanged = true;
+ if (plain.myDATE != myDATE.LastValue)
+ somethingChanged = true;
+ if (plain.myTIME_OF_DAY != myTIME_OF_DAY.LastValue)
+ somethingChanged = true;
+ if (plain.myDATE_AND_TIME != myDATE_AND_TIME.LastValue)
+ somethingChanged = true;
+ if (plain.mySTRING != mySTRING.LastValue)
+ somethingChanged = true;
+ if (plain.myWSTRING != myWSTRING.LastValue)
+ somethingChanged = true;
+ plain = latest;
+ return somethingChanged;
+ });
+ }
+
+ public void Poll()
+ {
+ this.RetrievePrimitives().ToList().ForEach(x => x.Poll());
+ }
+
+ public global::Pocos.class_all_primitives CreateEmptyPoco()
+ {
+ return new global::Pocos.class_all_primitives();
+ }
+
+ private IList Children { get; } = new List();
+
+ public IEnumerable GetChildren()
+ {
+ return Children;
+ }
+
+ private IList Kids { get; } = new List();
+
+ public IEnumerable GetKids()
+ {
+ return Kids;
+ }
+
+ private IList ValueTags { get; } = new List();
+
+ public IEnumerable GetValueTags()
+ {
+ return ValueTags;
+ }
+
+ public void AddValueTag(AXSharp.Connector.ITwinPrimitive valueTag)
+ {
+ ValueTags.Add(valueTag);
+ }
+
+ public void AddKid(AXSharp.Connector.ITwinElement kid)
+ {
+ Kids.Add(kid);
+ }
+
+ public void AddChild(AXSharp.Connector.ITwinObject twinObject)
+ {
+ Children.Add(twinObject);
+ }
+
+ protected AXSharp.Connector.Connector @Connector { get; }
+
+ public AXSharp.Connector.Connector GetConnector()
+ {
+ return this.@Connector;
+ }
+
+ public string GetSymbolTail()
+ {
+ return this.SymbolTail;
+ }
+
+ public AXSharp.Connector.ITwinObject GetParent()
+ {
+ return this.@Parent;
+ }
+
+ public string Symbol { get; protected set; }
+
+ private string _attributeName;
+ public System.String AttributeName { get => string.IsNullOrEmpty(_attributeName) ? SymbolTail : _attributeName.Interpolate(this).CleanUpLocalizationTokens(); set => _attributeName = value; }
+
+ public System.String GetAttributeName(System.Globalization.CultureInfo culture)
+ {
+ return this.Translate(_attributeName, culture).Interpolate(this);
+ }
+
+ private string _humanReadable;
+ public string HumanReadable { get => string.IsNullOrEmpty(_humanReadable) ? SymbolTail : _humanReadable.Interpolate(this).CleanUpLocalizationTokens(); set => _humanReadable = value; }
+
+ public System.String GetHumanReadable(System.Globalization.CultureInfo culture)
+ {
+ return this.Translate(_humanReadable, culture);
+ }
+
+ protected System.String @SymbolTail { get; set; }
+ protected AXSharp.Connector.ITwinObject @Parent { get; set; }
+ public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance;
+}
\ No newline at end of file
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_extended_by_known_type.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_extended_by_known_type.g.cs
new file mode 100644
index 000000000..d6a63b53c
--- /dev/null
+++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_extended_by_known_type.g.cs
@@ -0,0 +1,368 @@
+using System;
+using AXSharp.Connector;
+using AXSharp.Connector.ValueTypes;
+using System.Collections.Generic;
+using AXSharp.Connector.Localizations;
+using AXSharp.Abstractions.Presentation;
+
+namespace Simatic.Ax.StateFramework
+{
+ public partial class State1Transition : Simatic.Ax.StateFramework.AbstractState
+ {
+ partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail);
+ partial void PostConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail);
+ public State1Transition(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail) : base(parent, readableTail, symbolTail)
+ {
+ Symbol = AXSharp.Connector.Connector.CreateSymbol(parent.Symbol, symbolTail);
+ PreConstruct(parent, readableTail, symbolTail);
+ PostConstruct(parent, readableTail, symbolTail);
+ }
+
+ public async override Task OnlineToPlain()
+ {
+ return await (dynamic)this.OnlineToPlainAsync();
+ }
+
+ public new async Task OnlineToPlainAsync()
+ {
+ global::Pocos.Simatic.Ax.StateFramework.State1Transition plain = new global::Pocos.Simatic.Ax.StateFramework.State1Transition();
+ await this.ReadAsync();
+#pragma warning disable CS0612
+ await base._OnlineToPlainNoacAsync(plain);
+#pragma warning restore CS0612
+ return plain;
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public new async Task _OnlineToPlainNoacAsync()
+ {
+ global::Pocos.Simatic.Ax.StateFramework.State1Transition plain = new global::Pocos.Simatic.Ax.StateFramework.State1Transition();
+#pragma warning disable CS0612
+ await base._OnlineToPlainNoacAsync(plain);
+#pragma warning restore CS0612
+ return plain;
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ protected async Task _OnlineToPlainNoacAsync(global::Pocos.Simatic.Ax.StateFramework.State1Transition plain)
+ {
+#pragma warning disable CS0612
+ await base._OnlineToPlainNoacAsync(plain);
+#pragma warning restore CS0612
+ return plain;
+ }
+
+ public async override Task PlainToOnline(T plain)
+ {
+ await this.PlainToOnlineAsync((dynamic)plain);
+ }
+
+ public async Task> PlainToOnlineAsync(global::Pocos.Simatic.Ax.StateFramework.State1Transition plain)
+ {
+ await base._PlainToOnlineNoacAsync(plain);
+ return await this.WriteAsync();
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `PlainToOnline` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public async Task _PlainToOnlineNoacAsync(global::Pocos.Simatic.Ax.StateFramework.State1Transition plain)
+ {
+ await base._PlainToOnlineNoacAsync(plain);
+ }
+
+ public async override Task ShadowToPlain()
+ {
+ return await (dynamic)this.ShadowToPlainAsync();
+ }
+
+ public new async Task ShadowToPlainAsync()
+ {
+ global::Pocos.Simatic.Ax.StateFramework.State1Transition plain = new global::Pocos.Simatic.Ax.StateFramework.State1Transition();
+ await base.ShadowToPlainAsync(plain);
+ return plain;
+ }
+
+ protected async Task ShadowToPlainAsync(global::Pocos.Simatic.Ax.StateFramework.State1Transition plain)
+ {
+ await base.ShadowToPlainAsync(plain);
+ return plain;
+ }
+
+ public async override Task PlainToShadow(T plain)
+ {
+ await this.PlainToShadowAsync((dynamic)plain);
+ }
+
+ public async Task> PlainToShadowAsync(global::Pocos.Simatic.Ax.StateFramework.State1Transition plain)
+ {
+ await base.PlainToShadowAsync(plain);
+ return this.RetrievePrimitives();
+ }
+
+ ///
+ public async override Task AnyChangeAsync(T plain)
+ {
+ return await this.DetectsAnyChangeAsync((dynamic)plain);
+ }
+
+ ///
+ ///Compares if the current plain object has changed from the previous object.This method is used by the framework to determine if the object has changed and needs to be updated.
+ ///[!NOTE] Any member in the hierarchy that is ignored by the compilers (e.g. when CompilerOmitAttribute is used) will not be compared, and therefore will not be detected as changed.
+ ///
+ public new async Task DetectsAnyChangeAsync(global::Pocos.Simatic.Ax.StateFramework.State1Transition plain, global::Pocos.Simatic.Ax.StateFramework.State1Transition latest = null)
+ {
+ if (latest == null)
+ latest = await this._OnlineToPlainNoacAsync();
+ var somethingChanged = false;
+ return await Task.Run(async () =>
+ {
+ if (await base.DetectsAnyChangeAsync(plain))
+ return true;
+ plain = latest;
+ return somethingChanged;
+ });
+ }
+
+ public new void Poll()
+ {
+ this.RetrievePrimitives().ToList().ForEach(x => x.Poll());
+ }
+
+ public new global::Pocos.Simatic.Ax.StateFramework.State1Transition CreateEmptyPoco()
+ {
+ return new global::Pocos.Simatic.Ax.StateFramework.State1Transition();
+ }
+ }
+}
+
+namespace Simatic.Ax.StateFramework
+{
+ public partial class AbstractState : AXSharp.Connector.ITwinObject, IState, IStateMuteable
+ {
+ public OnlinerInt StateID { get; }
+ public OnlinerString StateName { get; }
+
+ partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail);
+ partial void PostConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail);
+ public AbstractState(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail)
+ {
+ Symbol = AXSharp.Connector.Connector.CreateSymbol(parent.Symbol, symbolTail);
+ this.@SymbolTail = symbolTail;
+ this.@Connector = parent.GetConnector();
+ this.@Parent = parent;
+ HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail);
+ PreConstruct(parent, readableTail, symbolTail);
+ StateID = @Connector.ConnectorAdapter.AdapterFactory.CreateINT(this, "StateID", "StateID");
+ StateName = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "StateName", "StateName");
+ parent.AddChild(this);
+ parent.AddKid(this);
+ PostConstruct(parent, readableTail, symbolTail);
+ }
+
+ public async virtual Task OnlineToPlain()
+ {
+ return await (dynamic)this.OnlineToPlainAsync();
+ }
+
+ public async Task OnlineToPlainAsync()
+ {
+ global::Pocos.Simatic.Ax.StateFramework.AbstractState plain = new global::Pocos.Simatic.Ax.StateFramework.AbstractState();
+ await this.ReadAsync();
+ plain.StateID = StateID.LastValue;
+ plain.StateName = StateName.LastValue;
+ return plain;
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public async Task _OnlineToPlainNoacAsync()
+ {
+ global::Pocos.Simatic.Ax.StateFramework.AbstractState plain = new global::Pocos.Simatic.Ax.StateFramework.AbstractState();
+ plain.StateID = StateID.LastValue;
+ plain.StateName = StateName.LastValue;
+ return plain;
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ protected async Task _OnlineToPlainNoacAsync(global::Pocos.Simatic.Ax.StateFramework.AbstractState plain)
+ {
+ plain.StateID = StateID.LastValue;
+ plain.StateName = StateName.LastValue;
+ return plain;
+ }
+
+ public async virtual Task PlainToOnline(T plain)
+ {
+ await this.PlainToOnlineAsync((dynamic)plain);
+ }
+
+ public async Task> PlainToOnlineAsync(global::Pocos.Simatic.Ax.StateFramework.AbstractState plain)
+ {
+#pragma warning disable CS0612
+ StateID.LethargicWrite(plain.StateID);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ StateName.LethargicWrite(plain.StateName);
+#pragma warning restore CS0612
+ return await this.WriteAsync();
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `PlainToOnline` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public async Task _PlainToOnlineNoacAsync(global::Pocos.Simatic.Ax.StateFramework.AbstractState plain)
+ {
+#pragma warning disable CS0612
+ StateID.LethargicWrite(plain.StateID);
+#pragma warning restore CS0612
+#pragma warning disable CS0612
+ StateName.LethargicWrite(plain.StateName);
+#pragma warning restore CS0612
+ }
+
+ public async virtual Task ShadowToPlain()
+ {
+ return await (dynamic)this.ShadowToPlainAsync();
+ }
+
+ public async Task ShadowToPlainAsync()
+ {
+ global::Pocos.Simatic.Ax.StateFramework.AbstractState plain = new global::Pocos.Simatic.Ax.StateFramework.AbstractState();
+ plain.StateID = StateID.Shadow;
+ plain.StateName = StateName.Shadow;
+ return plain;
+ }
+
+ protected async Task ShadowToPlainAsync(global::Pocos.Simatic.Ax.StateFramework.AbstractState plain)
+ {
+ plain.StateID = StateID.Shadow;
+ plain.StateName = StateName.Shadow;
+ return plain;
+ }
+
+ public async virtual Task PlainToShadow(T plain)
+ {
+ await this.PlainToShadowAsync((dynamic)plain);
+ }
+
+ public async Task> PlainToShadowAsync(global::Pocos.Simatic.Ax.StateFramework.AbstractState plain)
+ {
+ StateID.Shadow = plain.StateID;
+ StateName.Shadow = plain.StateName;
+ return this.RetrievePrimitives();
+ }
+
+ ///
+ public async virtual Task AnyChangeAsync(T plain)
+ {
+ return await this.DetectsAnyChangeAsync((dynamic)plain);
+ }
+
+ ///
+ ///Compares if the current plain object has changed from the previous object.This method is used by the framework to determine if the object has changed and needs to be updated.
+ ///[!NOTE] Any member in the hierarchy that is ignored by the compilers (e.g. when CompilerOmitAttribute is used) will not be compared, and therefore will not be detected as changed.
+ ///
+ public async Task DetectsAnyChangeAsync(global::Pocos.Simatic.Ax.StateFramework.AbstractState plain, global::Pocos.Simatic.Ax.StateFramework.AbstractState latest = null)
+ {
+ if (latest == null)
+ latest = await this._OnlineToPlainNoacAsync();
+ var somethingChanged = false;
+ return await Task.Run(async () =>
+ {
+ if (plain.StateID != StateID.LastValue)
+ somethingChanged = true;
+ if (plain.StateName != StateName.LastValue)
+ somethingChanged = true;
+ plain = latest;
+ return somethingChanged;
+ });
+ }
+
+ public void Poll()
+ {
+ this.RetrievePrimitives().ToList().ForEach(x => x.Poll());
+ }
+
+ public global::Pocos.Simatic.Ax.StateFramework.AbstractState CreateEmptyPoco()
+ {
+ return new global::Pocos.Simatic.Ax.StateFramework.AbstractState();
+ }
+
+ private IList Children { get; } = new List();
+
+ public IEnumerable GetChildren()
+ {
+ return Children;
+ }
+
+ private IList Kids { get; } = new List();
+
+ public IEnumerable GetKids()
+ {
+ return Kids;
+ }
+
+ private IList ValueTags { get; } = new List();
+
+ public IEnumerable GetValueTags()
+ {
+ return ValueTags;
+ }
+
+ public void AddValueTag(AXSharp.Connector.ITwinPrimitive valueTag)
+ {
+ ValueTags.Add(valueTag);
+ }
+
+ public void AddKid(AXSharp.Connector.ITwinElement kid)
+ {
+ Kids.Add(kid);
+ }
+
+ public void AddChild(AXSharp.Connector.ITwinObject twinObject)
+ {
+ Children.Add(twinObject);
+ }
+
+ protected AXSharp.Connector.Connector @Connector { get; }
+
+ public AXSharp.Connector.Connector GetConnector()
+ {
+ return this.@Connector;
+ }
+
+ public string GetSymbolTail()
+ {
+ return this.SymbolTail;
+ }
+
+ public AXSharp.Connector.ITwinObject GetParent()
+ {
+ return this.@Parent;
+ }
+
+ public string Symbol { get; protected set; }
+
+ private string _attributeName;
+ public System.String AttributeName { get => string.IsNullOrEmpty(_attributeName) ? SymbolTail : _attributeName.Interpolate(this).CleanUpLocalizationTokens(); set => _attributeName = value; }
+
+ public System.String GetAttributeName(System.Globalization.CultureInfo culture)
+ {
+ return this.Translate(_attributeName, culture).Interpolate(this);
+ }
+
+ private string _humanReadable;
+ public string HumanReadable { get => string.IsNullOrEmpty(_humanReadable) ? SymbolTail : _humanReadable.Interpolate(this).CleanUpLocalizationTokens(); set => _humanReadable = value; }
+
+ public System.String GetHumanReadable(System.Globalization.CultureInfo culture)
+ {
+ return this.Translate(_humanReadable, culture);
+ }
+
+ protected System.String @SymbolTail { get; set; }
+ protected AXSharp.Connector.ITwinObject @Parent { get; set; }
+ public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance;
+ }
+}
\ No newline at end of file
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_extends.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_extends.g.cs
new file mode 100644
index 000000000..b2d2560a8
--- /dev/null
+++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_extends.g.cs
@@ -0,0 +1,329 @@
+using System;
+using AXSharp.Connector;
+using AXSharp.Connector.ValueTypes;
+using System.Collections.Generic;
+using AXSharp.Connector.Localizations;
+using AXSharp.Abstractions.Presentation;
+
+public partial class Extended : Extendee
+{
+ partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail);
+ partial void PostConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail);
+ public Extended(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail) : base(parent, readableTail, symbolTail)
+ {
+ Symbol = AXSharp.Connector.Connector.CreateSymbol(parent.Symbol, symbolTail);
+ PreConstruct(parent, readableTail, symbolTail);
+ PostConstruct(parent, readableTail, symbolTail);
+ }
+
+ public async override Task OnlineToPlain()
+ {
+ return await (dynamic)this.OnlineToPlainAsync();
+ }
+
+ public new async Task OnlineToPlainAsync()
+ {
+ global::Pocos.Extended plain = new global::Pocos.Extended();
+ await this.ReadAsync();
+#pragma warning disable CS0612
+ await base._OnlineToPlainNoacAsync(plain);
+#pragma warning restore CS0612
+ return plain;
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public new async Task _OnlineToPlainNoacAsync()
+ {
+ global::Pocos.Extended plain = new global::Pocos.Extended();
+#pragma warning disable CS0612
+ await base._OnlineToPlainNoacAsync(plain);
+#pragma warning restore CS0612
+ return plain;
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ protected async Task _OnlineToPlainNoacAsync(global::Pocos.Extended plain)
+ {
+#pragma warning disable CS0612
+ await base._OnlineToPlainNoacAsync(plain);
+#pragma warning restore CS0612
+ return plain;
+ }
+
+ public async override Task PlainToOnline(T plain)
+ {
+ await this.PlainToOnlineAsync((dynamic)plain);
+ }
+
+ public async Task> PlainToOnlineAsync(global::Pocos.Extended plain)
+ {
+ await base._PlainToOnlineNoacAsync(plain);
+ return await this.WriteAsync();
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `PlainToOnline` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public async Task _PlainToOnlineNoacAsync(global::Pocos.Extended plain)
+ {
+ await base._PlainToOnlineNoacAsync(plain);
+ }
+
+ public async override Task ShadowToPlain()
+ {
+ return await (dynamic)this.ShadowToPlainAsync();
+ }
+
+ public new async Task ShadowToPlainAsync()
+ {
+ global::Pocos.Extended plain = new global::Pocos.Extended();
+ await base.ShadowToPlainAsync(plain);
+ return plain;
+ }
+
+ protected async Task ShadowToPlainAsync(global::Pocos.Extended plain)
+ {
+ await base.ShadowToPlainAsync(plain);
+ return plain;
+ }
+
+ public async override Task PlainToShadow(T plain)
+ {
+ await this.PlainToShadowAsync((dynamic)plain);
+ }
+
+ public async Task> PlainToShadowAsync(global::Pocos.Extended plain)
+ {
+ await base.PlainToShadowAsync(plain);
+ return this.RetrievePrimitives();
+ }
+
+ ///
+ public async override Task AnyChangeAsync(T plain)
+ {
+ return await this.DetectsAnyChangeAsync((dynamic)plain);
+ }
+
+ ///
+ ///Compares if the current plain object has changed from the previous object.This method is used by the framework to determine if the object has changed and needs to be updated.
+ ///[!NOTE] Any member in the hierarchy that is ignored by the compilers (e.g. when CompilerOmitAttribute is used) will not be compared, and therefore will not be detected as changed.
+ ///
+ public new async Task DetectsAnyChangeAsync(global::Pocos.Extended plain, global::Pocos.Extended latest = null)
+ {
+ if (latest == null)
+ latest = await this._OnlineToPlainNoacAsync();
+ var somethingChanged = false;
+ return await Task.Run(async () =>
+ {
+ if (await base.DetectsAnyChangeAsync(plain))
+ return true;
+ plain = latest;
+ return somethingChanged;
+ });
+ }
+
+ public new void Poll()
+ {
+ this.RetrievePrimitives().ToList().ForEach(x => x.Poll());
+ }
+
+ public new global::Pocos.Extended CreateEmptyPoco()
+ {
+ return new global::Pocos.Extended();
+ }
+}
+
+public partial class Extendee : AXSharp.Connector.ITwinObject
+{
+ partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail);
+ partial void PostConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail);
+ public Extendee(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail)
+ {
+ Symbol = AXSharp.Connector.Connector.CreateSymbol(parent.Symbol, symbolTail);
+ this.@SymbolTail = symbolTail;
+ this.@Connector = parent.GetConnector();
+ this.@Parent = parent;
+ HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail);
+ PreConstruct(parent, readableTail, symbolTail);
+ parent.AddChild(this);
+ parent.AddKid(this);
+ PostConstruct(parent, readableTail, symbolTail);
+ }
+
+ public async virtual Task OnlineToPlain()
+ {
+ return await (dynamic)this.OnlineToPlainAsync();
+ }
+
+ public async Task OnlineToPlainAsync()
+ {
+ global::Pocos.Extendee plain = new global::Pocos.Extendee();
+ await this.ReadAsync();
+ return plain;
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public async Task _OnlineToPlainNoacAsync()
+ {
+ global::Pocos.Extendee plain = new global::Pocos.Extendee();
+ return plain;
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ protected async Task _OnlineToPlainNoacAsync(global::Pocos.Extendee plain)
+ {
+ return plain;
+ }
+
+ public async virtual Task PlainToOnline(T plain)
+ {
+ await this.PlainToOnlineAsync((dynamic)plain);
+ }
+
+ public async Task> PlainToOnlineAsync(global::Pocos.Extendee plain)
+ {
+ return await this.WriteAsync();
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `PlainToOnline` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public async Task _PlainToOnlineNoacAsync(global::Pocos.Extendee plain)
+ {
+ }
+
+ public async virtual Task ShadowToPlain()
+ {
+ return await (dynamic)this.ShadowToPlainAsync();
+ }
+
+ public async Task ShadowToPlainAsync()
+ {
+ global::Pocos.Extendee plain = new global::Pocos.Extendee();
+ return plain;
+ }
+
+ protected async Task ShadowToPlainAsync(global::Pocos.Extendee plain)
+ {
+ return plain;
+ }
+
+ public async virtual Task PlainToShadow(T plain)
+ {
+ await this.PlainToShadowAsync((dynamic)plain);
+ }
+
+ public async Task> PlainToShadowAsync(global::Pocos.Extendee plain)
+ {
+ return this.RetrievePrimitives();
+ }
+
+ ///
+ public async virtual Task AnyChangeAsync(T plain)
+ {
+ return await this.DetectsAnyChangeAsync((dynamic)plain);
+ }
+
+ ///
+ ///Compares if the current plain object has changed from the previous object.This method is used by the framework to determine if the object has changed and needs to be updated.
+ ///[!NOTE] Any member in the hierarchy that is ignored by the compilers (e.g. when CompilerOmitAttribute is used) will not be compared, and therefore will not be detected as changed.
+ ///
+ public async Task DetectsAnyChangeAsync(global::Pocos.Extendee plain, global::Pocos.Extendee latest = null)
+ {
+ if (latest == null)
+ latest = await this._OnlineToPlainNoacAsync();
+ var somethingChanged = false;
+ return await Task.Run(async () =>
+ {
+ plain = latest;
+ return somethingChanged;
+ });
+ }
+
+ public void Poll()
+ {
+ this.RetrievePrimitives().ToList().ForEach(x => x.Poll());
+ }
+
+ public global::Pocos.Extendee CreateEmptyPoco()
+ {
+ return new global::Pocos.Extendee();
+ }
+
+ private IList Children { get; } = new List();
+
+ public IEnumerable GetChildren()
+ {
+ return Children;
+ }
+
+ private IList Kids { get; } = new List();
+
+ public IEnumerable GetKids()
+ {
+ return Kids;
+ }
+
+ private IList ValueTags { get; } = new List();
+
+ public IEnumerable GetValueTags()
+ {
+ return ValueTags;
+ }
+
+ public void AddValueTag(AXSharp.Connector.ITwinPrimitive valueTag)
+ {
+ ValueTags.Add(valueTag);
+ }
+
+ public void AddKid(AXSharp.Connector.ITwinElement kid)
+ {
+ Kids.Add(kid);
+ }
+
+ public void AddChild(AXSharp.Connector.ITwinObject twinObject)
+ {
+ Children.Add(twinObject);
+ }
+
+ protected AXSharp.Connector.Connector @Connector { get; }
+
+ public AXSharp.Connector.Connector GetConnector()
+ {
+ return this.@Connector;
+ }
+
+ public string GetSymbolTail()
+ {
+ return this.SymbolTail;
+ }
+
+ public AXSharp.Connector.ITwinObject GetParent()
+ {
+ return this.@Parent;
+ }
+
+ public string Symbol { get; protected set; }
+
+ private string _attributeName;
+ public System.String AttributeName { get => string.IsNullOrEmpty(_attributeName) ? SymbolTail : _attributeName.Interpolate(this).CleanUpLocalizationTokens(); set => _attributeName = value; }
+
+ public System.String GetAttributeName(System.Globalization.CultureInfo culture)
+ {
+ return this.Translate(_attributeName, culture).Interpolate(this);
+ }
+
+ private string _humanReadable;
+ public string HumanReadable { get => string.IsNullOrEmpty(_humanReadable) ? SymbolTail : _humanReadable.Interpolate(this).CleanUpLocalizationTokens(); set => _humanReadable = value; }
+
+ public System.String GetHumanReadable(System.Globalization.CultureInfo culture)
+ {
+ return this.Translate(_humanReadable, culture);
+ }
+
+ protected System.String @SymbolTail { get; set; }
+ protected AXSharp.Connector.ITwinObject @Parent { get; set; }
+ public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance;
+}
\ No newline at end of file
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_extends_and_implements.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_extends_and_implements.g.cs
new file mode 100644
index 000000000..9dfb7fa65
--- /dev/null
+++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_extends_and_implements.g.cs
@@ -0,0 +1,337 @@
+using System;
+using AXSharp.Connector;
+using AXSharp.Connector.ValueTypes;
+using System.Collections.Generic;
+using AXSharp.Connector.Localizations;
+using AXSharp.Abstractions.Presentation;
+
+public partial class ExtendsAndImplements : ExtendeeExtendsAndImplements, IImplementation1, IImplementation2
+{
+ partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail);
+ partial void PostConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail);
+ public ExtendsAndImplements(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail) : base(parent, readableTail, symbolTail)
+ {
+ Symbol = AXSharp.Connector.Connector.CreateSymbol(parent.Symbol, symbolTail);
+ PreConstruct(parent, readableTail, symbolTail);
+ PostConstruct(parent, readableTail, symbolTail);
+ }
+
+ public async override Task OnlineToPlain()
+ {
+ return await (dynamic)this.OnlineToPlainAsync();
+ }
+
+ public new async Task OnlineToPlainAsync()
+ {
+ global::Pocos.ExtendsAndImplements plain = new global::Pocos.ExtendsAndImplements();
+ await this.ReadAsync();
+#pragma warning disable CS0612
+ await base._OnlineToPlainNoacAsync(plain);
+#pragma warning restore CS0612
+ return plain;
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public new async Task _OnlineToPlainNoacAsync()
+ {
+ global::Pocos.ExtendsAndImplements plain = new global::Pocos.ExtendsAndImplements();
+#pragma warning disable CS0612
+ await base._OnlineToPlainNoacAsync(plain);
+#pragma warning restore CS0612
+ return plain;
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ protected async Task _OnlineToPlainNoacAsync(global::Pocos.ExtendsAndImplements plain)
+ {
+#pragma warning disable CS0612
+ await base._OnlineToPlainNoacAsync(plain);
+#pragma warning restore CS0612
+ return plain;
+ }
+
+ public async override Task PlainToOnline(T plain)
+ {
+ await this.PlainToOnlineAsync((dynamic)plain);
+ }
+
+ public async Task> PlainToOnlineAsync(global::Pocos.ExtendsAndImplements plain)
+ {
+ await base._PlainToOnlineNoacAsync(plain);
+ return await this.WriteAsync();
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `PlainToOnline` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public async Task _PlainToOnlineNoacAsync(global::Pocos.ExtendsAndImplements plain)
+ {
+ await base._PlainToOnlineNoacAsync(plain);
+ }
+
+ public async override Task ShadowToPlain()
+ {
+ return await (dynamic)this.ShadowToPlainAsync();
+ }
+
+ public new async Task ShadowToPlainAsync()
+ {
+ global::Pocos.ExtendsAndImplements plain = new global::Pocos.ExtendsAndImplements();
+ await base.ShadowToPlainAsync(plain);
+ return plain;
+ }
+
+ protected async Task ShadowToPlainAsync(global::Pocos.ExtendsAndImplements plain)
+ {
+ await base.ShadowToPlainAsync(plain);
+ return plain;
+ }
+
+ public async override Task PlainToShadow(T plain)
+ {
+ await this.PlainToShadowAsync((dynamic)plain);
+ }
+
+ public async Task> PlainToShadowAsync(global::Pocos.ExtendsAndImplements plain)
+ {
+ await base.PlainToShadowAsync(plain);
+ return this.RetrievePrimitives();
+ }
+
+ ///
+ public async override Task AnyChangeAsync(T plain)
+ {
+ return await this.DetectsAnyChangeAsync((dynamic)plain);
+ }
+
+ ///
+ ///Compares if the current plain object has changed from the previous object.This method is used by the framework to determine if the object has changed and needs to be updated.
+ ///[!NOTE] Any member in the hierarchy that is ignored by the compilers (e.g. when CompilerOmitAttribute is used) will not be compared, and therefore will not be detected as changed.
+ ///
+ public new async Task DetectsAnyChangeAsync(global::Pocos.ExtendsAndImplements plain, global::Pocos.ExtendsAndImplements latest = null)
+ {
+ if (latest == null)
+ latest = await this._OnlineToPlainNoacAsync();
+ var somethingChanged = false;
+ return await Task.Run(async () =>
+ {
+ if (await base.DetectsAnyChangeAsync(plain))
+ return true;
+ plain = latest;
+ return somethingChanged;
+ });
+ }
+
+ public new void Poll()
+ {
+ this.RetrievePrimitives().ToList().ForEach(x => x.Poll());
+ }
+
+ public new global::Pocos.ExtendsAndImplements CreateEmptyPoco()
+ {
+ return new global::Pocos.ExtendsAndImplements();
+ }
+}
+
+public partial class ExtendeeExtendsAndImplements : AXSharp.Connector.ITwinObject
+{
+ partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail);
+ partial void PostConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail);
+ public ExtendeeExtendsAndImplements(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail)
+ {
+ Symbol = AXSharp.Connector.Connector.CreateSymbol(parent.Symbol, symbolTail);
+ this.@SymbolTail = symbolTail;
+ this.@Connector = parent.GetConnector();
+ this.@Parent = parent;
+ HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail);
+ PreConstruct(parent, readableTail, symbolTail);
+ parent.AddChild(this);
+ parent.AddKid(this);
+ PostConstruct(parent, readableTail, symbolTail);
+ }
+
+ public async virtual Task OnlineToPlain()
+ {
+ return await (dynamic)this.OnlineToPlainAsync();
+ }
+
+ public async Task OnlineToPlainAsync()
+ {
+ global::Pocos.ExtendeeExtendsAndImplements plain = new global::Pocos.ExtendeeExtendsAndImplements();
+ await this.ReadAsync();
+ return plain;
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public async Task _OnlineToPlainNoacAsync()
+ {
+ global::Pocos.ExtendeeExtendsAndImplements plain = new global::Pocos.ExtendeeExtendsAndImplements();
+ return plain;
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ protected async Task _OnlineToPlainNoacAsync(global::Pocos.ExtendeeExtendsAndImplements plain)
+ {
+ return plain;
+ }
+
+ public async virtual Task PlainToOnline(T plain)
+ {
+ await this.PlainToOnlineAsync((dynamic)plain);
+ }
+
+ public async Task> PlainToOnlineAsync(global::Pocos.ExtendeeExtendsAndImplements plain)
+ {
+ return await this.WriteAsync();
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `PlainToOnline` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public async Task _PlainToOnlineNoacAsync(global::Pocos.ExtendeeExtendsAndImplements plain)
+ {
+ }
+
+ public async virtual Task ShadowToPlain()
+ {
+ return await (dynamic)this.ShadowToPlainAsync();
+ }
+
+ public async Task ShadowToPlainAsync()
+ {
+ global::Pocos.ExtendeeExtendsAndImplements plain = new global::Pocos.ExtendeeExtendsAndImplements();
+ return plain;
+ }
+
+ protected async Task ShadowToPlainAsync(global::Pocos.ExtendeeExtendsAndImplements plain)
+ {
+ return plain;
+ }
+
+ public async virtual Task PlainToShadow(T plain)
+ {
+ await this.PlainToShadowAsync((dynamic)plain);
+ }
+
+ public async Task> PlainToShadowAsync(global::Pocos.ExtendeeExtendsAndImplements plain)
+ {
+ return this.RetrievePrimitives();
+ }
+
+ ///
+ public async virtual Task AnyChangeAsync(T plain)
+ {
+ return await this.DetectsAnyChangeAsync((dynamic)plain);
+ }
+
+ ///
+ ///Compares if the current plain object has changed from the previous object.This method is used by the framework to determine if the object has changed and needs to be updated.
+ ///[!NOTE] Any member in the hierarchy that is ignored by the compilers (e.g. when CompilerOmitAttribute is used) will not be compared, and therefore will not be detected as changed.
+ ///
+ public async Task DetectsAnyChangeAsync(global::Pocos.ExtendeeExtendsAndImplements plain, global::Pocos.ExtendeeExtendsAndImplements latest = null)
+ {
+ if (latest == null)
+ latest = await this._OnlineToPlainNoacAsync();
+ var somethingChanged = false;
+ return await Task.Run(async () =>
+ {
+ plain = latest;
+ return somethingChanged;
+ });
+ }
+
+ public void Poll()
+ {
+ this.RetrievePrimitives().ToList().ForEach(x => x.Poll());
+ }
+
+ public global::Pocos.ExtendeeExtendsAndImplements CreateEmptyPoco()
+ {
+ return new global::Pocos.ExtendeeExtendsAndImplements();
+ }
+
+ private IList Children { get; } = new List();
+
+ public IEnumerable GetChildren()
+ {
+ return Children;
+ }
+
+ private IList Kids { get; } = new List();
+
+ public IEnumerable GetKids()
+ {
+ return Kids;
+ }
+
+ private IList ValueTags { get; } = new List();
+
+ public IEnumerable GetValueTags()
+ {
+ return ValueTags;
+ }
+
+ public void AddValueTag(AXSharp.Connector.ITwinPrimitive valueTag)
+ {
+ ValueTags.Add(valueTag);
+ }
+
+ public void AddKid(AXSharp.Connector.ITwinElement kid)
+ {
+ Kids.Add(kid);
+ }
+
+ public void AddChild(AXSharp.Connector.ITwinObject twinObject)
+ {
+ Children.Add(twinObject);
+ }
+
+ protected AXSharp.Connector.Connector @Connector { get; }
+
+ public AXSharp.Connector.Connector GetConnector()
+ {
+ return this.@Connector;
+ }
+
+ public string GetSymbolTail()
+ {
+ return this.SymbolTail;
+ }
+
+ public AXSharp.Connector.ITwinObject GetParent()
+ {
+ return this.@Parent;
+ }
+
+ public string Symbol { get; protected set; }
+
+ private string _attributeName;
+ public System.String AttributeName { get => string.IsNullOrEmpty(_attributeName) ? SymbolTail : _attributeName.Interpolate(this).CleanUpLocalizationTokens(); set => _attributeName = value; }
+
+ public System.String GetAttributeName(System.Globalization.CultureInfo culture)
+ {
+ return this.Translate(_attributeName, culture).Interpolate(this);
+ }
+
+ private string _humanReadable;
+ public string HumanReadable { get => string.IsNullOrEmpty(_humanReadable) ? SymbolTail : _humanReadable.Interpolate(this).CleanUpLocalizationTokens(); set => _humanReadable = value; }
+
+ public System.String GetHumanReadable(System.Globalization.CultureInfo culture)
+ {
+ return this.Translate(_humanReadable, culture);
+ }
+
+ protected System.String @SymbolTail { get; set; }
+ protected AXSharp.Connector.ITwinObject @Parent { get; set; }
+ public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance;
+}
+
+public partial interface IImplementation1
+{
+}
+
+public partial interface IImplementation2
+{
+}
\ No newline at end of file
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_generic_extension.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_generic_extension.g.cs
new file mode 100644
index 000000000..ec0ba7beb
--- /dev/null
+++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_generic_extension.g.cs
@@ -0,0 +1,723 @@
+using System;
+using AXSharp.Connector;
+using AXSharp.Connector.ValueTypes;
+using System.Collections.Generic;
+using AXSharp.Connector.Localizations;
+using AXSharp.Abstractions.Presentation;
+
+namespace Generics
+{
+ public partial class Extender : AXSharp.Connector.ITwinObject where TOnline : ITwinObject
+ {
+ partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail);
+ partial void PostConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail);
+ public Extender(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail)
+ {
+ Symbol = AXSharp.Connector.Connector.CreateSymbol(parent.Symbol, symbolTail);
+ this.@SymbolTail = symbolTail;
+ this.@Connector = parent.GetConnector();
+ this.@Parent = parent;
+ HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail);
+ PreConstruct(parent, readableTail, symbolTail);
+ parent.AddChild(this);
+ parent.AddKid(this);
+ PostConstruct(parent, readableTail, symbolTail);
+ }
+
+ public async virtual Task OnlineToPlain()
+ {
+ return await (dynamic)this.OnlineToPlainAsync();
+ }
+
+ public async Task OnlineToPlainAsync()
+ {
+ global::Pocos.Generics.Extender plain = new global::Pocos.Generics.Extender();
+ await this.ReadAsync();
+ return plain;
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public async Task _OnlineToPlainNoacAsync()
+ {
+ global::Pocos.Generics.Extender plain = new global::Pocos.Generics.Extender();
+ return plain;
+ }
+
+ [Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ protected async Task