diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index fbccce399..537e2c097 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -29,7 +29,7 @@ jobs: - name: "Run build script" env: GH_TOKEN : ${{ secrets.GH_TOKEN }} - run: dotnet run --project cake/Build.csproj --do-test true --do-pack true --test-level 2 --do-publish true + run: dotnet run --project cake/Build.csproj --do-test true --do-pack true --test-level 2 --do-publish true --framework net9.0 - name: Test Report uses: dorny/test-reporter@v1 if: success() || failure() diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 7f2e40b7a..09b489d75 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -35,7 +35,7 @@ jobs: - name: "Run build script" env: GH_TOKEN : ${{ secrets.GH_TOKEN }} - run: dotnet run --project cake/Build.csproj --do-test true --do-pack true --test-level 100 --do-publish true --do-publish-release true + run: dotnet run --project cake/Build.csproj --do-test true --do-pack true --test-level 100 --do-publish true --do-publish-release true --framework net9.0 - name: Test Report uses: dorny/test-reporter@v1 if: success() || failure() diff --git a/.github/workflows/pr-dev.yml b/.github/workflows/pr-dev.yml index 6d27cfdf2..dd6a6f0e9 100644 --- a/.github/workflows/pr-dev.yml +++ b/.github/workflows/pr-dev.yml @@ -27,7 +27,7 @@ jobs: run: dotnet build cake/Build.csproj - name: "Run build script" - run: dotnet run --project cake/Build.csproj --do-test true --do-pack true --test-level 1 + run: dotnet run --project cake/Build.csproj --do-test true --do-pack true --test-level 1 --framework net9.0 - name: Test Report uses: dorny/test-reporter@v1 if: success() || failure() diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index be0bb2579..934fb960a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,7 +35,7 @@ jobs: - name: "Run build script" env: GH_TOKEN : ${{ secrets.GH_TOKEN }} - run: dotnet run --project cake/Build.csproj --do-test true --do-pack true --test-level 2 --do-publish true --do-publish-release true + run: dotnet run --project cake/Build.csproj --do-test true --do-pack true --test-level 2 --do-publish true --do-publish-release true --framework net9.0 - name: Test Report uses: dorny/test-reporter@v1 if: success() || failure() diff --git a/src/Directory.Build.props b/Directory.Build.props similarity index 88% rename from src/Directory.Build.props rename to Directory.Build.props index 4e39d4470..4fd88b7c4 100644 --- a/src/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@ - net8.0 + net9.0 diff --git a/src/Directory.Packages.props b/Directory.Packages.props similarity index 56% rename from src/Directory.Packages.props rename to Directory.Packages.props index 8d02745ed..2ea35cf5a 100644 --- a/src/Directory.Packages.props +++ b/Directory.Packages.props @@ -5,58 +5,59 @@ true - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + + + + + + - - - - - + + + + + - - - - + + + - + - - - - - - - + + + + - + - - - - - - - - - - - + + + + + + + + + + + - - - - - + + + + + \ No newline at end of file diff --git a/GitVersion.yml b/GitVersion.yml index 34fa3d313..2334d94b7 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -1,117 +1,54 @@ -assembly-versioning-scheme: MajorMinorPatch -assembly-file-versioning-scheme: MajorMinorPatch -next-version: 0.19.3 -tag-prefix: '[vV]?' -version-in-branch-pattern: (?[vV]?\d+(\.\d+)?(\.\d+)?).* -major-version-bump-message: \+semver:\s?(breaking|major) -minor-version-bump-message: \+semver:\s?(feature|minor) -patch-version-bump-message: \+semver:\s?(fix|patch) -no-bump-message: \+semver:\s?(none|skip) -tag-pre-release-weight: 60000 -commit-date-format: yyyy-MM-dd -merge-message-formats: {} -update-build-number: true -semantic-version-format: Strict -strategies: -- Fallback -- ConfiguredNextVersion -- MergeMessage -- TaggedCommit -- TrackReleaseBranches -- VersionInBranchName +mode: ContinuousDeployment +next-version: 0.20.0 branches: main: - label: '' + regex: ^master$|^main$ + mode: ContinuousDelivery + tag: '' increment: Patch - prevent-increment: - of-merged-branch: true + prevent-increment-of-merged-branch-version: true track-merge-target: false - track-merge-message: true - regex: ^master$|^main$ - source-branches: [] - is-source-branch-for: [] + source-branches: [ 'develop', 'release' ] tracks-release-branches: false is-release-branch: false - is-main-branch: true + is-mainline: true pre-release-weight: 55000 + develop: + regex: ^dev(elop)?(ment)?$ + mode: ContinuousDeployment + tag: alpha + increment: Minor + prevent-increment-of-merged-branch-version: false + track-merge-target: true + source-branches: [] + tracks-release-branches: true + is-release-branch: false + is-mainline: false + pre-release-weight: 0 release: - mode: ManualDeployment - label: beta - increment: Patch - prevent-increment: - of-merged-branch: true - when-branch-merged: false - when-current-commit-tagged: false + regex: ^releases?[/-] + mode: ContinuousDeployment + tag: preview + increment: None + prevent-increment-of-merged-branch-version: true track-merge-target: false - track-merge-message: true - regex: ^releases?[/-](?.+) - source-branches: - - main - is-source-branch-for: [] + source-branches: [ 'develop', 'main', 'support', 'release' ] tracks-release-branches: false is-release-branch: true - is-main-branch: false - pre-release-weight: 30000 - feature: - mode: ManualDeployment - label: '{BranchName}' - increment: Inherit - prevent-increment: - when-current-commit-tagged: false - track-merge-message: true - regex: ^features?[/-](?.+) - source-branches: - - main - - release - is-source-branch-for: [] - is-main-branch: false - pre-release-weight: 30000 - pull-request: + is-mainline: false + pre-release-weight: 30000 + support: + regex: ^support[/-] mode: ContinuousDelivery - label: PullRequest - increment: Inherit - prevent-increment: - of-merged-branch: true - when-current-commit-tagged: false - label-number-pattern: '[/-](?\d+)' - track-merge-message: true - regex: ^(pull|pull\-requests|pr)[/-] - source-branches: - - main - - release - - feature - is-source-branch-for: [] - pre-release-weight: 30000 - unknown: - mode: ManualDeployment - label: '{BranchName}' - increment: Inherit - prevent-increment: - when-current-commit-tagged: false - track-merge-message: false - regex: (?.+) - source-branches: - - main - - release - - feature - - pull-request - is-source-branch-for: [] - is-main-branch: false + tag: '' + increment: Patch + prevent-increment-of-merged-branch-version: true + track-merge-target: false + source-branches: [ 'main' ] + tracks-release-branches: false + is-release-branch: false + is-mainline: true + pre-release-weight: 55000 ignore: sha: [] -mode: ContinuousDelivery -label: '{BranchName}' -increment: Inherit -prevent-increment: - of-merged-branch: false - when-branch-merged: false - when-current-commit-tagged: true -track-merge-target: false -track-merge-message: true -commit-message-incrementing: Enabled -regex: '' -source-branches: [] -is-source-branch-for: [] -tracks-release-branches: false -is-release-branch: false -is-main-branch: false \ No newline at end of file +merge-message-formats: {} diff --git a/build.ps1 b/build.ps1 index 2dcbcf732..e8df803e9 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,3 +1,3 @@ # run build -dotnet run --project cake/Build.csproj -- $args -exit $LASTEXITCODE; \ No newline at end of file +dotnet run --project cake/Build.csproj --framework net9.0 -- $args +exit $LASTEXITCODE;vm43001Jetpow3r \ No newline at end of file diff --git a/cake/Build.csproj b/cake/Build.csproj index 0de3fe35e..0340c6cce 100644 --- a/cake/Build.csproj +++ b/cake/Build.csproj @@ -1,25 +1,22 @@  - Exe - net8.0 + Exe $(MSBuildProjectDirectory) false - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + + + + + + + + + + - + \ No newline at end of file diff --git a/cake/BuildContext.cs b/cake/BuildContext.cs index 606b11574..b084a802f 100644 --- a/cake/BuildContext.cs +++ b/cake/BuildContext.cs @@ -18,7 +18,6 @@ using Cake.Common.Tools.DotNet.Restore; using Cake.Common.Tools.DotNet.Run; using Cake.Common.Tools.DotNet.Test; -using Cake.Common.Tools.DotNetCore.MSBuild; using Cake.Core; using Cake.Core.Diagnostics; using Cake.Core.IO; @@ -85,7 +84,7 @@ public BuildContext(ICakeContext context, BuildParameters buildParameters) DotNetRunSettings = new DotNetRunSettings() { Verbosity = buildParameters.Verbosity, - Framework = "net8.0", + Framework = "net9.0", Configuration = buildParameters.Configuration, NoBuild = true, NoRestore = true, @@ -115,7 +114,7 @@ public void UploadTestPlc(string workingDirectory, string targetIp, this.ProcessRunner.Start(Helpers.GetApaxCommand(), new ProcessSettings() { - Arguments = " apax build", + Arguments = " build", WorkingDirectory = workingDirectory, RedirectStandardOutput = false, RedirectStandardError = false, @@ -128,12 +127,22 @@ public void UploadTestPlc(string workingDirectory, string targetIp, this.ProcessRunner.Start(Helpers.GetApaxCommand(), new ProcessSettings() { - Arguments = - $" sld -t {targetIp} -i {targetPlatform} --accept-security-disclaimer --default-server-interface -r", + Arguments = " download", WorkingDirectory = workingDirectory, RedirectStandardOutput = false, - RedirectStandardError = false + RedirectStandardError = false, + RedirectedStandardOutputHandler = (a) => string.Join(System.Environment.NewLine, a), + Silent = false }).WaitForExit(); + + // this.ProcessRunner.Start(Helpers.GetApaxCommand(), new ProcessSettings() + // { + // Arguments = + // $" sld -t {targetIp} -i {targetPlatform} --accept-security-disclaimer --default-server-interface -r", + // WorkingDirectory = workingDirectory, + // RedirectStandardOutput = false, + // RedirectStandardError = false + // }).WaitForExit(); } public void RunTestsFromFilteredSolution(string filteredSolutionFile) @@ -169,7 +178,7 @@ public void PushNugetPackages(string artifactDirectory) } } - public IEnumerable TargetFrameworks { get; } = new List() { "net8.0" }; + public IEnumerable TargetFrameworks { get; } = new List() { "net9.0" }; public IEnumerable<(string ax, string approject, string solution)> GetTemplateProjects() { diff --git a/cake/Program.cs b/cake/Program.cs index 9681e9ee8..11d4aed74 100644 --- a/cake/Program.cs +++ b/cake/Program.cs @@ -160,31 +160,29 @@ public override void Run(BuildContext context) } - if (context.BuildParameters.TestLevel == 1) + if (context.BuildParameters.TestLevel >= 1) { context.RunTestsFromFilteredSolution(Path.Combine(context.ScrDir, "AXSharp-L1-tests.slnf")); } - else if (context.BuildParameters.TestLevel == 2) + if (context.BuildParameters.TestLevel >= 2) { context.RunTestsFromFilteredSolution(Path.Combine(context.ScrDir, "AXSharp-L2-tests.slnf")); } - else if (context.BuildParameters.TestLevel == 3) - { - context.RunTestsFromFilteredSolution(Path.Combine(context.ScrDir, "AXSharp-L3-tests.slnf")); - } - else + if (context.BuildParameters.TestLevel >= 3) { context.UploadTestPlc( Path.GetFullPath(Path.Combine(context.WorkDirName, "..//..//src//AXSharp.connectors//tests//ax-test-project//")), - Environment.GetEnvironmentVariable("AX_WEBAPI_TARGET"), + Environment.GetEnvironmentVariable("AXTARGET"), Environment.GetEnvironmentVariable("AXTARGETPLATFORMINPUT")); - + + context.RunTestsFromFilteredSolution(Path.Combine(context.ScrDir, "AXSharp-L3-tests_WebApi.slnf")); + context.UploadTestPlc( Path.GetFullPath(Path.Combine(context.WorkDirName, "..//..//src//tests.integrations//integrated//src//ax")), Environment.GetEnvironmentVariable("AXTARGET"), Environment.GetEnvironmentVariable("AXTARGETPLATFORMINPUT")); - - context.RunTestsFromFilteredSolution(Path.Combine(context.ScrDir, "AXSharp-L3-tests.slnf")); + + context.RunTestsFromFilteredSolution(Path.Combine(context.ScrDir, "AXSharp-L3-tests_Integration.slnf")); } diff --git a/global.json b/global.json index 062f5fef3..6f0362aa9 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.100" + "version": "9.0.100" } } \ No newline at end of file diff --git a/src/AXSharp-L3-tests.slnf b/src/AXSharp-L3-tests.slnf deleted file mode 100644 index 26fc668f9..000000000 --- a/src/AXSharp-L3-tests.slnf +++ /dev/null @@ -1,47 +0,0 @@ -{ - "solution": { - "path": "AXSharp.sln", - "projects": [ - "AXSharp.abstractions\\src\\AXSharp.Abstractions\\AXSharp.Abstractions.csproj", - "AXSharp.blazor\\src\\AXSharp.Presentation.Blazor.Controls\\AXSharp.Presentation.Blazor.Controls.csproj", - "AXSharp.blazor\\src\\AXSharp.Presentation.Blazor\\AXSharp.Presentation.Blazor.csproj", - "AXSharp.blazor\\tests\\sandbox\\AXSharp.RenderableContent.Tests\\AXSharp.RenderableContent.Tests.csproj", - "AXSharp.blazor\\tests\\sandbox\\ComponentsExamples\\ComponentsExamples.csproj", - "AXSharp.blazor\\tests\\sandbox\\IxBlazor.App\\IxBlazor.App.csproj", - "AXSharp.blazor\\tests\\sandbox\\ax-blazor-example\\ix\\ax_blazor_example.csproj", - "AXSharp.compiler\\src\\AXSharp.Compiler.Abstractions\\AXSharp.Compiler.Abstractions.csproj", - "AXSharp.compiler\\src\\AXSharp.Compiler\\AXSharp.Compiler.csproj", - "AXSharp.compiler\\src\\AXSharp.Cs.Compiler\\AXSharp.Compiler.Cs.csproj", - "AXSharp.compiler\\src\\ixc\\AXSharp.ixc.csproj", - "AXSharp.compiler\\src\\ixd\\AXSharp.ixd.csproj", - "AXSharp.compiler\\src\\ixr\\AXSharp.ixr.csproj", - "AXSharp.compiler\\tests\\AXSharp.Compiler.CsTests\\AXSharp.Compiler.CsTests.csproj", - "AXSharp.compiler\\tests\\AXSharp.CompilerTests\\AXSharp.CompilerTests.csproj", - "AXSharp.compiler\\tests\\AXSharp.ixc.Tests\\AXSharp.ixc.Tests.csproj", - "AXSharp.compiler\\tests\\AXSharp.ixr.Tests\\AXSharp.ixr.Tests.csproj", - "AXSharp.connectors\\src\\AXSharp.Connector.S71500.WebAPI\\AXSharp.Connector.S71500.WebAPI.csproj", - "AXSharp.connectors\\src\\AXSharp.Connector\\AXSharp.Connector.csproj", - "AXSharp.connectors\\src\\AXSharp.TIA.Connector\\AXSharp.TIA2AXSharp.csproj", - "AXSharp.connectors\\tests\\AXSharp.Connector.Sax.WebAPITests\\AXSharp.Connector.S71500.WebAPITests.csproj", - "AXSharp.connectors\\tests\\AXSharp.ConnectorLegacyTests\\AXSharp.ConnectorLegacyTests.csproj", - "AXSharp.connectors\\tests\\AXSharp.ConnectorTests\\AXSharp.ConnectorTests\\AXSharp.ConnectorTests.csproj", - "AXSharp.connectors\\tests\\AXSharp.TIA.ConnectorTests\\AXSharp.TIA2AXSharpTests_L3.csproj", - "AXSharp.connectors\\tests\\ax-test-project\\ix\\ax_test_project.csproj", - "AXSharp.connectors\\tests\\exploring\\Webserver.Api.Exploratory\\Webserver.Api.Exploratory.csproj", - "AXSharp.connectors\\tests\\exploring\\exploratory.consoleapp\\exploratory.consoleapp.csproj", - "AXSharp.examples\\hello.world.console\\hello.world.console.plc\\ix\\hello.world.console.plc.csproj", - "AXSharp.examples\\hello.world.console\\hello.world.console\\hello.world.console.csproj", - "AXSharp.tools\\src\\AXSharp.LocalizablesToResx\\AXSharp.LocalizablesToResx.csproj", - "AXSharp.tools\\src\\AXSharp.TIA2AXTool\\AXSharp.TIA2AXTool.csproj", - "AXSharp.tools\\src\\AXSharp.nuget.update\\AXSharp.nuget.update.csproj", - "AXSharp.tools\\tests\\AXSharp.LocalizablesToResx.Tests\\AXSharp.LocalizablesToResx.Tests.csproj", - "AXSharp.tools\\tests\\AXSharp.nuget.update.Tests\\AXSharp.nuget.update.Tests.csproj", - "sanbox\\integration\\ix-integration-blazor\\ix-integration-blazor.csproj", - "sanbox\\integration\\ix-integration-library\\ix-integration-library.csproj", - "sanbox\\integration\\ix-integration-plc\\ix\\ix_integration_plc.csproj", - "tests.integrations\\integrated\\src\\integrated.app\\integrated.hmi.csproj", - "tests.integrations\\integrated\\src\\integrated.twin\\integrated.csproj", - "tests.integrations\\integrated\\tests\\integrated.tests\\integrated.tests.csproj" - ] - } -} \ No newline at end of file diff --git a/src/AXSharp-L3-tests_Integration.slnf b/src/AXSharp-L3-tests_Integration.slnf new file mode 100644 index 000000000..723d62fc6 --- /dev/null +++ b/src/AXSharp-L3-tests_Integration.slnf @@ -0,0 +1,10 @@ +{ + "solution": { + "path": "AXSharp.sln", + "projects": [ + "tests.integrations\\integrated\\src\\integrated.app\\integrated.hmi.csproj", + "tests.integrations\\integrated\\src\\integrated.twin\\integrated.csproj", + "tests.integrations\\integrated\\tests\\integrated.tests\\integrated.tests.csproj" + ] + } +} \ No newline at end of file diff --git a/src/AXSharp-L3-tests_WebApi.slnf b/src/AXSharp-L3-tests_WebApi.slnf new file mode 100644 index 000000000..164ac60d1 --- /dev/null +++ b/src/AXSharp-L3-tests_WebApi.slnf @@ -0,0 +1,9 @@ +{ + "solution": { + "path": "AXSharp.sln", + "projects": [ + "AXSharp.connectors\\tests\\AXSharp.Connector.Sax.WebAPITests\\AXSharp.Connector.S71500.WebAPITests.csproj", + "AXSharp.connectors\\tests\\exploring\\Webserver.Api.Exploratory\\Webserver.Api.Exploratory.csproj", + ] + } +} \ No newline at end of file diff --git a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/CsProject.cs b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/CsProject.cs index 238847d15..eda833ff5 100644 --- a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/CsProject.cs +++ b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/CsProject.cs @@ -123,7 +123,7 @@ private void EnsureCsProjFile() var defaultCsProjectWhenNotProvidedByTemplate = $@" - net8.0 + net9.0 enable enable diff --git a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Helpers/CsHelpers.cs b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Helpers/CsHelpers.cs index 1dc2cd069..52fb9f68a 100644 --- a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Helpers/CsHelpers.cs +++ b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Helpers/CsHelpers.cs @@ -59,4 +59,14 @@ public static string CreateGenericSwapperMethodFromPlainer(string methodName, st var qualifier = isExtended ? "override" : "virtual"; return $"public async {qualifier} Task {methodName}(T plain){{\n await this.{methodName}Async((dynamic)plain);\n}}"; } + + /// + /// Gets fully qualified name of poco type for a given type declaration. + /// + /// + /// Fully qualified poco name for given declarations + public static string GetFullyQualifiedPocoName(this IDeclaration declaration) + { + return declaration.ContainingNamespace.FullyQualifiedName == "$GLOBAL" ? $"global::Pocos.{declaration.Name}" : $"{declaration.ContainingNamespace.FullyQualifiedName}.Pocos.{declaration.Name}"; + } } \ No newline at end of file diff --git a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerPlainerOnlineToPlainBuilder.cs b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerPlainerOnlineToPlainBuilder.cs index 3e6e79280..c74863f29 100644 --- a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerPlainerOnlineToPlainBuilder.cs +++ b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerPlainerOnlineToPlainBuilder.cs @@ -17,6 +17,7 @@ using AXSharp.Compiler.Cs.Helpers.Plain; using AXSharp.Connector; + namespace AXSharp.Compiler.Cs.Onliner; internal class CsOnlinerPlainerOnlineToPlainBuilder : ICombinedThreeVisitor @@ -121,16 +122,16 @@ public void AddTypeConstructionParameters(string parametersString) protected static readonly string MethodName = TwinObjectExtensions.OnlineToPlainMethodName; protected static readonly string MethodNameNoac = $"_{TwinObjectExtensions.OnlineToPlainMethodName}Noac"; - + public static CsOnlinerPlainerOnlineToPlainBuilder Create(IxNodeVisitor visitor, IStructuredTypeDeclaration semantics, ISourceBuilder sourceBuilder) { var builder = new CsOnlinerPlainerOnlineToPlainBuilder(sourceBuilder); - builder.AddToSource(CsHelpers.CreateGenericSwapperMethodToPlainer(MethodName, $"Pocos.{semantics.FullyQualifiedName}", false)); + builder.AddToSource(CsHelpers.CreateGenericSwapperMethodToPlainer(MethodName, $"{semantics.GetFullyQualifiedPocoName()}", false)); - builder.AddToSource($"public async Task {MethodName}Async(){{\n"); - builder.AddToSource($"Pocos.{semantics.FullyQualifiedName} plain = new Pocos.{semantics.FullyQualifiedName}();"); + builder.AddToSource($"public async Task<{semantics.GetFullyQualifiedPocoName()}> {MethodName}Async(){{\n"); + builder.AddToSource($"{semantics.GetFullyQualifiedPocoName()} plain = new {semantics.GetFullyQualifiedPocoName()}();"); builder.AddToSource("await this.ReadAsync();"); semantics.Fields.ToList().ForEach(p => p.Accept(visitor, builder)); @@ -142,8 +143,8 @@ public static CsOnlinerPlainerOnlineToPlainBuilder Create(IxNodeVisitor visitor, // Noac method builder.AddToSource($"[Obsolete(\"This method should not be used if you indent to access the controllers data. Use `{MethodName}` instead.\")]"); builder.AddToSource("[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]"); - builder.AddToSource($"public async Task {MethodNameNoac}Async(){{\n"); - builder.AddToSource($"Pocos.{semantics.FullyQualifiedName} plain = new Pocos.{semantics.FullyQualifiedName}();"); + builder.AddToSource($"public async Task<{semantics.GetFullyQualifiedPocoName()}> {MethodNameNoac}Async(){{\n"); + builder.AddToSource($"{semantics.GetFullyQualifiedPocoName()} plain = new {semantics.GetFullyQualifiedPocoName()}();"); semantics.Fields.ToList().ForEach(p => p.Accept(visitor, builder)); builder.AddToSource($"return plain;"); @@ -157,12 +158,12 @@ public static CsOnlinerPlainerOnlineToPlainBuilder Create(IxNodeVisitor visitor, { var builder = new CsOnlinerPlainerOnlineToPlainBuilder(sourceBuilder); - builder.AddToSource(CsHelpers.CreateGenericSwapperMethodToPlainer(MethodName,$"Pocos.{semantics.FullyQualifiedName}", isExtended)); + builder.AddToSource(CsHelpers.CreateGenericSwapperMethodToPlainer(MethodName,$"{semantics.GetFullyQualifiedPocoName()}", isExtended)); var qualifier = isExtended ? "new" : string.Empty; - builder.AddToSource($"public {qualifier} async Task {MethodName}Async(){{\n"); - builder.AddToSource($"Pocos.{semantics.FullyQualifiedName} plain = new Pocos.{semantics.FullyQualifiedName}();"); + builder.AddToSource($"public {qualifier} async Task<{semantics.GetFullyQualifiedPocoName()}> {MethodName}Async(){{\n"); + builder.AddToSource($"{semantics.GetFullyQualifiedPocoName()} plain = new {semantics.GetFullyQualifiedPocoName()}();"); builder.AddToSource("await this.ReadAsync();"); if (isExtended) @@ -180,8 +181,8 @@ public static CsOnlinerPlainerOnlineToPlainBuilder Create(IxNodeVisitor visitor, builder.AddToSource($"[Obsolete(\"This method should not be used if you indent to access the controllers data. Use `{MethodName}` instead.\")]"); builder.AddToSource("[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]"); - builder.AddToSource($"public {qualifier} async Task {MethodNameNoac}Async(){{\n"); - builder.AddToSource($"Pocos.{semantics.FullyQualifiedName} plain = new Pocos.{semantics.FullyQualifiedName}();"); + builder.AddToSource($"public {qualifier} async Task<{semantics.GetFullyQualifiedPocoName()}> {MethodNameNoac}Async(){{\n"); + builder.AddToSource($"{semantics.GetFullyQualifiedPocoName()} plain = new {semantics.GetFullyQualifiedPocoName()}();"); if (isExtended) { diff --git a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerPlainerOnlineToPlainProtectedBuilder.cs b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerPlainerOnlineToPlainProtectedBuilder.cs index cbd9ae027..92c1c7f72 100644 --- a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerPlainerOnlineToPlainProtectedBuilder.cs +++ b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerPlainerOnlineToPlainProtectedBuilder.cs @@ -32,7 +32,7 @@ protected CsOnlinerPlainerOnlineToPlainProtectedBuilder(ISourceBuilder sourceBui ISourceBuilder sourceBuilder) { var builder = new CsOnlinerPlainerOnlineToPlainProtectedBuilder(sourceBuilder); - builder.AddToSource($"protected async Task {MethodName}Async(Pocos.{semantics.FullyQualifiedName} plain){{\n"); + builder.AddToSource($"protected async Task<{semantics.GetFullyQualifiedPocoName()}> {MethodName}Async({semantics.GetFullyQualifiedPocoName()} plain){{\n"); semantics.Fields.ToList().ForEach(p => p.Accept(visitor, builder)); builder.AddToSource($"return plain;"); @@ -49,7 +49,7 @@ protected CsOnlinerPlainerOnlineToPlainProtectedBuilder(ISourceBuilder sourceBui var qualifier = string.Empty; builder.AddToSource($"[Obsolete(\"This method should not be used if you indent to access the controllers data. Use `{MethodName}` instead.\")]"); builder.AddToSource("[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]"); - builder.AddToSource($"protected {qualifier} async Task {MethodNameNoac}Async(Pocos.{semantics.FullyQualifiedName} plain){{\n"); + builder.AddToSource($"protected {qualifier} async Task<{semantics.GetFullyQualifiedPocoName()}> {MethodNameNoac}Async({semantics.GetFullyQualifiedPocoName()} plain){{\n"); if (isExtended) diff --git a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerPlainerPlainToOnlineBuilder.cs b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerPlainerPlainToOnlineBuilder.cs index fd6ca8ec6..0ae642061 100644 --- a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerPlainerPlainToOnlineBuilder.cs +++ b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerPlainerPlainToOnlineBuilder.cs @@ -140,9 +140,9 @@ public static CsOnlinerPlainerPlainToOnlineBuilder Create(IxNodeVisitor visitor, { var builder = new CsOnlinerPlainerPlainToOnlineBuilder(sourceBuilder); - builder.AddToSource(CsHelpers.CreateGenericSwapperMethodFromPlainer(MethodName, $"Pocos.{semantics.FullyQualifiedName}", false)); + builder.AddToSource(CsHelpers.CreateGenericSwapperMethodFromPlainer(MethodName, $"{semantics.GetFullyQualifiedPocoName()}", false)); - builder.AddToSource($"public async Task> {MethodName}Async(Pocos.{semantics.FullyQualifiedName} plain){{\n"); + builder.AddToSource($"public async Task> {MethodName}Async({semantics.GetFullyQualifiedPocoName()} plain){{\n"); semantics.Fields.ToList().ForEach(p => p.Accept(visitor, builder)); @@ -153,7 +153,7 @@ public static CsOnlinerPlainerPlainToOnlineBuilder Create(IxNodeVisitor visitor, // Noac method builder.AddToSource($"[Obsolete(\"This method should not be used if you indent to access the controllers data. Use `{MethodName}` instead.\")]"); builder.AddToSource("[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]"); - builder.AddToSource($"public async Task {MethodNameNoac}Async(Pocos.{semantics.FullyQualifiedName} plain){{\n"); + builder.AddToSource($"public async Task {MethodNameNoac}Async({semantics.GetFullyQualifiedPocoName()} plain){{\n"); semantics.Fields.ToList().ForEach(p => p.Accept(visitor, builder)); @@ -167,12 +167,12 @@ public static CsOnlinerPlainerPlainToOnlineBuilder Create(IxNodeVisitor visitor, { var builder = new CsOnlinerPlainerPlainToOnlineBuilder(sourceBuilder); - builder.AddToSource(CsHelpers.CreateGenericSwapperMethodFromPlainer(MethodName, $"Pocos.{semantics.FullyQualifiedName}", isExtended)); + builder.AddToSource(CsHelpers.CreateGenericSwapperMethodFromPlainer(MethodName, $"{semantics.GetFullyQualifiedPocoName()}", isExtended)); //var qualifier = isExtended ? "new" : string.Empty; var qualifier = string.Empty; - builder.AddToSource($"public {qualifier} async Task> {MethodName}Async(Pocos.{semantics.FullyQualifiedName} plain){{\n"); + builder.AddToSource($"public {qualifier} async Task> {MethodName}Async({semantics.GetFullyQualifiedPocoName()} plain){{\n"); if (isExtended) @@ -189,7 +189,7 @@ public static CsOnlinerPlainerPlainToOnlineBuilder Create(IxNodeVisitor visitor, // Noac method builder.AddToSource($"[Obsolete(\"This method should not be used if you indent to access the controllers data. Use `{MethodName}` instead.\")]"); builder.AddToSource("[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]"); - builder.AddToSource($"public async Task {MethodNameNoac}Async(Pocos.{semantics.FullyQualifiedName} plain){{\n"); + builder.AddToSource($"public async Task {MethodNameNoac}Async({semantics.GetFullyQualifiedPocoName()} plain){{\n"); if (isExtended) { diff --git a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerPlainerPlainToShadowBuilder.cs b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerPlainerPlainToShadowBuilder.cs index e23b1ea69..2121ed017 100644 --- a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerPlainerPlainToShadowBuilder.cs +++ b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerPlainerPlainToShadowBuilder.cs @@ -125,9 +125,9 @@ public static CsOnlinerPlainerPlainToShadowBuilder Create(IxNodeVisitor visitor, { var builder = new CsOnlinerPlainerPlainToShadowBuilder(sourceBuilder); - builder.AddToSource(CsHelpers.CreateGenericSwapperMethodFromPlainer(MethodName, $"Pocos.{semantics.FullyQualifiedName}", false)); + builder.AddToSource(CsHelpers.CreateGenericSwapperMethodFromPlainer(MethodName, $"{semantics.GetFullyQualifiedPocoName()}", false)); - builder.AddToSource($"public async Task> {MethodName}Async(Pocos.{semantics.FullyQualifiedName} plain){{\n"); + builder.AddToSource($"public async Task> {MethodName}Async({semantics.GetFullyQualifiedPocoName()} plain){{\n"); semantics.Fields.ToList().ForEach(p => p.Accept(visitor, builder)); @@ -141,11 +141,11 @@ public static CsOnlinerPlainerPlainToShadowBuilder Create(IxNodeVisitor visitor, { var builder = new CsOnlinerPlainerPlainToShadowBuilder(sourceBuilder); - builder.AddToSource(CsHelpers.CreateGenericSwapperMethodFromPlainer(MethodName, $"Pocos.{semantics.FullyQualifiedName}", isExtended)); + builder.AddToSource(CsHelpers.CreateGenericSwapperMethodFromPlainer(MethodName, $"{semantics.GetFullyQualifiedPocoName()}", isExtended)); //var qualifier = isExtended ? "new" : string.Empty; var qualifier = string.Empty; - builder.AddToSource($"public {qualifier} async Task> {MethodName}Async(Pocos.{semantics.FullyQualifiedName} plain){{\n"); + builder.AddToSource($"public {qualifier} async Task> {MethodName}Async({semantics.GetFullyQualifiedPocoName()} plain){{\n"); if (isExtended) diff --git a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerPlainerShadowToPlainBuilder.cs b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerPlainerShadowToPlainBuilder.cs index 3a0ede03f..f814ddaac 100644 --- a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerPlainerShadowToPlainBuilder.cs +++ b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerPlainerShadowToPlainBuilder.cs @@ -123,10 +123,10 @@ public static CsOnlinerPlainerShadowToPlainBuilder Create(IxNodeVisitor visitor, { var builder = new CsOnlinerPlainerShadowToPlainBuilder(sourceBuilder); - builder.AddToSource(CsHelpers.CreateGenericSwapperMethodToPlainer(MethodName, $"Pocos.{semantics.FullyQualifiedName}", false)); + builder.AddToSource(CsHelpers.CreateGenericSwapperMethodToPlainer(MethodName, $"{semantics.GetFullyQualifiedPocoName()}", false)); - builder.AddToSource($"public async Task {MethodName}Async(){{\n"); - builder.AddToSource($"Pocos.{semantics.FullyQualifiedName} plain = new Pocos.{semantics.FullyQualifiedName}();"); + builder.AddToSource($"public async Task<{semantics.GetFullyQualifiedPocoName()}> {MethodName}Async(){{\n"); + builder.AddToSource($"{semantics.GetFullyQualifiedPocoName()} plain = new {semantics.GetFullyQualifiedPocoName()}();"); semantics.Fields.ToList().ForEach(p => p.Accept(visitor, builder)); @@ -140,12 +140,12 @@ public static CsOnlinerPlainerShadowToPlainBuilder Create(IxNodeVisitor visitor, { var builder = new CsOnlinerPlainerShadowToPlainBuilder(sourceBuilder); - builder.AddToSource(CsHelpers.CreateGenericSwapperMethodToPlainer(MethodName, $"Pocos.{semantics.FullyQualifiedName}", isExtended)); + builder.AddToSource(CsHelpers.CreateGenericSwapperMethodToPlainer(MethodName, $"{semantics.GetFullyQualifiedPocoName()}", isExtended)); var qualifier = isExtended ? "new" : string.Empty; - builder.AddToSource($"public {qualifier} async Task {MethodName}Async(){{\n"); - builder.AddToSource($"Pocos.{semantics.FullyQualifiedName} plain = new Pocos.{semantics.FullyQualifiedName}();"); + builder.AddToSource($"public {qualifier} async Task<{semantics.GetFullyQualifiedPocoName()}> {MethodName}Async(){{\n"); + builder.AddToSource($"{semantics.GetFullyQualifiedPocoName()} plain = new {semantics.GetFullyQualifiedPocoName()}();"); if (isExtended) { diff --git a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerPlainerShadowToPlainProtectedBuilder.cs b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerPlainerShadowToPlainProtectedBuilder.cs index 4c1d98746..1733902c8 100644 --- a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerPlainerShadowToPlainProtectedBuilder.cs +++ b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerPlainerShadowToPlainProtectedBuilder.cs @@ -14,6 +14,7 @@ using System.Text; using System.Threading.Tasks; using AXSharp.Compiler.Core; +using AXSharp.Compiler.Cs.Helpers; namespace AXSharp.Compiler.Cs.Onliner { @@ -30,7 +31,7 @@ protected CsOnlinerPlainerShadowToPlainProtectedBuilder(ISourceBuilder sourceBui ISourceBuilder sourceBuilder) { var builder = new CsOnlinerPlainerShadowToPlainProtectedBuilder(sourceBuilder); - builder.AddToSource($"protected async Task {MethodName}Async(Pocos.{semantics.FullyQualifiedName} plain){{\n"); + builder.AddToSource($"protected async Task<{semantics.GetFullyQualifiedPocoName()}> {MethodName}Async({semantics.GetFullyQualifiedPocoName()} plain){{\n"); semantics.Fields.ToList().ForEach(p => p.Accept(visitor, builder)); builder.AddToSource($"return plain;"); @@ -46,7 +47,7 @@ protected CsOnlinerPlainerShadowToPlainProtectedBuilder(ISourceBuilder sourceBui //var qualifier = isExtended ? "new" : string.Empty; var qualifier = string.Empty; - builder.AddToSource($"protected {qualifier} async Task {MethodName}Async(Pocos.{semantics.FullyQualifiedName} plain){{\n"); + builder.AddToSource($"protected {qualifier} async Task<{semantics.GetFullyQualifiedPocoName()}> {MethodName}Async({semantics.GetFullyQualifiedPocoName()} plain){{\n"); if (isExtended) diff --git a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerSourceBuilder.cs b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerSourceBuilder.cs index bc1556623..f16590e28 100644 --- a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerSourceBuilder.cs +++ b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerSourceBuilder.cs @@ -180,7 +180,7 @@ private void AddPollingMethod(bool isExtended) private void AddCreatePocoMethod(ITypeDeclaration typeDeclaration, bool isExtended) { var qualifier = isExtended ? "new" : string.Empty; - AddToSource($"public {qualifier} Pocos.{typeDeclaration.FullyQualifiedName} CreateEmptyPoco(){{ return new Pocos.{typeDeclaration.FullyQualifiedName}();}}"); + AddToSource($"public {qualifier} {typeDeclaration.GetFullyQualifiedPocoName()} CreateEmptyPoco(){{ return new {typeDeclaration.GetFullyQualifiedPocoName()}();}}"); } /// diff --git a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/HasChangedBuilder/CsOnlinerHasChangedBuilder.cs b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/HasChangedBuilder/CsOnlinerHasChangedBuilder.cs index e7c4d5987..60af3bc76 100644 --- a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/HasChangedBuilder/CsOnlinerHasChangedBuilder.cs +++ b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/HasChangedBuilder/CsOnlinerHasChangedBuilder.cs @@ -123,7 +123,7 @@ public static CsOnlinerHasChangedBuilder Create(IxNodeVisitor visitor, IStructur { var builder = new CsOnlinerHasChangedBuilder(sourceBuilder); - builder.AddToSource(CsHelpers.CreateGenericHasChangedMethodMethod(MethodName, $"Pocos.{semantics.FullyQualifiedName}")); + builder.AddToSource(CsHelpers.CreateGenericHasChangedMethodMethod(MethodName, $"{semantics.GetFullyQualifiedPocoName()}")); builder.AddToSource("///\n"); builder.AddToSource("///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.\n"); @@ -131,7 +131,7 @@ public static CsOnlinerHasChangedBuilder Create(IxNodeVisitor visitor, IStructur builder.AddToSource("///\n"); - builder.AddToSource($"public async Task {MethodName}(Pocos.{semantics.FullyQualifiedName} plain, Pocos.{semantics.FullyQualifiedName} latest = null){{\n"); + builder.AddToSource($"public async Task {MethodName}({semantics.GetFullyQualifiedPocoName()} plain, {semantics.GetFullyQualifiedPocoName()} latest = null){{\n"); builder.AddToSource("var somethingChanged = false;"); builder.AddToSource("if(latest == null) latest = await this._OnlineToPlainNoacAsync();"); builder.AddToSource("return await Task.Run(async () => {\n"); @@ -148,7 +148,7 @@ public static CsOnlinerHasChangedBuilder Create(IxNodeVisitor visitor, IClassDec { var builder = new CsOnlinerHasChangedBuilder(sourceBuilder); - builder.AddToSource(CsHelpers.CreateGenericHasChangedMethodMethod(MethodName, $"Pocos.{semantics.FullyQualifiedName}", isExtended)); + builder.AddToSource(CsHelpers.CreateGenericHasChangedMethodMethod(MethodName, $"{semantics.GetFullyQualifiedPocoName()}", isExtended)); var qualifier = isExtended ? "new" : string.Empty; @@ -156,7 +156,7 @@ public static CsOnlinerHasChangedBuilder Create(IxNodeVisitor visitor, IClassDec builder.AddToSource("///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.\n"); builder.AddToSource("///[!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.\n"); builder.AddToSource("///\n"); - builder.AddToSource($"public {qualifier} async Task {MethodName}(Pocos.{semantics.FullyQualifiedName} plain, Pocos.{semantics.FullyQualifiedName} latest = null){{\n"); + builder.AddToSource($"public {qualifier} async Task {MethodName}({semantics.GetFullyQualifiedPocoName()} plain, {semantics.GetFullyQualifiedPocoName()} latest = null){{\n"); builder.AddToSource("if(latest == null) latest = await this._OnlineToPlainNoacAsync();"); builder.AddToSource("var somethingChanged = false;"); diff --git a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Plain/CsPlainConstructorBuilder.cs b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Plain/CsPlainConstructorBuilder.cs index 34a8c28ef..571fff8b3 100644 --- a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Plain/CsPlainConstructorBuilder.cs +++ b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Plain/CsPlainConstructorBuilder.cs @@ -36,7 +36,7 @@ protected CsPlainConstructorBuilder(ISourceBuilder sourceBuilder) public void CreateClassDeclaration(IClassDeclaration classDeclaration, IxNodeVisitor visitor) { - AddToSource($"{classDeclaration.GetQualifiedName()}"); + AddToSource($"{classDeclaration.GetFullyQualifiedPocoName()}"); } public void CreateReferenceToDeclaration(IReferenceTypeDeclaration referenceTypeDeclaration, IxNodeVisitor visitor) @@ -61,7 +61,7 @@ public void CreateStringTypeDeclaration(IStringTypeDeclaration stringTypeDeclara public void CreateStructuredType(IStructuredTypeDeclaration structuredTypeDeclaration, IxNodeVisitor visitor) { - AddToSource($"{structuredTypeDeclaration.GetQualifiedName()}"); + AddToSource($"{structuredTypeDeclaration.GetFullyQualifiedPocoName()}"); } public void CreateFieldDeclaration(IFieldDeclaration fieldDeclaration, IxNodeVisitor visitor) 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 7af3e64db..7a065e1bd 100644 --- a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Plain/CsPlainSourceBuilder.cs +++ b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Plain/CsPlainSourceBuilder.cs @@ -67,6 +67,9 @@ public void CreateClassDeclaration(IClassDeclarationSyntax classDeclarationSynta TypeCommAccessibility = eCommAccessibility.ReadOnly; } + + AddToSource($"namespace Pocos{{"); + classDeclarationSyntax.UsingDirectives.ToList().ForEach(p => p.Visit(visitor, this)); var classDeclarations = this.Compilation.GetSemanticTree().Classes @@ -79,7 +82,7 @@ public void CreateClassDeclaration(IClassDeclarationSyntax classDeclarationSynta .Any(p => p.FullyQualifiedName == classDeclaration.ExtendedTypeAccesses.FirstOrDefault()?.Type.FullyQualifiedName); if (isExtended) - AddToSource($" : {classDeclaration.ExtendedTypeAccesses.FirstOrDefault()?.Type.FullyQualifiedName}"); + AddToSource($" : {classDeclaration.ExtendedTypeAccesses.FirstOrDefault()?.Type.GetFullyQualifiedPocoName()}"); @@ -98,6 +101,8 @@ public void CreateClassDeclaration(IClassDeclarationSyntax classDeclarationSynta classDeclarationSyntax.UsingDirectives.ToList().ForEach(p => p.Visit(visitor, this)); classDeclaration.Fields.ToList().ForEach(p => p.Accept(visitor, this)); AddToSource("}"); + + AddToSource("}"); // Close namespace } /// @@ -195,11 +200,9 @@ public void CreateFile(IFileSyntax fileSyntax, IxNodeVisitor visitor) fileSyntax.UsingDirectives .Where(p => this.Compilation.GetSemanticTree().Namespaces.Select(p => p.FullyQualifiedName).Contains(p.QualifiedIdentifierList.GetText()))) { - AddToSource($"using Pocos.{fileSyntaxUsingDirective.QualifiedIdentifierList.GetText()};"); + AddToSource($"using {fileSyntaxUsingDirective.QualifiedIdentifierList.GetText()}.Pocos;"); } - AddToSource("namespace Pocos {"); fileSyntax.Declarations.ToList().ForEach(p => p.Visit(visitor, this)); - AddToSource("}"); } /// @@ -209,9 +212,19 @@ public void CreateConfigDeclaration(IConfigDeclarationSyntax configDeclarationSy { TypeCommAccessibility = eCommAccessibility.None; + if (configurationDeclaration.ContainingNamespace.FullyQualifiedName != "$GLOBAL") + { + AddToSource($"namespace {configurationDeclaration.ContainingNamespace.FullyQualifiedName}.Pocos{{"); + } + else + { + AddToSource($"namespace Pocos{{"); + } + AddToSource($"public partial class {Project.TargetProject.ProjectRootNamespace}TwinController{{"); configurationDeclaration.Variables.ToList().ForEach(p => p.Accept(visitor, this)); AddToSource("}"); + AddToSource("}");// closing namespace } /// @@ -320,7 +333,9 @@ public void CreateStructuredType(IStructTypeDeclarationSyntax structTypeDeclarat IxNodeVisitor visitor) { TypeCommAccessibility = structuredTypeDeclaration.GetCommAccessibility(this); - + + AddToSource($"namespace Pocos{{"); + AddToSource( $"{structuredTypeDeclaration.AccessModifier.Transform()}partial class {structTypeDeclarationSyntax.Name.Text} : AXSharp.Connector.IPlain"); AddToSource("{"); @@ -329,6 +344,8 @@ public void CreateStructuredType(IStructTypeDeclarationSyntax structTypeDeclarat structuredTypeDeclaration.Fields.ToList().ForEach(p => p.Accept(visitor, this)); AddToSource("}"); + + AddToSource("}"); // namespace closing } /// @@ -352,13 +369,13 @@ public void CreateScalarTypeDeclaration(IScalarTypeDeclaration scalarTypeDeclara /// public void CreateClassDeclaration(IClassDeclaration classDeclaration, IxNodeVisitor data) { - AddToSource(classDeclaration.GetQualifiedName()); + AddToSource(classDeclaration.GetFullyQualifiedPocoName()); } /// public void CreateInterfaceDeclaration(IInterfaceDeclaration interfaceDeclaration, IxNodeVisitor visitor) { - AddToSource(interfaceDeclaration.GetQualifiedName()); + AddToSource(interfaceDeclaration.GetFullyQualifiedPocoName()); } /// @@ -387,7 +404,7 @@ public void CreateStringTypeDeclaration(IStringTypeDeclaration stringTypeDeclara public void CreateStructuredType(IStructuredTypeDeclaration structuredTypeDeclaration, IxNodeVisitor visitor) { structuredTypeDeclaration.Pragmas.ToList().ForEach(p => p.Accept(visitor, this)); - AddToSource($"{structuredTypeDeclaration.GetQualifiedName()}"); + AddToSource($"{structuredTypeDeclaration.GetFullyQualifiedPocoName()}"); } /// diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/DisplayNameOrderer.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/DisplayNameOrderer.cs index 59018b41a..5537d2627 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/DisplayNameOrderer.cs +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/DisplayNameOrderer.cs @@ -7,7 +7,7 @@ using Xunit.Abstractions; -[assembly: TestCollectionOrderer("AXSharp.CompilerTests.DisplayNameOrderer", "AXSharp.CompilerTests")] +[assembly: TestCollectionOrderer("AXSharp.Compiler.CsTests.DisplayNameOrderer", "AXSharp.Compiler.CsTests")] [assembly: CollectionBehavior(DisableTestParallelization = true)] namespace AXSharp.Compiler.CsTests; 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/.g/Onliners/abstract_members.g.cs index 750f4f2fc..2736ecbe1 100644 --- 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/.g/Onliners/abstract_members.g.cs @@ -8,7 +8,6 @@ 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); @@ -33,9 +32,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.AbstractMotor plain = new Pocos.AbstractMotor(); + global::Pocos.AbstractMotor plain = new global::Pocos.AbstractMotor(); await this.ReadAsync(); plain.Run = Run.LastValue; plain.ReverseDirection = ReverseDirection.LastValue; @@ -44,9 +43,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.AbstractMotor plain = new Pocos.AbstractMotor(); + global::Pocos.AbstractMotor plain = new global::Pocos.AbstractMotor(); plain.Run = Run.LastValue; plain.ReverseDirection = ReverseDirection.LastValue; return plain; @@ -54,7 +53,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.AbstractMotor plain) + protected async Task _OnlineToPlainNoacAsync(global::Pocos.AbstractMotor plain) { plain.Run = Run.LastValue; plain.ReverseDirection = ReverseDirection.LastValue; @@ -66,7 +65,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.AbstractMotor plain) + public async Task> PlainToOnlineAsync(global::Pocos.AbstractMotor plain) { #pragma warning disable CS0612 Run.LethargicWrite(plain.Run); @@ -79,7 +78,7 @@ public async Task> PlainToOnlineAsync(Pocos.Abstract [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(Pocos.AbstractMotor plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.AbstractMotor plain) { #pragma warning disable CS0612 Run.LethargicWrite(plain.Run); @@ -94,15 +93,15 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.AbstractMotor plain = new Pocos.AbstractMotor(); + global::Pocos.AbstractMotor plain = new global::Pocos.AbstractMotor(); plain.Run = Run.Shadow; plain.ReverseDirection = ReverseDirection.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.AbstractMotor plain) + protected async Task ShadowToPlainAsync(global::Pocos.AbstractMotor plain) { plain.Run = Run.Shadow; plain.ReverseDirection = ReverseDirection.Shadow; @@ -114,7 +113,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.AbstractMotor plain) + public async Task> PlainToShadowAsync(global::Pocos.AbstractMotor plain) { Run.Shadow = plain.Run; ReverseDirection.Shadow = plain.ReverseDirection; @@ -131,7 +130,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.AbstractMotor plain, Pocos.AbstractMotor latest = null) + public async Task DetectsAnyChangeAsync(global::Pocos.AbstractMotor plain, global::Pocos.AbstractMotor latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -152,24 +151,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.AbstractMotor CreateEmptyPoco() + public global::Pocos.AbstractMotor CreateEmptyPoco() { - return new Pocos.AbstractMotor(); + 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; @@ -226,8 +228,6 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/array_declaration.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/array_declaration.g.cs index 63044eae5..bbe1e56be 100644 --- 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/.g/Onliners/array_declaration.g.cs @@ -10,7 +10,6 @@ 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); @@ -37,9 +36,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain = new Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class(); + ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain = new ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class(); await this.ReadAsync(); plain.primitive = primitive.Select(p => p.LastValue).ToArray(); #pragma warning disable CS0612 @@ -50,9 +49,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain = new Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class(); + ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain = new ArrayDeclarationSimpleNamespace.Pocos.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(); @@ -62,7 +61,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain) + protected async Task _OnlineToPlainNoacAsync(ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain) { plain.primitive = primitive.Select(p => p.LastValue).ToArray(); #pragma warning disable CS0612 @@ -76,7 +75,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain) + public async Task> PlainToOnlineAsync(ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain) { var _primitive_i_FE8484DAB3 = 0; #pragma warning disable CS0612 @@ -91,7 +90,7 @@ public async Task> PlainToOnlineAsync(Pocos.ArrayDec [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(Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain) + public async Task _PlainToOnlineNoacAsync(ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain) { var _primitive_i_FE8484DAB3 = 0; #pragma warning disable CS0612 @@ -108,15 +107,15 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain = new Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class(); + ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain = new ArrayDeclarationSimpleNamespace.Pocos.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(Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain) + protected async Task ShadowToPlainAsync(ArrayDeclarationSimpleNamespace.Pocos.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(); @@ -128,7 +127,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain) + public async Task> PlainToShadowAsync(ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain) { var _primitive_i_FE8484DAB3 = 0; primitive.Select(p => p.Shadow = plain.primitive[_primitive_i_FE8484DAB3++]).ToArray(); @@ -147,7 +146,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain, Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class latest = null) + public async Task DetectsAnyChangeAsync(ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain, ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -176,24 +175,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class CreateEmptyPoco() + public ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class CreateEmptyPoco() { - return new Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class(); + return new ArrayDeclarationSimpleNamespace.Pocos.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; @@ -250,9 +252,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } @@ -278,24 +278,24 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain = new Pocos.ArrayDeclarationSimpleNamespace.some_complex_type(); + ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain = new ArrayDeclarationSimpleNamespace.Pocos.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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain = new Pocos.ArrayDeclarationSimpleNamespace.some_complex_type(); + ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain = new ArrayDeclarationSimpleNamespace.Pocos.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(Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain) + protected async Task _OnlineToPlainNoacAsync(ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain) { return plain; } @@ -305,14 +305,14 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain) + public async Task> PlainToOnlineAsync(ArrayDeclarationSimpleNamespace.Pocos.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(Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain) + public async Task _PlainToOnlineNoacAsync(ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain) { } @@ -321,13 +321,13 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain = new Pocos.ArrayDeclarationSimpleNamespace.some_complex_type(); + ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain = new ArrayDeclarationSimpleNamespace.Pocos.some_complex_type(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain) + protected async Task ShadowToPlainAsync(ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain) { return plain; } @@ -337,7 +337,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain) + public async Task> PlainToShadowAsync(ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain) { return this.RetrievePrimitives(); } @@ -352,7 +352,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain, Pocos.ArrayDeclarationSimpleNamespace.some_complex_type latest = null) + public async Task DetectsAnyChangeAsync(ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain, ArrayDeclarationSimpleNamespace.Pocos.some_complex_type latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -369,24 +369,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.ArrayDeclarationSimpleNamespace.some_complex_type CreateEmptyPoco() + public ArrayDeclarationSimpleNamespace.Pocos.some_complex_type CreateEmptyPoco() { - return new Pocos.ArrayDeclarationSimpleNamespace.some_complex_type(); + return new ArrayDeclarationSimpleNamespace.Pocos.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; @@ -443,9 +446,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/class_all_primitives.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_all_primitives.g.cs index cf0032ca1..a6bd7f84b 100644 --- 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/.g/Onliners/class_all_primitives.g.cs @@ -8,47 +8,26 @@ 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); @@ -93,9 +72,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.class_all_primitives plain = new Pocos.class_all_primitives(); + global::Pocos.class_all_primitives plain = new global::Pocos.class_all_primitives(); await this.ReadAsync(); plain.myBOOL = myBOOL.LastValue; plain.myBYTE = myBYTE.LastValue; @@ -124,9 +103,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.class_all_primitives plain = new Pocos.class_all_primitives(); + global::Pocos.class_all_primitives plain = new global::Pocos.class_all_primitives(); plain.myBOOL = myBOOL.LastValue; plain.myBYTE = myBYTE.LastValue; plain.myWORD = myWORD.LastValue; @@ -154,7 +133,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.class_all_primitives plain) + protected async Task _OnlineToPlainNoacAsync(global::Pocos.class_all_primitives plain) { plain.myBOOL = myBOOL.LastValue; plain.myBYTE = myBYTE.LastValue; @@ -186,7 +165,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.class_all_primitives plain) + public async Task> PlainToOnlineAsync(global::Pocos.class_all_primitives plain) { #pragma warning disable CS0612 myBOOL.LethargicWrite(plain.myBOOL); @@ -259,7 +238,7 @@ public async Task> PlainToOnlineAsync(Pocos.class_al [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(Pocos.class_all_primitives plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.class_all_primitives plain) { #pragma warning disable CS0612 myBOOL.LethargicWrite(plain.myBOOL); @@ -334,9 +313,9 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.class_all_primitives plain = new Pocos.class_all_primitives(); + global::Pocos.class_all_primitives plain = new global::Pocos.class_all_primitives(); plain.myBOOL = myBOOL.Shadow; plain.myBYTE = myBYTE.Shadow; plain.myWORD = myWORD.Shadow; @@ -362,7 +341,7 @@ public async virtual Task ShadowToPlain() return plain; } - protected async Task ShadowToPlainAsync(Pocos.class_all_primitives plain) + protected async Task ShadowToPlainAsync(global::Pocos.class_all_primitives plain) { plain.myBOOL = myBOOL.Shadow; plain.myBYTE = myBYTE.Shadow; @@ -394,7 +373,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.class_all_primitives plain) + public async Task> PlainToShadowAsync(global::Pocos.class_all_primitives plain) { myBOOL.Shadow = plain.myBOOL; myBYTE.Shadow = plain.myBYTE; @@ -431,7 +410,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.class_all_primitives plain, Pocos.class_all_primitives latest = null) + public async Task DetectsAnyChangeAsync(global::Pocos.class_all_primitives plain, global::Pocos.class_all_primitives latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -492,24 +471,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.class_all_primitives CreateEmptyPoco() + public global::Pocos.class_all_primitives CreateEmptyPoco() { - return new Pocos.class_all_primitives(); + 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; @@ -566,8 +548,6 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/class_extended_by_known_type.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_extended_by_known_type.g.cs index 9a60d6bf3..17b37b6e7 100644 --- 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/.g/Onliners/class_extended_by_known_type.g.cs @@ -23,9 +23,9 @@ public async override Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public new async Task OnlineToPlainAsync() + public new async Task OnlineToPlainAsync() { - Pocos.Simatic.Ax.StateFramework.State1Transition plain = new Pocos.Simatic.Ax.StateFramework.State1Transition(); + Simatic.Ax.StateFramework.Pocos.State1Transition plain = new Simatic.Ax.StateFramework.Pocos.State1Transition(); await this.ReadAsync(); #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); @@ -35,9 +35,9 @@ public async override Task OnlineToPlain() [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() + public new async Task _OnlineToPlainNoacAsync() { - Pocos.Simatic.Ax.StateFramework.State1Transition plain = new Pocos.Simatic.Ax.StateFramework.State1Transition(); + Simatic.Ax.StateFramework.Pocos.State1Transition plain = new Simatic.Ax.StateFramework.Pocos.State1Transition(); #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); #pragma warning restore CS0612 @@ -46,7 +46,7 @@ public async override Task OnlineToPlain() [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(Pocos.Simatic.Ax.StateFramework.State1Transition plain) + protected async Task _OnlineToPlainNoacAsync(Simatic.Ax.StateFramework.Pocos.State1Transition plain) { #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); @@ -59,7 +59,7 @@ public async override Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.Simatic.Ax.StateFramework.State1Transition plain) + public async Task> PlainToOnlineAsync(Simatic.Ax.StateFramework.Pocos.State1Transition plain) { await base._PlainToOnlineNoacAsync(plain); return await this.WriteAsync(); @@ -67,7 +67,7 @@ public async Task> PlainToOnlineAsync(Pocos.Simatic. [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(Pocos.Simatic.Ax.StateFramework.State1Transition plain) + public async Task _PlainToOnlineNoacAsync(Simatic.Ax.StateFramework.Pocos.State1Transition plain) { await base._PlainToOnlineNoacAsync(plain); } @@ -77,14 +77,14 @@ public async override Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public new async Task ShadowToPlainAsync() + public new async Task ShadowToPlainAsync() { - Pocos.Simatic.Ax.StateFramework.State1Transition plain = new Pocos.Simatic.Ax.StateFramework.State1Transition(); + Simatic.Ax.StateFramework.Pocos.State1Transition plain = new Simatic.Ax.StateFramework.Pocos.State1Transition(); await base.ShadowToPlainAsync(plain); return plain; } - protected async Task ShadowToPlainAsync(Pocos.Simatic.Ax.StateFramework.State1Transition plain) + protected async Task ShadowToPlainAsync(Simatic.Ax.StateFramework.Pocos.State1Transition plain) { await base.ShadowToPlainAsync(plain); return plain; @@ -95,7 +95,7 @@ public async override Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.Simatic.Ax.StateFramework.State1Transition plain) + public async Task> PlainToShadowAsync(Simatic.Ax.StateFramework.Pocos.State1Transition plain) { await base.PlainToShadowAsync(plain); return this.RetrievePrimitives(); @@ -111,7 +111,7 @@ public async override Task AnyChangeAsync(T 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(Pocos.Simatic.Ax.StateFramework.State1Transition plain, Pocos.Simatic.Ax.StateFramework.State1Transition latest = null) + public new async Task DetectsAnyChangeAsync(Simatic.Ax.StateFramework.Pocos.State1Transition plain, Simatic.Ax.StateFramework.Pocos.State1Transition latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -130,9 +130,9 @@ public async override Task AnyChangeAsync(T plain) this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public new Pocos.Simatic.Ax.StateFramework.State1Transition CreateEmptyPoco() + public new Simatic.Ax.StateFramework.Pocos.State1Transition CreateEmptyPoco() { - return new Pocos.Simatic.Ax.StateFramework.State1Transition(); + return new Simatic.Ax.StateFramework.Pocos.State1Transition(); } } } @@ -142,7 +142,6 @@ 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); @@ -167,9 +166,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.Simatic.Ax.StateFramework.AbstractState plain = new Pocos.Simatic.Ax.StateFramework.AbstractState(); + Simatic.Ax.StateFramework.Pocos.AbstractState plain = new Simatic.Ax.StateFramework.Pocos.AbstractState(); await this.ReadAsync(); plain.StateID = StateID.LastValue; plain.StateName = StateName.LastValue; @@ -178,9 +177,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.Simatic.Ax.StateFramework.AbstractState plain = new Pocos.Simatic.Ax.StateFramework.AbstractState(); + Simatic.Ax.StateFramework.Pocos.AbstractState plain = new Simatic.Ax.StateFramework.Pocos.AbstractState(); plain.StateID = StateID.LastValue; plain.StateName = StateName.LastValue; return plain; @@ -188,7 +187,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.Simatic.Ax.StateFramework.AbstractState plain) + protected async Task _OnlineToPlainNoacAsync(Simatic.Ax.StateFramework.Pocos.AbstractState plain) { plain.StateID = StateID.LastValue; plain.StateName = StateName.LastValue; @@ -200,7 +199,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.Simatic.Ax.StateFramework.AbstractState plain) + public async Task> PlainToOnlineAsync(Simatic.Ax.StateFramework.Pocos.AbstractState plain) { #pragma warning disable CS0612 StateID.LethargicWrite(plain.StateID); @@ -213,7 +212,7 @@ public async Task> PlainToOnlineAsync(Pocos.Simatic. [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(Pocos.Simatic.Ax.StateFramework.AbstractState plain) + public async Task _PlainToOnlineNoacAsync(Simatic.Ax.StateFramework.Pocos.AbstractState plain) { #pragma warning disable CS0612 StateID.LethargicWrite(plain.StateID); @@ -228,15 +227,15 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.Simatic.Ax.StateFramework.AbstractState plain = new Pocos.Simatic.Ax.StateFramework.AbstractState(); + Simatic.Ax.StateFramework.Pocos.AbstractState plain = new Simatic.Ax.StateFramework.Pocos.AbstractState(); plain.StateID = StateID.Shadow; plain.StateName = StateName.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.Simatic.Ax.StateFramework.AbstractState plain) + protected async Task ShadowToPlainAsync(Simatic.Ax.StateFramework.Pocos.AbstractState plain) { plain.StateID = StateID.Shadow; plain.StateName = StateName.Shadow; @@ -248,7 +247,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.Simatic.Ax.StateFramework.AbstractState plain) + public async Task> PlainToShadowAsync(Simatic.Ax.StateFramework.Pocos.AbstractState plain) { StateID.Shadow = plain.StateID; StateName.Shadow = plain.StateName; @@ -265,7 +264,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.Simatic.Ax.StateFramework.AbstractState plain, Pocos.Simatic.Ax.StateFramework.AbstractState latest = null) + public async Task DetectsAnyChangeAsync(Simatic.Ax.StateFramework.Pocos.AbstractState plain, Simatic.Ax.StateFramework.Pocos.AbstractState latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -286,24 +285,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.Simatic.Ax.StateFramework.AbstractState CreateEmptyPoco() + public Simatic.Ax.StateFramework.Pocos.AbstractState CreateEmptyPoco() { - return new Pocos.Simatic.Ax.StateFramework.AbstractState(); + return new Simatic.Ax.StateFramework.Pocos.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; @@ -360,9 +362,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/class_extends.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_extends.g.cs index 69b20124e..b2d2560a8 100644 --- 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/.g/Onliners/class_extends.g.cs @@ -21,9 +21,9 @@ public async override Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public new async Task OnlineToPlainAsync() + public new async Task OnlineToPlainAsync() { - Pocos.Extended plain = new Pocos.Extended(); + global::Pocos.Extended plain = new global::Pocos.Extended(); await this.ReadAsync(); #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); @@ -33,9 +33,9 @@ public async override Task OnlineToPlain() [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() + public new async Task _OnlineToPlainNoacAsync() { - Pocos.Extended plain = new Pocos.Extended(); + global::Pocos.Extended plain = new global::Pocos.Extended(); #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); #pragma warning restore CS0612 @@ -44,7 +44,7 @@ public async override Task OnlineToPlain() [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(Pocos.Extended plain) + protected async Task _OnlineToPlainNoacAsync(global::Pocos.Extended plain) { #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); @@ -57,7 +57,7 @@ public async override Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.Extended plain) + public async Task> PlainToOnlineAsync(global::Pocos.Extended plain) { await base._PlainToOnlineNoacAsync(plain); return await this.WriteAsync(); @@ -65,7 +65,7 @@ public async Task> PlainToOnlineAsync(Pocos.Extended [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(Pocos.Extended plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.Extended plain) { await base._PlainToOnlineNoacAsync(plain); } @@ -75,14 +75,14 @@ public async override Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public new async Task ShadowToPlainAsync() + public new async Task ShadowToPlainAsync() { - Pocos.Extended plain = new Pocos.Extended(); + global::Pocos.Extended plain = new global::Pocos.Extended(); await base.ShadowToPlainAsync(plain); return plain; } - protected async Task ShadowToPlainAsync(Pocos.Extended plain) + protected async Task ShadowToPlainAsync(global::Pocos.Extended plain) { await base.ShadowToPlainAsync(plain); return plain; @@ -93,7 +93,7 @@ public async override Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.Extended plain) + public async Task> PlainToShadowAsync(global::Pocos.Extended plain) { await base.PlainToShadowAsync(plain); return this.RetrievePrimitives(); @@ -109,7 +109,7 @@ public async override Task AnyChangeAsync(T 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(Pocos.Extended plain, Pocos.Extended latest = null) + public new async Task DetectsAnyChangeAsync(global::Pocos.Extended plain, global::Pocos.Extended latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -128,9 +128,9 @@ public async override Task AnyChangeAsync(T plain) this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public new Pocos.Extended CreateEmptyPoco() + public new global::Pocos.Extended CreateEmptyPoco() { - return new Pocos.Extended(); + return new global::Pocos.Extended(); } } @@ -156,24 +156,24 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.Extendee plain = new Pocos.Extendee(); + 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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.Extendee plain = new Pocos.Extendee(); + 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(Pocos.Extendee plain) + protected async Task _OnlineToPlainNoacAsync(global::Pocos.Extendee plain) { return plain; } @@ -183,14 +183,14 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.Extendee 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(Pocos.Extendee plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.Extendee plain) { } @@ -199,13 +199,13 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.Extendee plain = new Pocos.Extendee(); + global::Pocos.Extendee plain = new global::Pocos.Extendee(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.Extendee plain) + protected async Task ShadowToPlainAsync(global::Pocos.Extendee plain) { return plain; } @@ -215,7 +215,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.Extendee plain) + public async Task> PlainToShadowAsync(global::Pocos.Extendee plain) { return this.RetrievePrimitives(); } @@ -230,7 +230,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.Extendee plain, Pocos.Extendee latest = null) + public async Task DetectsAnyChangeAsync(global::Pocos.Extendee plain, global::Pocos.Extendee latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -247,24 +247,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.Extendee CreateEmptyPoco() + public global::Pocos.Extendee CreateEmptyPoco() { - return new Pocos.Extendee(); + 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; @@ -321,8 +324,6 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/class_extends_and_implements.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_extends_and_implements.g.cs index 93c35a3fa..9dfb7fa65 100644 --- 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/.g/Onliners/class_extends_and_implements.g.cs @@ -21,9 +21,9 @@ public async override Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public new async Task OnlineToPlainAsync() + public new async Task OnlineToPlainAsync() { - Pocos.ExtendsAndImplements plain = new Pocos.ExtendsAndImplements(); + global::Pocos.ExtendsAndImplements plain = new global::Pocos.ExtendsAndImplements(); await this.ReadAsync(); #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); @@ -33,9 +33,9 @@ public async override Task OnlineToPlain() [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() + public new async Task _OnlineToPlainNoacAsync() { - Pocos.ExtendsAndImplements plain = new Pocos.ExtendsAndImplements(); + global::Pocos.ExtendsAndImplements plain = new global::Pocos.ExtendsAndImplements(); #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); #pragma warning restore CS0612 @@ -44,7 +44,7 @@ public async override Task OnlineToPlain() [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(Pocos.ExtendsAndImplements plain) + protected async Task _OnlineToPlainNoacAsync(global::Pocos.ExtendsAndImplements plain) { #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); @@ -57,7 +57,7 @@ public async override Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.ExtendsAndImplements plain) + public async Task> PlainToOnlineAsync(global::Pocos.ExtendsAndImplements plain) { await base._PlainToOnlineNoacAsync(plain); return await this.WriteAsync(); @@ -65,7 +65,7 @@ public async Task> PlainToOnlineAsync(Pocos.ExtendsA [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(Pocos.ExtendsAndImplements plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.ExtendsAndImplements plain) { await base._PlainToOnlineNoacAsync(plain); } @@ -75,14 +75,14 @@ public async override Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public new async Task ShadowToPlainAsync() + public new async Task ShadowToPlainAsync() { - Pocos.ExtendsAndImplements plain = new Pocos.ExtendsAndImplements(); + global::Pocos.ExtendsAndImplements plain = new global::Pocos.ExtendsAndImplements(); await base.ShadowToPlainAsync(plain); return plain; } - protected async Task ShadowToPlainAsync(Pocos.ExtendsAndImplements plain) + protected async Task ShadowToPlainAsync(global::Pocos.ExtendsAndImplements plain) { await base.ShadowToPlainAsync(plain); return plain; @@ -93,7 +93,7 @@ public async override Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.ExtendsAndImplements plain) + public async Task> PlainToShadowAsync(global::Pocos.ExtendsAndImplements plain) { await base.PlainToShadowAsync(plain); return this.RetrievePrimitives(); @@ -109,7 +109,7 @@ public async override Task AnyChangeAsync(T 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(Pocos.ExtendsAndImplements plain, Pocos.ExtendsAndImplements latest = null) + public new async Task DetectsAnyChangeAsync(global::Pocos.ExtendsAndImplements plain, global::Pocos.ExtendsAndImplements latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -128,9 +128,9 @@ public async override Task AnyChangeAsync(T plain) this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public new Pocos.ExtendsAndImplements CreateEmptyPoco() + public new global::Pocos.ExtendsAndImplements CreateEmptyPoco() { - return new Pocos.ExtendsAndImplements(); + return new global::Pocos.ExtendsAndImplements(); } } @@ -156,24 +156,24 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.ExtendeeExtendsAndImplements plain = new Pocos.ExtendeeExtendsAndImplements(); + 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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.ExtendeeExtendsAndImplements plain = new Pocos.ExtendeeExtendsAndImplements(); + 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(Pocos.ExtendeeExtendsAndImplements plain) + protected async Task _OnlineToPlainNoacAsync(global::Pocos.ExtendeeExtendsAndImplements plain) { return plain; } @@ -183,14 +183,14 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.ExtendeeExtendsAndImplements 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(Pocos.ExtendeeExtendsAndImplements plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.ExtendeeExtendsAndImplements plain) { } @@ -199,13 +199,13 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.ExtendeeExtendsAndImplements plain = new Pocos.ExtendeeExtendsAndImplements(); + global::Pocos.ExtendeeExtendsAndImplements plain = new global::Pocos.ExtendeeExtendsAndImplements(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.ExtendeeExtendsAndImplements plain) + protected async Task ShadowToPlainAsync(global::Pocos.ExtendeeExtendsAndImplements plain) { return plain; } @@ -215,7 +215,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.ExtendeeExtendsAndImplements plain) + public async Task> PlainToShadowAsync(global::Pocos.ExtendeeExtendsAndImplements plain) { return this.RetrievePrimitives(); } @@ -230,7 +230,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.ExtendeeExtendsAndImplements plain, Pocos.ExtendeeExtendsAndImplements latest = null) + public async Task DetectsAnyChangeAsync(global::Pocos.ExtendeeExtendsAndImplements plain, global::Pocos.ExtendeeExtendsAndImplements latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -247,24 +247,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.ExtendeeExtendsAndImplements CreateEmptyPoco() + public global::Pocos.ExtendeeExtendsAndImplements CreateEmptyPoco() { - return new Pocos.ExtendeeExtendsAndImplements(); + 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; @@ -321,9 +324,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } 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/.g/Onliners/class_generic_extension.g.cs index c6038bee7..f8030c33f 100644 --- 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/.g/Onliners/class_generic_extension.g.cs @@ -29,24 +29,24 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.Generics.Extender plain = new Pocos.Generics.Extender(); + Generics.Pocos.Extender plain = new Generics.Pocos.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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.Generics.Extender plain = new Pocos.Generics.Extender(); + Generics.Pocos.Extender plain = new Generics.Pocos.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 _OnlineToPlainNoacAsync(Pocos.Generics.Extender plain) + protected async Task _OnlineToPlainNoacAsync(Generics.Pocos.Extender plain) { return plain; } @@ -56,14 +56,14 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.Generics.Extender plain) + public async Task> PlainToOnlineAsync(Generics.Pocos.Extender 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(Pocos.Generics.Extender plain) + public async Task _PlainToOnlineNoacAsync(Generics.Pocos.Extender plain) { } @@ -72,13 +72,13 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.Generics.Extender plain = new Pocos.Generics.Extender(); + Generics.Pocos.Extender plain = new Generics.Pocos.Extender(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.Generics.Extender plain) + protected async Task ShadowToPlainAsync(Generics.Pocos.Extender plain) { return plain; } @@ -88,7 +88,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.Generics.Extender plain) + public async Task> PlainToShadowAsync(Generics.Pocos.Extender plain) { return this.RetrievePrimitives(); } @@ -103,7 +103,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.Generics.Extender plain, Pocos.Generics.Extender latest = null) + public async Task DetectsAnyChangeAsync(Generics.Pocos.Extender plain, Generics.Pocos.Extender latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -120,24 +120,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.Generics.Extender CreateEmptyPoco() + public Generics.Pocos.Extender CreateEmptyPoco() { - return new Pocos.Generics.Extender(); + return new Generics.Pocos.Extender(); } 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; @@ -194,16 +197,13 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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 Extendee : Generics.Extender { public Generics.SomeType SomeType { get; } - public Generics.SomeType SomeTypeAsPoco { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -222,9 +222,9 @@ public async override Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public new async Task OnlineToPlainAsync() + public new async Task OnlineToPlainAsync() { - Pocos.Generics.Extendee plain = new Pocos.Generics.Extendee(); + Generics.Pocos.Extendee plain = new Generics.Pocos.Extendee(); await this.ReadAsync(); #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); @@ -240,9 +240,9 @@ public async override Task OnlineToPlain() [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() + public new async Task _OnlineToPlainNoacAsync() { - Pocos.Generics.Extendee plain = new Pocos.Generics.Extendee(); + Generics.Pocos.Extendee plain = new Generics.Pocos.Extendee(); #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); #pragma warning restore CS0612 @@ -257,7 +257,7 @@ public async override Task OnlineToPlain() [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(Pocos.Generics.Extendee plain) + protected async Task _OnlineToPlainNoacAsync(Generics.Pocos.Extendee plain) { #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); @@ -276,7 +276,7 @@ public async override Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.Generics.Extendee plain) + public async Task> PlainToOnlineAsync(Generics.Pocos.Extendee plain) { await base._PlainToOnlineNoacAsync(plain); #pragma warning disable CS0612 @@ -290,7 +290,7 @@ public async Task> PlainToOnlineAsync(Pocos.Generics [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(Pocos.Generics.Extendee plain) + public async Task _PlainToOnlineNoacAsync(Generics.Pocos.Extendee plain) { await base._PlainToOnlineNoacAsync(plain); #pragma warning disable CS0612 @@ -306,16 +306,16 @@ public async override Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public new async Task ShadowToPlainAsync() + public new async Task ShadowToPlainAsync() { - Pocos.Generics.Extendee plain = new Pocos.Generics.Extendee(); + Generics.Pocos.Extendee plain = new Generics.Pocos.Extendee(); await base.ShadowToPlainAsync(plain); plain.SomeType = await SomeType.ShadowToPlainAsync(); plain.SomeTypeAsPoco = await SomeTypeAsPoco.ShadowToPlainAsync(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.Generics.Extendee plain) + protected async Task ShadowToPlainAsync(Generics.Pocos.Extendee plain) { await base.ShadowToPlainAsync(plain); plain.SomeType = await SomeType.ShadowToPlainAsync(); @@ -328,7 +328,7 @@ public async override Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.Generics.Extendee plain) + public async Task> PlainToShadowAsync(Generics.Pocos.Extendee plain) { await base.PlainToShadowAsync(plain); await this.SomeType.PlainToShadowAsync(plain.SomeType); @@ -346,7 +346,7 @@ public async override Task AnyChangeAsync(T 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(Pocos.Generics.Extendee plain, Pocos.Generics.Extendee latest = null) + public new async Task DetectsAnyChangeAsync(Generics.Pocos.Extendee plain, Generics.Pocos.Extendee latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -369,9 +369,9 @@ public async override Task AnyChangeAsync(T plain) this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public new Pocos.Generics.Extendee CreateEmptyPoco() + public new Generics.Pocos.Extendee CreateEmptyPoco() { - return new Pocos.Generics.Extendee(); + return new Generics.Pocos.Extendee(); } } @@ -394,9 +394,9 @@ public async override Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public new async Task OnlineToPlainAsync() + public new async Task OnlineToPlainAsync() { - Pocos.Generics.Extendee2 plain = new Pocos.Generics.Extendee2(); + Generics.Pocos.Extendee2 plain = new Generics.Pocos.Extendee2(); await this.ReadAsync(); #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); @@ -409,9 +409,9 @@ public async override Task OnlineToPlain() [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() + public new async Task _OnlineToPlainNoacAsync() { - Pocos.Generics.Extendee2 plain = new Pocos.Generics.Extendee2(); + Generics.Pocos.Extendee2 plain = new Generics.Pocos.Extendee2(); #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); #pragma warning restore CS0612 @@ -423,7 +423,7 @@ public async override Task OnlineToPlain() [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(Pocos.Generics.Extendee2 plain) + protected async Task _OnlineToPlainNoacAsync(Generics.Pocos.Extendee2 plain) { #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); @@ -439,7 +439,7 @@ public async override Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.Generics.Extendee2 plain) + public async Task> PlainToOnlineAsync(Generics.Pocos.Extendee2 plain) { await base._PlainToOnlineNoacAsync(plain); #pragma warning disable CS0612 @@ -450,7 +450,7 @@ public async Task> PlainToOnlineAsync(Pocos.Generics [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(Pocos.Generics.Extendee2 plain) + public async Task _PlainToOnlineNoacAsync(Generics.Pocos.Extendee2 plain) { await base._PlainToOnlineNoacAsync(plain); #pragma warning disable CS0612 @@ -463,15 +463,15 @@ public async override Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public new async Task ShadowToPlainAsync() + public new async Task ShadowToPlainAsync() { - Pocos.Generics.Extendee2 plain = new Pocos.Generics.Extendee2(); + Generics.Pocos.Extendee2 plain = new Generics.Pocos.Extendee2(); await base.ShadowToPlainAsync(plain); plain.SomeType = await SomeType.ShadowToPlainAsync(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.Generics.Extendee2 plain) + protected async Task ShadowToPlainAsync(Generics.Pocos.Extendee2 plain) { await base.ShadowToPlainAsync(plain); plain.SomeType = await SomeType.ShadowToPlainAsync(); @@ -483,7 +483,7 @@ public async override Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.Generics.Extendee2 plain) + public async Task> PlainToShadowAsync(Generics.Pocos.Extendee2 plain) { await base.PlainToShadowAsync(plain); await this.SomeType.PlainToShadowAsync(plain.SomeType); @@ -500,7 +500,7 @@ public async override Task AnyChangeAsync(T 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(Pocos.Generics.Extendee2 plain, Pocos.Generics.Extendee2 latest = null) + public new async Task DetectsAnyChangeAsync(Generics.Pocos.Extendee2 plain, Generics.Pocos.Extendee2 latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -521,9 +521,9 @@ public async override Task AnyChangeAsync(T plain) this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public new Pocos.Generics.Extendee2 CreateEmptyPoco() + public new Generics.Pocos.Extendee2 CreateEmptyPoco() { - return new Pocos.Generics.Extendee2(); + return new Generics.Pocos.Extendee2(); } } @@ -549,24 +549,24 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.Generics.SomeType plain = new Pocos.Generics.SomeType(); + Generics.Pocos.SomeType plain = new Generics.Pocos.SomeType(); 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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.Generics.SomeType plain = new Pocos.Generics.SomeType(); + Generics.Pocos.SomeType plain = new Generics.Pocos.SomeType(); 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(Pocos.Generics.SomeType plain) + protected async Task _OnlineToPlainNoacAsync(Generics.Pocos.SomeType plain) { return plain; } @@ -576,14 +576,14 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.Generics.SomeType plain) + public async Task> PlainToOnlineAsync(Generics.Pocos.SomeType 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(Pocos.Generics.SomeType plain) + public async Task _PlainToOnlineNoacAsync(Generics.Pocos.SomeType plain) { } @@ -592,13 +592,13 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.Generics.SomeType plain = new Pocos.Generics.SomeType(); + Generics.Pocos.SomeType plain = new Generics.Pocos.SomeType(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.Generics.SomeType plain) + protected async Task ShadowToPlainAsync(Generics.Pocos.SomeType plain) { return plain; } @@ -608,7 +608,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.Generics.SomeType plain) + public async Task> PlainToShadowAsync(Generics.Pocos.SomeType plain) { return this.RetrievePrimitives(); } @@ -623,7 +623,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.Generics.SomeType plain, Pocos.Generics.SomeType latest = null) + public async Task DetectsAnyChangeAsync(Generics.Pocos.SomeType plain, Generics.Pocos.SomeType latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -640,24 +640,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.Generics.SomeType CreateEmptyPoco() + public Generics.Pocos.SomeType CreateEmptyPoco() { - return new Pocos.Generics.SomeType(); + return new Generics.Pocos.SomeType(); } 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; @@ -714,9 +717,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/class_implements.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_implements.g.cs index 247f70077..ae1137000 100644 --- 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/.g/Onliners/class_implements.g.cs @@ -27,24 +27,24 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos._NULL_CONTEXT plain = new Pocos._NULL_CONTEXT(); + global::Pocos._NULL_CONTEXT plain = new global::Pocos._NULL_CONTEXT(); 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() + public async Task _OnlineToPlainNoacAsync() { - Pocos._NULL_CONTEXT plain = new Pocos._NULL_CONTEXT(); + global::Pocos._NULL_CONTEXT plain = new global::Pocos._NULL_CONTEXT(); 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(Pocos._NULL_CONTEXT plain) + protected async Task _OnlineToPlainNoacAsync(global::Pocos._NULL_CONTEXT plain) { return plain; } @@ -54,14 +54,14 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos._NULL_CONTEXT plain) + public async Task> PlainToOnlineAsync(global::Pocos._NULL_CONTEXT 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(Pocos._NULL_CONTEXT plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos._NULL_CONTEXT plain) { } @@ -70,13 +70,13 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos._NULL_CONTEXT plain = new Pocos._NULL_CONTEXT(); + global::Pocos._NULL_CONTEXT plain = new global::Pocos._NULL_CONTEXT(); return plain; } - protected async Task ShadowToPlainAsync(Pocos._NULL_CONTEXT plain) + protected async Task ShadowToPlainAsync(global::Pocos._NULL_CONTEXT plain) { return plain; } @@ -86,7 +86,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos._NULL_CONTEXT plain) + public async Task> PlainToShadowAsync(global::Pocos._NULL_CONTEXT plain) { return this.RetrievePrimitives(); } @@ -101,7 +101,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos._NULL_CONTEXT plain, Pocos._NULL_CONTEXT latest = null) + public async Task DetectsAnyChangeAsync(global::Pocos._NULL_CONTEXT plain, global::Pocos._NULL_CONTEXT latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -118,24 +118,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos._NULL_CONTEXT CreateEmptyPoco() + public global::Pocos._NULL_CONTEXT CreateEmptyPoco() { - return new Pocos._NULL_CONTEXT(); + return new global::Pocos._NULL_CONTEXT(); } 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; @@ -192,9 +195,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } 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/.g/Onliners/class_implements_multiple.g.cs index f0a954eda..56327b2b7 100644 --- 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/.g/Onliners/class_implements_multiple.g.cs @@ -27,24 +27,24 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos._NULL_CONTEXT_MULTIPLE plain = new Pocos._NULL_CONTEXT_MULTIPLE(); + global::Pocos._NULL_CONTEXT_MULTIPLE plain = new global::Pocos._NULL_CONTEXT_MULTIPLE(); 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() + public async Task _OnlineToPlainNoacAsync() { - Pocos._NULL_CONTEXT_MULTIPLE plain = new Pocos._NULL_CONTEXT_MULTIPLE(); + global::Pocos._NULL_CONTEXT_MULTIPLE plain = new global::Pocos._NULL_CONTEXT_MULTIPLE(); 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(Pocos._NULL_CONTEXT_MULTIPLE plain) + protected async Task _OnlineToPlainNoacAsync(global::Pocos._NULL_CONTEXT_MULTIPLE plain) { return plain; } @@ -54,14 +54,14 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos._NULL_CONTEXT_MULTIPLE plain) + public async Task> PlainToOnlineAsync(global::Pocos._NULL_CONTEXT_MULTIPLE 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(Pocos._NULL_CONTEXT_MULTIPLE plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos._NULL_CONTEXT_MULTIPLE plain) { } @@ -70,13 +70,13 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos._NULL_CONTEXT_MULTIPLE plain = new Pocos._NULL_CONTEXT_MULTIPLE(); + global::Pocos._NULL_CONTEXT_MULTIPLE plain = new global::Pocos._NULL_CONTEXT_MULTIPLE(); return plain; } - protected async Task ShadowToPlainAsync(Pocos._NULL_CONTEXT_MULTIPLE plain) + protected async Task ShadowToPlainAsync(global::Pocos._NULL_CONTEXT_MULTIPLE plain) { return plain; } @@ -86,7 +86,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos._NULL_CONTEXT_MULTIPLE plain) + public async Task> PlainToShadowAsync(global::Pocos._NULL_CONTEXT_MULTIPLE plain) { return this.RetrievePrimitives(); } @@ -101,7 +101,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos._NULL_CONTEXT_MULTIPLE plain, Pocos._NULL_CONTEXT_MULTIPLE latest = null) + public async Task DetectsAnyChangeAsync(global::Pocos._NULL_CONTEXT_MULTIPLE plain, global::Pocos._NULL_CONTEXT_MULTIPLE latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -118,24 +118,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos._NULL_CONTEXT_MULTIPLE CreateEmptyPoco() + public global::Pocos._NULL_CONTEXT_MULTIPLE CreateEmptyPoco() { - return new Pocos._NULL_CONTEXT_MULTIPLE(); + return new global::Pocos._NULL_CONTEXT_MULTIPLE(); } 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; @@ -192,9 +195,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } 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/.g/Onliners/class_internal.g.cs index 0cc6054f1..1e0adb5eb 100644 --- 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/.g/Onliners/class_internal.g.cs @@ -27,24 +27,24 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.ClassWithComplexTypes plain = new Pocos.ClassWithComplexTypes(); + global::Pocos.ClassWithComplexTypes plain = new global::Pocos.ClassWithComplexTypes(); 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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.ClassWithComplexTypes plain = new Pocos.ClassWithComplexTypes(); + global::Pocos.ClassWithComplexTypes plain = new global::Pocos.ClassWithComplexTypes(); 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(Pocos.ClassWithComplexTypes plain) + protected async Task _OnlineToPlainNoacAsync(global::Pocos.ClassWithComplexTypes plain) { return plain; } @@ -54,14 +54,14 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.ClassWithComplexTypes plain) + public async Task> PlainToOnlineAsync(global::Pocos.ClassWithComplexTypes 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(Pocos.ClassWithComplexTypes plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.ClassWithComplexTypes plain) { } @@ -70,13 +70,13 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.ClassWithComplexTypes plain = new Pocos.ClassWithComplexTypes(); + global::Pocos.ClassWithComplexTypes plain = new global::Pocos.ClassWithComplexTypes(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.ClassWithComplexTypes plain) + protected async Task ShadowToPlainAsync(global::Pocos.ClassWithComplexTypes plain) { return plain; } @@ -86,7 +86,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.ClassWithComplexTypes plain) + public async Task> PlainToShadowAsync(global::Pocos.ClassWithComplexTypes plain) { return this.RetrievePrimitives(); } @@ -101,7 +101,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.ClassWithComplexTypes plain, Pocos.ClassWithComplexTypes latest = null) + public async Task DetectsAnyChangeAsync(global::Pocos.ClassWithComplexTypes plain, global::Pocos.ClassWithComplexTypes latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -118,24 +118,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.ClassWithComplexTypes CreateEmptyPoco() + public global::Pocos.ClassWithComplexTypes CreateEmptyPoco() { - return new Pocos.ClassWithComplexTypes(); + return new global::Pocos.ClassWithComplexTypes(); } 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; @@ -192,8 +195,6 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/class_no_access_modifier.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_no_access_modifier.g.cs index 4e301baf4..89643731b 100644 --- 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/.g/Onliners/class_no_access_modifier.g.cs @@ -27,24 +27,24 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.NoAccessModifierClass plain = new Pocos.NoAccessModifierClass(); + global::Pocos.NoAccessModifierClass plain = new global::Pocos.NoAccessModifierClass(); 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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.NoAccessModifierClass plain = new Pocos.NoAccessModifierClass(); + global::Pocos.NoAccessModifierClass plain = new global::Pocos.NoAccessModifierClass(); 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(Pocos.NoAccessModifierClass plain) + protected async Task _OnlineToPlainNoacAsync(global::Pocos.NoAccessModifierClass plain) { return plain; } @@ -54,14 +54,14 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.NoAccessModifierClass plain) + public async Task> PlainToOnlineAsync(global::Pocos.NoAccessModifierClass 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(Pocos.NoAccessModifierClass plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.NoAccessModifierClass plain) { } @@ -70,13 +70,13 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.NoAccessModifierClass plain = new Pocos.NoAccessModifierClass(); + global::Pocos.NoAccessModifierClass plain = new global::Pocos.NoAccessModifierClass(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.NoAccessModifierClass plain) + protected async Task ShadowToPlainAsync(global::Pocos.NoAccessModifierClass plain) { return plain; } @@ -86,7 +86,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.NoAccessModifierClass plain) + public async Task> PlainToShadowAsync(global::Pocos.NoAccessModifierClass plain) { return this.RetrievePrimitives(); } @@ -101,7 +101,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.NoAccessModifierClass plain, Pocos.NoAccessModifierClass latest = null) + public async Task DetectsAnyChangeAsync(global::Pocos.NoAccessModifierClass plain, global::Pocos.NoAccessModifierClass latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -118,24 +118,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.NoAccessModifierClass CreateEmptyPoco() + public global::Pocos.NoAccessModifierClass CreateEmptyPoco() { - return new Pocos.NoAccessModifierClass(); + return new global::Pocos.NoAccessModifierClass(); } 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; @@ -192,8 +195,6 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/class_with_complex_members.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_with_complex_members.g.cs index 2da744229..310d09c56 100644 --- 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/.g/Onliners/class_with_complex_members.g.cs @@ -32,9 +32,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.ClassWithComplexTypesNamespace.ClassWithComplexTypes plain = new Pocos.ClassWithComplexTypesNamespace.ClassWithComplexTypes(); + ClassWithComplexTypesNamespace.Pocos.ClassWithComplexTypes plain = new ClassWithComplexTypesNamespace.Pocos.ClassWithComplexTypes(); await this.ReadAsync(); #pragma warning disable CS0612 plain.myComplexType = await myComplexType._OnlineToPlainNoacAsync(); @@ -44,9 +44,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.ClassWithComplexTypesNamespace.ClassWithComplexTypes plain = new Pocos.ClassWithComplexTypesNamespace.ClassWithComplexTypes(); + ClassWithComplexTypesNamespace.Pocos.ClassWithComplexTypes plain = new ClassWithComplexTypesNamespace.Pocos.ClassWithComplexTypes(); #pragma warning disable CS0612 plain.myComplexType = await myComplexType._OnlineToPlainNoacAsync(); #pragma warning restore CS0612 @@ -55,7 +55,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.ClassWithComplexTypesNamespace.ClassWithComplexTypes plain) + protected async Task _OnlineToPlainNoacAsync(ClassWithComplexTypesNamespace.Pocos.ClassWithComplexTypes plain) { #pragma warning disable CS0612 plain.myComplexType = await myComplexType._OnlineToPlainNoacAsync(); @@ -68,7 +68,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.ClassWithComplexTypesNamespace.ClassWithComplexTypes plain) + public async Task> PlainToOnlineAsync(ClassWithComplexTypesNamespace.Pocos.ClassWithComplexTypes plain) { #pragma warning disable CS0612 await this.myComplexType._PlainToOnlineNoacAsync(plain.myComplexType); @@ -78,7 +78,7 @@ public async Task> PlainToOnlineAsync(Pocos.ClassWit [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(Pocos.ClassWithComplexTypesNamespace.ClassWithComplexTypes plain) + public async Task _PlainToOnlineNoacAsync(ClassWithComplexTypesNamespace.Pocos.ClassWithComplexTypes plain) { #pragma warning disable CS0612 await this.myComplexType._PlainToOnlineNoacAsync(plain.myComplexType); @@ -90,14 +90,14 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.ClassWithComplexTypesNamespace.ClassWithComplexTypes plain = new Pocos.ClassWithComplexTypesNamespace.ClassWithComplexTypes(); + ClassWithComplexTypesNamespace.Pocos.ClassWithComplexTypes plain = new ClassWithComplexTypesNamespace.Pocos.ClassWithComplexTypes(); plain.myComplexType = await myComplexType.ShadowToPlainAsync(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.ClassWithComplexTypesNamespace.ClassWithComplexTypes plain) + protected async Task ShadowToPlainAsync(ClassWithComplexTypesNamespace.Pocos.ClassWithComplexTypes plain) { plain.myComplexType = await myComplexType.ShadowToPlainAsync(); return plain; @@ -108,7 +108,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.ClassWithComplexTypesNamespace.ClassWithComplexTypes plain) + public async Task> PlainToShadowAsync(ClassWithComplexTypesNamespace.Pocos.ClassWithComplexTypes plain) { await this.myComplexType.PlainToShadowAsync(plain.myComplexType); return this.RetrievePrimitives(); @@ -124,7 +124,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.ClassWithComplexTypesNamespace.ClassWithComplexTypes plain, Pocos.ClassWithComplexTypesNamespace.ClassWithComplexTypes latest = null) + public async Task DetectsAnyChangeAsync(ClassWithComplexTypesNamespace.Pocos.ClassWithComplexTypes plain, ClassWithComplexTypesNamespace.Pocos.ClassWithComplexTypes latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -143,24 +143,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.ClassWithComplexTypesNamespace.ClassWithComplexTypes CreateEmptyPoco() + public ClassWithComplexTypesNamespace.Pocos.ClassWithComplexTypes CreateEmptyPoco() { - return new Pocos.ClassWithComplexTypesNamespace.ClassWithComplexTypes(); + return new ClassWithComplexTypesNamespace.Pocos.ClassWithComplexTypes(); } 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; @@ -217,9 +220,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } @@ -245,24 +246,24 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.ClassWithComplexTypesNamespace.ComplexType1 plain = new Pocos.ClassWithComplexTypesNamespace.ComplexType1(); + ClassWithComplexTypesNamespace.Pocos.ComplexType1 plain = new ClassWithComplexTypesNamespace.Pocos.ComplexType1(); 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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.ClassWithComplexTypesNamespace.ComplexType1 plain = new Pocos.ClassWithComplexTypesNamespace.ComplexType1(); + ClassWithComplexTypesNamespace.Pocos.ComplexType1 plain = new ClassWithComplexTypesNamespace.Pocos.ComplexType1(); 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(Pocos.ClassWithComplexTypesNamespace.ComplexType1 plain) + protected async Task _OnlineToPlainNoacAsync(ClassWithComplexTypesNamespace.Pocos.ComplexType1 plain) { return plain; } @@ -272,14 +273,14 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.ClassWithComplexTypesNamespace.ComplexType1 plain) + public async Task> PlainToOnlineAsync(ClassWithComplexTypesNamespace.Pocos.ComplexType1 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(Pocos.ClassWithComplexTypesNamespace.ComplexType1 plain) + public async Task _PlainToOnlineNoacAsync(ClassWithComplexTypesNamespace.Pocos.ComplexType1 plain) { } @@ -288,13 +289,13 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.ClassWithComplexTypesNamespace.ComplexType1 plain = new Pocos.ClassWithComplexTypesNamespace.ComplexType1(); + ClassWithComplexTypesNamespace.Pocos.ComplexType1 plain = new ClassWithComplexTypesNamespace.Pocos.ComplexType1(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.ClassWithComplexTypesNamespace.ComplexType1 plain) + protected async Task ShadowToPlainAsync(ClassWithComplexTypesNamespace.Pocos.ComplexType1 plain) { return plain; } @@ -304,7 +305,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.ClassWithComplexTypesNamespace.ComplexType1 plain) + public async Task> PlainToShadowAsync(ClassWithComplexTypesNamespace.Pocos.ComplexType1 plain) { return this.RetrievePrimitives(); } @@ -319,7 +320,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.ClassWithComplexTypesNamespace.ComplexType1 plain, Pocos.ClassWithComplexTypesNamespace.ComplexType1 latest = null) + public async Task DetectsAnyChangeAsync(ClassWithComplexTypesNamespace.Pocos.ComplexType1 plain, ClassWithComplexTypesNamespace.Pocos.ComplexType1 latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -336,24 +337,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.ClassWithComplexTypesNamespace.ComplexType1 CreateEmptyPoco() + public ClassWithComplexTypesNamespace.Pocos.ComplexType1 CreateEmptyPoco() { - return new Pocos.ClassWithComplexTypesNamespace.ComplexType1(); + return new ClassWithComplexTypesNamespace.Pocos.ComplexType1(); } 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; @@ -410,9 +414,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/class_with_non_public_members.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_with_non_public_members.g.cs index 03de831d0..9daed2f69 100644 --- 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/.g/Onliners/class_with_non_public_members.g.cs @@ -32,9 +32,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.ClassWithNonTraspilableMemberssNamespace.ClassWithNonTraspilableMembers plain = new Pocos.ClassWithNonTraspilableMemberssNamespace.ClassWithNonTraspilableMembers(); + ClassWithNonTraspilableMemberssNamespace.Pocos.ClassWithNonTraspilableMembers plain = new ClassWithNonTraspilableMemberssNamespace.Pocos.ClassWithNonTraspilableMembers(); await this.ReadAsync(); #pragma warning disable CS0612 plain.myComplexType = await myComplexType._OnlineToPlainNoacAsync(); @@ -44,9 +44,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.ClassWithNonTraspilableMemberssNamespace.ClassWithNonTraspilableMembers plain = new Pocos.ClassWithNonTraspilableMemberssNamespace.ClassWithNonTraspilableMembers(); + ClassWithNonTraspilableMemberssNamespace.Pocos.ClassWithNonTraspilableMembers plain = new ClassWithNonTraspilableMemberssNamespace.Pocos.ClassWithNonTraspilableMembers(); #pragma warning disable CS0612 plain.myComplexType = await myComplexType._OnlineToPlainNoacAsync(); #pragma warning restore CS0612 @@ -55,7 +55,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.ClassWithNonTraspilableMemberssNamespace.ClassWithNonTraspilableMembers plain) + protected async Task _OnlineToPlainNoacAsync(ClassWithNonTraspilableMemberssNamespace.Pocos.ClassWithNonTraspilableMembers plain) { #pragma warning disable CS0612 plain.myComplexType = await myComplexType._OnlineToPlainNoacAsync(); @@ -68,7 +68,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.ClassWithNonTraspilableMemberssNamespace.ClassWithNonTraspilableMembers plain) + public async Task> PlainToOnlineAsync(ClassWithNonTraspilableMemberssNamespace.Pocos.ClassWithNonTraspilableMembers plain) { #pragma warning disable CS0612 await this.myComplexType._PlainToOnlineNoacAsync(plain.myComplexType); @@ -78,7 +78,7 @@ public async Task> PlainToOnlineAsync(Pocos.ClassWit [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(Pocos.ClassWithNonTraspilableMemberssNamespace.ClassWithNonTraspilableMembers plain) + public async Task _PlainToOnlineNoacAsync(ClassWithNonTraspilableMemberssNamespace.Pocos.ClassWithNonTraspilableMembers plain) { #pragma warning disable CS0612 await this.myComplexType._PlainToOnlineNoacAsync(plain.myComplexType); @@ -90,14 +90,14 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.ClassWithNonTraspilableMemberssNamespace.ClassWithNonTraspilableMembers plain = new Pocos.ClassWithNonTraspilableMemberssNamespace.ClassWithNonTraspilableMembers(); + ClassWithNonTraspilableMemberssNamespace.Pocos.ClassWithNonTraspilableMembers plain = new ClassWithNonTraspilableMemberssNamespace.Pocos.ClassWithNonTraspilableMembers(); plain.myComplexType = await myComplexType.ShadowToPlainAsync(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.ClassWithNonTraspilableMemberssNamespace.ClassWithNonTraspilableMembers plain) + protected async Task ShadowToPlainAsync(ClassWithNonTraspilableMemberssNamespace.Pocos.ClassWithNonTraspilableMembers plain) { plain.myComplexType = await myComplexType.ShadowToPlainAsync(); return plain; @@ -108,7 +108,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.ClassWithNonTraspilableMemberssNamespace.ClassWithNonTraspilableMembers plain) + public async Task> PlainToShadowAsync(ClassWithNonTraspilableMemberssNamespace.Pocos.ClassWithNonTraspilableMembers plain) { await this.myComplexType.PlainToShadowAsync(plain.myComplexType); return this.RetrievePrimitives(); @@ -124,7 +124,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.ClassWithNonTraspilableMemberssNamespace.ClassWithNonTraspilableMembers plain, Pocos.ClassWithNonTraspilableMemberssNamespace.ClassWithNonTraspilableMembers latest = null) + public async Task DetectsAnyChangeAsync(ClassWithNonTraspilableMemberssNamespace.Pocos.ClassWithNonTraspilableMembers plain, ClassWithNonTraspilableMemberssNamespace.Pocos.ClassWithNonTraspilableMembers latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -143,24 +143,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.ClassWithNonTraspilableMemberssNamespace.ClassWithNonTraspilableMembers CreateEmptyPoco() + public ClassWithNonTraspilableMemberssNamespace.Pocos.ClassWithNonTraspilableMembers CreateEmptyPoco() { - return new Pocos.ClassWithNonTraspilableMemberssNamespace.ClassWithNonTraspilableMembers(); + return new ClassWithNonTraspilableMemberssNamespace.Pocos.ClassWithNonTraspilableMembers(); } 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; @@ -217,9 +220,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } @@ -245,24 +246,24 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.ClassWithNonTraspilableMemberssNamespace.ComplexType1 plain = new Pocos.ClassWithNonTraspilableMemberssNamespace.ComplexType1(); + ClassWithNonTraspilableMemberssNamespace.Pocos.ComplexType1 plain = new ClassWithNonTraspilableMemberssNamespace.Pocos.ComplexType1(); 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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.ClassWithNonTraspilableMemberssNamespace.ComplexType1 plain = new Pocos.ClassWithNonTraspilableMemberssNamespace.ComplexType1(); + ClassWithNonTraspilableMemberssNamespace.Pocos.ComplexType1 plain = new ClassWithNonTraspilableMemberssNamespace.Pocos.ComplexType1(); 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(Pocos.ClassWithNonTraspilableMemberssNamespace.ComplexType1 plain) + protected async Task _OnlineToPlainNoacAsync(ClassWithNonTraspilableMemberssNamespace.Pocos.ComplexType1 plain) { return plain; } @@ -272,14 +273,14 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.ClassWithNonTraspilableMemberssNamespace.ComplexType1 plain) + public async Task> PlainToOnlineAsync(ClassWithNonTraspilableMemberssNamespace.Pocos.ComplexType1 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(Pocos.ClassWithNonTraspilableMemberssNamespace.ComplexType1 plain) + public async Task _PlainToOnlineNoacAsync(ClassWithNonTraspilableMemberssNamespace.Pocos.ComplexType1 plain) { } @@ -288,13 +289,13 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.ClassWithNonTraspilableMemberssNamespace.ComplexType1 plain = new Pocos.ClassWithNonTraspilableMemberssNamespace.ComplexType1(); + ClassWithNonTraspilableMemberssNamespace.Pocos.ComplexType1 plain = new ClassWithNonTraspilableMemberssNamespace.Pocos.ComplexType1(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.ClassWithNonTraspilableMemberssNamespace.ComplexType1 plain) + protected async Task ShadowToPlainAsync(ClassWithNonTraspilableMemberssNamespace.Pocos.ComplexType1 plain) { return plain; } @@ -304,7 +305,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.ClassWithNonTraspilableMemberssNamespace.ComplexType1 plain) + public async Task> PlainToShadowAsync(ClassWithNonTraspilableMemberssNamespace.Pocos.ComplexType1 plain) { return this.RetrievePrimitives(); } @@ -319,7 +320,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.ClassWithNonTraspilableMemberssNamespace.ComplexType1 plain, Pocos.ClassWithNonTraspilableMemberssNamespace.ComplexType1 latest = null) + public async Task DetectsAnyChangeAsync(ClassWithNonTraspilableMemberssNamespace.Pocos.ComplexType1 plain, ClassWithNonTraspilableMemberssNamespace.Pocos.ComplexType1 latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -336,24 +337,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.ClassWithNonTraspilableMemberssNamespace.ComplexType1 CreateEmptyPoco() + public ClassWithNonTraspilableMemberssNamespace.Pocos.ComplexType1 CreateEmptyPoco() { - return new Pocos.ClassWithNonTraspilableMemberssNamespace.ComplexType1(); + return new ClassWithNonTraspilableMemberssNamespace.Pocos.ComplexType1(); } 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; @@ -410,9 +414,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/class_with_pragmas.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_with_pragmas.g.cs index 2c272b559..cdae8e1ad 100644 --- 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/.g/Onliners/class_with_pragmas.g.cs @@ -34,9 +34,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.ClassWithPragmasNamespace.ClassWithPragmas plain = new Pocos.ClassWithPragmasNamespace.ClassWithPragmas(); + ClassWithPragmasNamespace.Pocos.ClassWithPragmas plain = new ClassWithPragmasNamespace.Pocos.ClassWithPragmas(); await this.ReadAsync(); #pragma warning disable CS0612 plain.myComplexType = await myComplexType._OnlineToPlainNoacAsync(); @@ -46,9 +46,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.ClassWithPragmasNamespace.ClassWithPragmas plain = new Pocos.ClassWithPragmasNamespace.ClassWithPragmas(); + ClassWithPragmasNamespace.Pocos.ClassWithPragmas plain = new ClassWithPragmasNamespace.Pocos.ClassWithPragmas(); #pragma warning disable CS0612 plain.myComplexType = await myComplexType._OnlineToPlainNoacAsync(); #pragma warning restore CS0612 @@ -57,7 +57,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.ClassWithPragmasNamespace.ClassWithPragmas plain) + protected async Task _OnlineToPlainNoacAsync(ClassWithPragmasNamespace.Pocos.ClassWithPragmas plain) { #pragma warning disable CS0612 plain.myComplexType = await myComplexType._OnlineToPlainNoacAsync(); @@ -70,7 +70,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.ClassWithPragmasNamespace.ClassWithPragmas plain) + public async Task> PlainToOnlineAsync(ClassWithPragmasNamespace.Pocos.ClassWithPragmas plain) { #pragma warning disable CS0612 await this.myComplexType._PlainToOnlineNoacAsync(plain.myComplexType); @@ -80,7 +80,7 @@ public async Task> PlainToOnlineAsync(Pocos.ClassWit [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(Pocos.ClassWithPragmasNamespace.ClassWithPragmas plain) + public async Task _PlainToOnlineNoacAsync(ClassWithPragmasNamespace.Pocos.ClassWithPragmas plain) { #pragma warning disable CS0612 await this.myComplexType._PlainToOnlineNoacAsync(plain.myComplexType); @@ -92,14 +92,14 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.ClassWithPragmasNamespace.ClassWithPragmas plain = new Pocos.ClassWithPragmasNamespace.ClassWithPragmas(); + ClassWithPragmasNamespace.Pocos.ClassWithPragmas plain = new ClassWithPragmasNamespace.Pocos.ClassWithPragmas(); plain.myComplexType = await myComplexType.ShadowToPlainAsync(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.ClassWithPragmasNamespace.ClassWithPragmas plain) + protected async Task ShadowToPlainAsync(ClassWithPragmasNamespace.Pocos.ClassWithPragmas plain) { plain.myComplexType = await myComplexType.ShadowToPlainAsync(); return plain; @@ -110,7 +110,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.ClassWithPragmasNamespace.ClassWithPragmas plain) + public async Task> PlainToShadowAsync(ClassWithPragmasNamespace.Pocos.ClassWithPragmas plain) { await this.myComplexType.PlainToShadowAsync(plain.myComplexType); return this.RetrievePrimitives(); @@ -126,7 +126,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.ClassWithPragmasNamespace.ClassWithPragmas plain, Pocos.ClassWithPragmasNamespace.ClassWithPragmas latest = null) + public async Task DetectsAnyChangeAsync(ClassWithPragmasNamespace.Pocos.ClassWithPragmas plain, ClassWithPragmasNamespace.Pocos.ClassWithPragmas latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -145,24 +145,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.ClassWithPragmasNamespace.ClassWithPragmas CreateEmptyPoco() + public ClassWithPragmasNamespace.Pocos.ClassWithPragmas CreateEmptyPoco() { - return new Pocos.ClassWithPragmasNamespace.ClassWithPragmas(); + return new ClassWithPragmasNamespace.Pocos.ClassWithPragmas(); } 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; @@ -219,9 +222,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } @@ -247,24 +248,24 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.ClassWithPragmasNamespace.ComplexType1 plain = new Pocos.ClassWithPragmasNamespace.ComplexType1(); + ClassWithPragmasNamespace.Pocos.ComplexType1 plain = new ClassWithPragmasNamespace.Pocos.ComplexType1(); 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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.ClassWithPragmasNamespace.ComplexType1 plain = new Pocos.ClassWithPragmasNamespace.ComplexType1(); + ClassWithPragmasNamespace.Pocos.ComplexType1 plain = new ClassWithPragmasNamespace.Pocos.ComplexType1(); 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(Pocos.ClassWithPragmasNamespace.ComplexType1 plain) + protected async Task _OnlineToPlainNoacAsync(ClassWithPragmasNamespace.Pocos.ComplexType1 plain) { return plain; } @@ -274,14 +275,14 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.ClassWithPragmasNamespace.ComplexType1 plain) + public async Task> PlainToOnlineAsync(ClassWithPragmasNamespace.Pocos.ComplexType1 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(Pocos.ClassWithPragmasNamespace.ComplexType1 plain) + public async Task _PlainToOnlineNoacAsync(ClassWithPragmasNamespace.Pocos.ComplexType1 plain) { } @@ -290,13 +291,13 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.ClassWithPragmasNamespace.ComplexType1 plain = new Pocos.ClassWithPragmasNamespace.ComplexType1(); + ClassWithPragmasNamespace.Pocos.ComplexType1 plain = new ClassWithPragmasNamespace.Pocos.ComplexType1(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.ClassWithPragmasNamespace.ComplexType1 plain) + protected async Task ShadowToPlainAsync(ClassWithPragmasNamespace.Pocos.ComplexType1 plain) { return plain; } @@ -306,7 +307,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.ClassWithPragmasNamespace.ComplexType1 plain) + public async Task> PlainToShadowAsync(ClassWithPragmasNamespace.Pocos.ComplexType1 plain) { return this.RetrievePrimitives(); } @@ -321,7 +322,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.ClassWithPragmasNamespace.ComplexType1 plain, Pocos.ClassWithPragmasNamespace.ComplexType1 latest = null) + public async Task DetectsAnyChangeAsync(ClassWithPragmasNamespace.Pocos.ComplexType1 plain, ClassWithPragmasNamespace.Pocos.ComplexType1 latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -338,24 +339,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.ClassWithPragmasNamespace.ComplexType1 CreateEmptyPoco() + public ClassWithPragmasNamespace.Pocos.ComplexType1 CreateEmptyPoco() { - return new Pocos.ClassWithPragmasNamespace.ComplexType1(); + return new ClassWithPragmasNamespace.Pocos.ComplexType1(); } 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; @@ -412,9 +416,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/class_with_primitive_members.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_with_primitive_members.g.cs index 7b2b78641..1aaf817db 100644 --- 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/.g/Onliners/class_with_primitive_members.g.cs @@ -10,57 +10,31 @@ namespace ClassWithPrimitiveTypesNamespace public partial class ClassWithPrimitiveTypes : 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 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; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -110,9 +84,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.ClassWithPrimitiveTypesNamespace.ClassWithPrimitiveTypes plain = new Pocos.ClassWithPrimitiveTypesNamespace.ClassWithPrimitiveTypes(); + ClassWithPrimitiveTypesNamespace.Pocos.ClassWithPrimitiveTypes plain = new ClassWithPrimitiveTypesNamespace.Pocos.ClassWithPrimitiveTypes(); await this.ReadAsync(); plain.myBOOL = myBOOL.LastValue; plain.myBYTE = myBYTE.LastValue; @@ -146,9 +120,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.ClassWithPrimitiveTypesNamespace.ClassWithPrimitiveTypes plain = new Pocos.ClassWithPrimitiveTypesNamespace.ClassWithPrimitiveTypes(); + ClassWithPrimitiveTypesNamespace.Pocos.ClassWithPrimitiveTypes plain = new ClassWithPrimitiveTypesNamespace.Pocos.ClassWithPrimitiveTypes(); plain.myBOOL = myBOOL.LastValue; plain.myBYTE = myBYTE.LastValue; plain.myWORD = myWORD.LastValue; @@ -181,7 +155,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.ClassWithPrimitiveTypesNamespace.ClassWithPrimitiveTypes plain) + protected async Task _OnlineToPlainNoacAsync(ClassWithPrimitiveTypesNamespace.Pocos.ClassWithPrimitiveTypes plain) { plain.myBOOL = myBOOL.LastValue; plain.myBYTE = myBYTE.LastValue; @@ -218,7 +192,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.ClassWithPrimitiveTypesNamespace.ClassWithPrimitiveTypes plain) + public async Task> PlainToOnlineAsync(ClassWithPrimitiveTypesNamespace.Pocos.ClassWithPrimitiveTypes plain) { #pragma warning disable CS0612 myBOOL.LethargicWrite(plain.myBOOL); @@ -306,7 +280,7 @@ public async Task> PlainToOnlineAsync(Pocos.ClassWit [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(Pocos.ClassWithPrimitiveTypesNamespace.ClassWithPrimitiveTypes plain) + public async Task _PlainToOnlineNoacAsync(ClassWithPrimitiveTypesNamespace.Pocos.ClassWithPrimitiveTypes plain) { #pragma warning disable CS0612 myBOOL.LethargicWrite(plain.myBOOL); @@ -396,9 +370,9 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.ClassWithPrimitiveTypesNamespace.ClassWithPrimitiveTypes plain = new Pocos.ClassWithPrimitiveTypesNamespace.ClassWithPrimitiveTypes(); + ClassWithPrimitiveTypesNamespace.Pocos.ClassWithPrimitiveTypes plain = new ClassWithPrimitiveTypesNamespace.Pocos.ClassWithPrimitiveTypes(); plain.myBOOL = myBOOL.Shadow; plain.myBYTE = myBYTE.Shadow; plain.myWORD = myWORD.Shadow; @@ -429,7 +403,7 @@ public async virtual Task ShadowToPlain() return plain; } - protected async Task ShadowToPlainAsync(Pocos.ClassWithPrimitiveTypesNamespace.ClassWithPrimitiveTypes plain) + protected async Task ShadowToPlainAsync(ClassWithPrimitiveTypesNamespace.Pocos.ClassWithPrimitiveTypes plain) { plain.myBOOL = myBOOL.Shadow; plain.myBYTE = myBYTE.Shadow; @@ -466,7 +440,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.ClassWithPrimitiveTypesNamespace.ClassWithPrimitiveTypes plain) + public async Task> PlainToShadowAsync(ClassWithPrimitiveTypesNamespace.Pocos.ClassWithPrimitiveTypes plain) { myBOOL.Shadow = plain.myBOOL; myBYTE.Shadow = plain.myBYTE; @@ -508,7 +482,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.ClassWithPrimitiveTypesNamespace.ClassWithPrimitiveTypes plain, Pocos.ClassWithPrimitiveTypesNamespace.ClassWithPrimitiveTypes latest = null) + public async Task DetectsAnyChangeAsync(ClassWithPrimitiveTypesNamespace.Pocos.ClassWithPrimitiveTypes plain, ClassWithPrimitiveTypesNamespace.Pocos.ClassWithPrimitiveTypes latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -579,24 +553,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.ClassWithPrimitiveTypesNamespace.ClassWithPrimitiveTypes CreateEmptyPoco() + public ClassWithPrimitiveTypesNamespace.Pocos.ClassWithPrimitiveTypes CreateEmptyPoco() { - return new Pocos.ClassWithPrimitiveTypesNamespace.ClassWithPrimitiveTypes(); + return new ClassWithPrimitiveTypesNamespace.Pocos.ClassWithPrimitiveTypes(); } 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; @@ -653,9 +630,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/class_with_using_directives.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_with_using_directives.g.cs index bfd8755ef..960522b17 100644 --- 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/.g/Onliners/class_with_using_directives.g.cs @@ -30,24 +30,24 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.ClassWithUsingDirectives plain = new Pocos.ClassWithUsingDirectives(); + global::Pocos.ClassWithUsingDirectives plain = new global::Pocos.ClassWithUsingDirectives(); 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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.ClassWithUsingDirectives plain = new Pocos.ClassWithUsingDirectives(); + global::Pocos.ClassWithUsingDirectives plain = new global::Pocos.ClassWithUsingDirectives(); 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(Pocos.ClassWithUsingDirectives plain) + protected async Task _OnlineToPlainNoacAsync(global::Pocos.ClassWithUsingDirectives plain) { return plain; } @@ -57,14 +57,14 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.ClassWithUsingDirectives plain) + public async Task> PlainToOnlineAsync(global::Pocos.ClassWithUsingDirectives 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(Pocos.ClassWithUsingDirectives plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.ClassWithUsingDirectives plain) { } @@ -73,13 +73,13 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.ClassWithUsingDirectives plain = new Pocos.ClassWithUsingDirectives(); + global::Pocos.ClassWithUsingDirectives plain = new global::Pocos.ClassWithUsingDirectives(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.ClassWithUsingDirectives plain) + protected async Task ShadowToPlainAsync(global::Pocos.ClassWithUsingDirectives plain) { return plain; } @@ -89,7 +89,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.ClassWithUsingDirectives plain) + public async Task> PlainToShadowAsync(global::Pocos.ClassWithUsingDirectives plain) { return this.RetrievePrimitives(); } @@ -104,7 +104,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.ClassWithUsingDirectives plain, Pocos.ClassWithUsingDirectives latest = null) + public async Task DetectsAnyChangeAsync(global::Pocos.ClassWithUsingDirectives plain, global::Pocos.ClassWithUsingDirectives latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -121,24 +121,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.ClassWithUsingDirectives CreateEmptyPoco() + public global::Pocos.ClassWithUsingDirectives CreateEmptyPoco() { - return new Pocos.ClassWithUsingDirectives(); + return new global::Pocos.ClassWithUsingDirectives(); } 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; @@ -195,9 +198,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } 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/.g/Onliners/compileromitsattribute.g.cs index 13511ade6..41d34dd20 100644 --- 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/.g/Onliners/compileromitsattribute.g.cs @@ -11,7 +11,6 @@ public partial class ClassWithArrays : AXSharp.Connector.ITwinObject { [CompilerOmitsAttribute("POCO")] public CompilerOmmits.Complex _must_be_omitted_in_poco { get; } - public OnlinerByte[] _primitive { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -37,9 +36,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.CompilerOmmits.ClassWithArrays plain = new Pocos.CompilerOmmits.ClassWithArrays(); + CompilerOmmits.Pocos.ClassWithArrays plain = new CompilerOmmits.Pocos.ClassWithArrays(); await this.ReadAsync(); plain._primitive = _primitive.Select(p => p.LastValue).ToArray(); return plain; @@ -47,16 +46,16 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.CompilerOmmits.ClassWithArrays plain = new Pocos.CompilerOmmits.ClassWithArrays(); + CompilerOmmits.Pocos.ClassWithArrays plain = new CompilerOmmits.Pocos.ClassWithArrays(); plain._primitive = _primitive.Select(p => p.LastValue).ToArray(); 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(Pocos.CompilerOmmits.ClassWithArrays plain) + protected async Task _OnlineToPlainNoacAsync(CompilerOmmits.Pocos.ClassWithArrays plain) { plain._primitive = _primitive.Select(p => p.LastValue).ToArray(); return plain; @@ -67,7 +66,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.CompilerOmmits.ClassWithArrays plain) + public async Task> PlainToOnlineAsync(CompilerOmmits.Pocos.ClassWithArrays plain) { var __primitive_i_FE8484DAB3 = 0; #pragma warning disable CS0612 @@ -78,7 +77,7 @@ public async Task> PlainToOnlineAsync(Pocos.Compiler [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(Pocos.CompilerOmmits.ClassWithArrays plain) + public async Task _PlainToOnlineNoacAsync(CompilerOmmits.Pocos.ClassWithArrays plain) { var __primitive_i_FE8484DAB3 = 0; #pragma warning disable CS0612 @@ -91,14 +90,14 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.CompilerOmmits.ClassWithArrays plain = new Pocos.CompilerOmmits.ClassWithArrays(); + CompilerOmmits.Pocos.ClassWithArrays plain = new CompilerOmmits.Pocos.ClassWithArrays(); plain._primitive = _primitive.Select(p => p.Shadow).ToArray(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.CompilerOmmits.ClassWithArrays plain) + protected async Task ShadowToPlainAsync(CompilerOmmits.Pocos.ClassWithArrays plain) { plain._primitive = _primitive.Select(p => p.Shadow).ToArray(); return plain; @@ -109,7 +108,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.CompilerOmmits.ClassWithArrays plain) + public async Task> PlainToShadowAsync(CompilerOmmits.Pocos.ClassWithArrays plain) { var __primitive_i_FE8484DAB3 = 0; _primitive.Select(p => p.Shadow = plain._primitive[__primitive_i_FE8484DAB3++]).ToArray(); @@ -126,7 +125,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.CompilerOmmits.ClassWithArrays plain, Pocos.CompilerOmmits.ClassWithArrays latest = null) + public async Task DetectsAnyChangeAsync(CompilerOmmits.Pocos.ClassWithArrays plain, CompilerOmmits.Pocos.ClassWithArrays latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -149,24 +148,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.CompilerOmmits.ClassWithArrays CreateEmptyPoco() + public CompilerOmmits.Pocos.ClassWithArrays CreateEmptyPoco() { - return new Pocos.CompilerOmmits.ClassWithArrays(); + return new CompilerOmmits.Pocos.ClassWithArrays(); } 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; @@ -223,16 +225,13 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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 Complex : AXSharp.Connector.ITwinObject { public OnlinerString HelloString { get; } - public OnlinerULInt Id { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -257,9 +256,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.CompilerOmmits.Complex plain = new Pocos.CompilerOmmits.Complex(); + CompilerOmmits.Pocos.Complex plain = new CompilerOmmits.Pocos.Complex(); await this.ReadAsync(); plain.HelloString = HelloString.LastValue; plain.Id = Id.LastValue; @@ -268,9 +267,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.CompilerOmmits.Complex plain = new Pocos.CompilerOmmits.Complex(); + CompilerOmmits.Pocos.Complex plain = new CompilerOmmits.Pocos.Complex(); plain.HelloString = HelloString.LastValue; plain.Id = Id.LastValue; return plain; @@ -278,7 +277,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.CompilerOmmits.Complex plain) + protected async Task _OnlineToPlainNoacAsync(CompilerOmmits.Pocos.Complex plain) { plain.HelloString = HelloString.LastValue; plain.Id = Id.LastValue; @@ -290,7 +289,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.CompilerOmmits.Complex plain) + public async Task> PlainToOnlineAsync(CompilerOmmits.Pocos.Complex plain) { #pragma warning disable CS0612 HelloString.LethargicWrite(plain.HelloString); @@ -303,7 +302,7 @@ public async Task> PlainToOnlineAsync(Pocos.Compiler [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(Pocos.CompilerOmmits.Complex plain) + public async Task _PlainToOnlineNoacAsync(CompilerOmmits.Pocos.Complex plain) { #pragma warning disable CS0612 HelloString.LethargicWrite(plain.HelloString); @@ -318,15 +317,15 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.CompilerOmmits.Complex plain = new Pocos.CompilerOmmits.Complex(); + CompilerOmmits.Pocos.Complex plain = new CompilerOmmits.Pocos.Complex(); plain.HelloString = HelloString.Shadow; plain.Id = Id.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.CompilerOmmits.Complex plain) + protected async Task ShadowToPlainAsync(CompilerOmmits.Pocos.Complex plain) { plain.HelloString = HelloString.Shadow; plain.Id = Id.Shadow; @@ -338,7 +337,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.CompilerOmmits.Complex plain) + public async Task> PlainToShadowAsync(CompilerOmmits.Pocos.Complex plain) { HelloString.Shadow = plain.HelloString; Id.Shadow = plain.Id; @@ -355,7 +354,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.CompilerOmmits.Complex plain, Pocos.CompilerOmmits.Complex latest = null) + public async Task DetectsAnyChangeAsync(CompilerOmmits.Pocos.Complex plain, CompilerOmmits.Pocos.Complex latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -376,24 +375,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.CompilerOmmits.Complex CreateEmptyPoco() + public CompilerOmmits.Pocos.Complex CreateEmptyPoco() { - return new Pocos.CompilerOmmits.Complex(); + return new CompilerOmmits.Pocos.Complex(); } 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; @@ -450,9 +452,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } } @@ -489,9 +489,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.Enums.ClassWithEnums plain = new Pocos.Enums.ClassWithEnums(); + Enums.Pocos.ClassWithEnums plain = new Enums.Pocos.ClassWithEnums(); await this.ReadAsync(); plain.colors = (Enums.Colors)colors.LastValue; plain.NamedValuesColors = NamedValuesColors.LastValue; @@ -500,9 +500,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.Enums.ClassWithEnums plain = new Pocos.Enums.ClassWithEnums(); + Enums.Pocos.ClassWithEnums plain = new Enums.Pocos.ClassWithEnums(); plain.colors = (Enums.Colors)colors.LastValue; plain.NamedValuesColors = NamedValuesColors.LastValue; return plain; @@ -510,7 +510,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.Enums.ClassWithEnums plain) + protected async Task _OnlineToPlainNoacAsync(Enums.Pocos.ClassWithEnums plain) { plain.colors = (Enums.Colors)colors.LastValue; plain.NamedValuesColors = NamedValuesColors.LastValue; @@ -522,7 +522,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.Enums.ClassWithEnums plain) + public async Task> PlainToOnlineAsync(Enums.Pocos.ClassWithEnums plain) { #pragma warning disable CS0612 colors.LethargicWrite((short)plain.colors); @@ -535,7 +535,7 @@ public async Task> PlainToOnlineAsync(Pocos.Enums.Cl [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(Pocos.Enums.ClassWithEnums plain) + public async Task _PlainToOnlineNoacAsync(Enums.Pocos.ClassWithEnums plain) { #pragma warning disable CS0612 colors.LethargicWrite((short)plain.colors); @@ -550,15 +550,15 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.Enums.ClassWithEnums plain = new Pocos.Enums.ClassWithEnums(); + Enums.Pocos.ClassWithEnums plain = new Enums.Pocos.ClassWithEnums(); plain.colors = (Enums.Colors)colors.Shadow; plain.NamedValuesColors = NamedValuesColors.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.Enums.ClassWithEnums plain) + protected async Task ShadowToPlainAsync(Enums.Pocos.ClassWithEnums plain) { plain.colors = (Enums.Colors)colors.Shadow; plain.NamedValuesColors = NamedValuesColors.Shadow; @@ -570,7 +570,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.Enums.ClassWithEnums plain) + public async Task> PlainToShadowAsync(Enums.Pocos.ClassWithEnums plain) { colors.Shadow = (short)plain.colors; NamedValuesColors.Shadow = plain.NamedValuesColors; @@ -587,7 +587,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.Enums.ClassWithEnums plain, Pocos.Enums.ClassWithEnums latest = null) + public async Task DetectsAnyChangeAsync(Enums.Pocos.ClassWithEnums plain, Enums.Pocos.ClassWithEnums latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -608,24 +608,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.Enums.ClassWithEnums CreateEmptyPoco() + public Enums.Pocos.ClassWithEnums CreateEmptyPoco() { - return new Pocos.Enums.ClassWithEnums(); + return new Enums.Pocos.ClassWithEnums(); } 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; @@ -682,9 +685,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } @@ -708,7 +709,6 @@ namespace misc public partial class VariousMembers : AXSharp.Connector.ITwinObject { public misc.SomeClass _SomeClass { get; } - public misc.Motor _Motor { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -733,9 +733,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.misc.VariousMembers plain = new Pocos.misc.VariousMembers(); + misc.Pocos.VariousMembers plain = new misc.Pocos.VariousMembers(); await this.ReadAsync(); #pragma warning disable CS0612 plain._SomeClass = await _SomeClass._OnlineToPlainNoacAsync(); @@ -748,9 +748,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.misc.VariousMembers plain = new Pocos.misc.VariousMembers(); + misc.Pocos.VariousMembers plain = new misc.Pocos.VariousMembers(); #pragma warning disable CS0612 plain._SomeClass = await _SomeClass._OnlineToPlainNoacAsync(); #pragma warning restore CS0612 @@ -762,7 +762,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.misc.VariousMembers plain) + protected async Task _OnlineToPlainNoacAsync(misc.Pocos.VariousMembers plain) { #pragma warning disable CS0612 plain._SomeClass = await _SomeClass._OnlineToPlainNoacAsync(); @@ -778,7 +778,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.misc.VariousMembers plain) + public async Task> PlainToOnlineAsync(misc.Pocos.VariousMembers plain) { #pragma warning disable CS0612 await this._SomeClass._PlainToOnlineNoacAsync(plain._SomeClass); @@ -791,7 +791,7 @@ public async Task> PlainToOnlineAsync(Pocos.misc.Var [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(Pocos.misc.VariousMembers plain) + public async Task _PlainToOnlineNoacAsync(misc.Pocos.VariousMembers plain) { #pragma warning disable CS0612 await this._SomeClass._PlainToOnlineNoacAsync(plain._SomeClass); @@ -806,15 +806,15 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.misc.VariousMembers plain = new Pocos.misc.VariousMembers(); + misc.Pocos.VariousMembers plain = new misc.Pocos.VariousMembers(); plain._SomeClass = await _SomeClass.ShadowToPlainAsync(); plain._Motor = await _Motor.ShadowToPlainAsync(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.misc.VariousMembers plain) + protected async Task ShadowToPlainAsync(misc.Pocos.VariousMembers plain) { plain._SomeClass = await _SomeClass.ShadowToPlainAsync(); plain._Motor = await _Motor.ShadowToPlainAsync(); @@ -826,7 +826,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.misc.VariousMembers plain) + public async Task> PlainToShadowAsync(misc.Pocos.VariousMembers plain) { await this._SomeClass.PlainToShadowAsync(plain._SomeClass); await this._Motor.PlainToShadowAsync(plain._Motor); @@ -843,7 +843,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.misc.VariousMembers plain, Pocos.misc.VariousMembers latest = null) + public async Task DetectsAnyChangeAsync(misc.Pocos.VariousMembers plain, misc.Pocos.VariousMembers latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -864,24 +864,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.misc.VariousMembers CreateEmptyPoco() + public misc.Pocos.VariousMembers CreateEmptyPoco() { - return new Pocos.misc.VariousMembers(); + return new misc.Pocos.VariousMembers(); } 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; @@ -938,9 +941,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } @@ -969,9 +970,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.misc.SomeClass plain = new Pocos.misc.SomeClass(); + misc.Pocos.SomeClass plain = new misc.Pocos.SomeClass(); await this.ReadAsync(); plain.SomeClassVariable = SomeClassVariable.LastValue; return plain; @@ -979,16 +980,16 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.misc.SomeClass plain = new Pocos.misc.SomeClass(); + misc.Pocos.SomeClass plain = new misc.Pocos.SomeClass(); plain.SomeClassVariable = SomeClassVariable.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(Pocos.misc.SomeClass plain) + protected async Task _OnlineToPlainNoacAsync(misc.Pocos.SomeClass plain) { plain.SomeClassVariable = SomeClassVariable.LastValue; return plain; @@ -999,7 +1000,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.misc.SomeClass plain) + public async Task> PlainToOnlineAsync(misc.Pocos.SomeClass plain) { #pragma warning disable CS0612 SomeClassVariable.LethargicWrite(plain.SomeClassVariable); @@ -1009,7 +1010,7 @@ public async Task> PlainToOnlineAsync(Pocos.misc.Som [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(Pocos.misc.SomeClass plain) + public async Task _PlainToOnlineNoacAsync(misc.Pocos.SomeClass plain) { #pragma warning disable CS0612 SomeClassVariable.LethargicWrite(plain.SomeClassVariable); @@ -1021,14 +1022,14 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.misc.SomeClass plain = new Pocos.misc.SomeClass(); + misc.Pocos.SomeClass plain = new misc.Pocos.SomeClass(); plain.SomeClassVariable = SomeClassVariable.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.misc.SomeClass plain) + protected async Task ShadowToPlainAsync(misc.Pocos.SomeClass plain) { plain.SomeClassVariable = SomeClassVariable.Shadow; return plain; @@ -1039,7 +1040,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.misc.SomeClass plain) + public async Task> PlainToShadowAsync(misc.Pocos.SomeClass plain) { SomeClassVariable.Shadow = plain.SomeClassVariable; return this.RetrievePrimitives(); @@ -1055,7 +1056,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.misc.SomeClass plain, Pocos.misc.SomeClass latest = null) + public async Task DetectsAnyChangeAsync(misc.Pocos.SomeClass plain, misc.Pocos.SomeClass latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -1074,24 +1075,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.misc.SomeClass CreateEmptyPoco() + public misc.Pocos.SomeClass CreateEmptyPoco() { - return new Pocos.misc.SomeClass(); + return new misc.Pocos.SomeClass(); } 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; @@ -1148,9 +1152,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } @@ -1179,9 +1181,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.misc.Motor plain = new Pocos.misc.Motor(); + misc.Pocos.Motor plain = new misc.Pocos.Motor(); await this.ReadAsync(); plain.isRunning = isRunning.LastValue; return plain; @@ -1189,14 +1191,14 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.misc.Motor plain = new Pocos.misc.Motor(); + misc.Pocos.Motor plain = new misc.Pocos.Motor(); plain.isRunning = isRunning.LastValue; return plain; } - protected async Task OnlineToPlainAsync(Pocos.misc.Motor plain) + protected async Task OnlineToPlainAsync(misc.Pocos.Motor plain) { plain.isRunning = isRunning.LastValue; return plain; @@ -1207,7 +1209,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.misc.Motor plain) + public async Task> PlainToOnlineAsync(misc.Pocos.Motor plain) { #pragma warning disable CS0612 isRunning.LethargicWrite(plain.isRunning); @@ -1217,7 +1219,7 @@ public async Task> PlainToOnlineAsync(Pocos.misc.Mot [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(Pocos.misc.Motor plain) + public async Task _PlainToOnlineNoacAsync(misc.Pocos.Motor plain) { #pragma warning disable CS0612 isRunning.LethargicWrite(plain.isRunning); @@ -1229,14 +1231,14 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.misc.Motor plain = new Pocos.misc.Motor(); + misc.Pocos.Motor plain = new misc.Pocos.Motor(); plain.isRunning = isRunning.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.misc.Motor plain) + protected async Task ShadowToPlainAsync(misc.Pocos.Motor plain) { plain.isRunning = isRunning.Shadow; return plain; @@ -1247,7 +1249,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.misc.Motor plain) + public async Task> PlainToShadowAsync(misc.Pocos.Motor plain) { isRunning.Shadow = plain.isRunning; return this.RetrievePrimitives(); @@ -1263,7 +1265,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.misc.Motor plain, Pocos.misc.Motor latest = null) + public async Task DetectsAnyChangeAsync(misc.Pocos.Motor plain, misc.Pocos.Motor latest = null) { var somethingChanged = false; if (latest == null) @@ -1282,24 +1284,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.misc.Motor CreateEmptyPoco() + public misc.Pocos.Motor CreateEmptyPoco() { - return new Pocos.misc.Motor(); + return new misc.Pocos.Motor(); } 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; @@ -1356,16 +1361,13 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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 Vehicle : AXSharp.Connector.ITwinObject { public misc.Motor m { get; } - public OnlinerInt displacement { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -1390,9 +1392,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.misc.Vehicle plain = new Pocos.misc.Vehicle(); + misc.Pocos.Vehicle plain = new misc.Pocos.Vehicle(); await this.ReadAsync(); #pragma warning disable CS0612 plain.m = await m._OnlineToPlainNoacAsync(); @@ -1403,9 +1405,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.misc.Vehicle plain = new Pocos.misc.Vehicle(); + misc.Pocos.Vehicle plain = new misc.Pocos.Vehicle(); #pragma warning disable CS0612 plain.m = await m._OnlineToPlainNoacAsync(); #pragma warning restore CS0612 @@ -1413,7 +1415,7 @@ public async virtual Task OnlineToPlain() return plain; } - protected async Task OnlineToPlainAsync(Pocos.misc.Vehicle plain) + protected async Task OnlineToPlainAsync(misc.Pocos.Vehicle plain) { #pragma warning disable CS0612 plain.m = await m._OnlineToPlainNoacAsync(); @@ -1427,7 +1429,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.misc.Vehicle plain) + public async Task> PlainToOnlineAsync(misc.Pocos.Vehicle plain) { #pragma warning disable CS0612 await this.m._PlainToOnlineNoacAsync(plain.m); @@ -1440,7 +1442,7 @@ public async Task> PlainToOnlineAsync(Pocos.misc.Veh [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(Pocos.misc.Vehicle plain) + public async Task _PlainToOnlineNoacAsync(misc.Pocos.Vehicle plain) { #pragma warning disable CS0612 await this.m._PlainToOnlineNoacAsync(plain.m); @@ -1455,15 +1457,15 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.misc.Vehicle plain = new Pocos.misc.Vehicle(); + misc.Pocos.Vehicle plain = new misc.Pocos.Vehicle(); plain.m = await m.ShadowToPlainAsync(); plain.displacement = displacement.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.misc.Vehicle plain) + protected async Task ShadowToPlainAsync(misc.Pocos.Vehicle plain) { plain.m = await m.ShadowToPlainAsync(); plain.displacement = displacement.Shadow; @@ -1475,7 +1477,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.misc.Vehicle plain) + public async Task> PlainToShadowAsync(misc.Pocos.Vehicle plain) { await this.m.PlainToShadowAsync(plain.m); displacement.Shadow = plain.displacement; @@ -1492,7 +1494,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.misc.Vehicle plain, Pocos.misc.Vehicle latest = null) + public async Task DetectsAnyChangeAsync(misc.Pocos.Vehicle plain, misc.Pocos.Vehicle latest = null) { var somethingChanged = false; if (latest == null) @@ -1513,24 +1515,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.misc.Vehicle CreateEmptyPoco() + public misc.Pocos.Vehicle CreateEmptyPoco() { - return new Pocos.misc.Vehicle(); + return new misc.Pocos.Vehicle(); } 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; @@ -1587,9 +1592,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } } @@ -1599,7 +1602,6 @@ namespace UnknownArraysShouldNotBeTraspiled public partial class ClassWithArrays : AXSharp.Connector.ITwinObject { public UnknownArraysShouldNotBeTraspiled.Complex[] _complexKnown { get; } - public OnlinerByte[] _primitive { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -1626,9 +1628,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays plain = new Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays(); + UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays plain = new UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays(); await this.ReadAsync(); #pragma warning disable CS0612 plain._complexKnown = _complexKnown.Select(async p => await p._OnlineToPlainNoacAsync()).Select(p => p.Result).ToArray(); @@ -1639,9 +1641,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays plain = new Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays(); + UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays plain = new UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays(); #pragma warning disable CS0612 plain._complexKnown = _complexKnown.Select(async p => await p._OnlineToPlainNoacAsync()).Select(p => p.Result).ToArray(); #pragma warning restore CS0612 @@ -1651,7 +1653,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays plain) + protected async Task _OnlineToPlainNoacAsync(UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays plain) { #pragma warning disable CS0612 plain._complexKnown = _complexKnown.Select(async p => await p._OnlineToPlainNoacAsync()).Select(p => p.Result).ToArray(); @@ -1665,7 +1667,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays plain) + public async Task> PlainToOnlineAsync(UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays plain) { var __complexKnown_i_FE8484DAB3 = 0; #pragma warning disable CS0612 @@ -1680,7 +1682,7 @@ public async Task> PlainToOnlineAsync(Pocos.UnknownA [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(Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays plain) + public async Task _PlainToOnlineNoacAsync(UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays plain) { var __complexKnown_i_FE8484DAB3 = 0; #pragma warning disable CS0612 @@ -1697,15 +1699,15 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays plain = new Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays(); + UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays plain = new UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays(); plain._complexKnown = _complexKnown.Select(async p => await p.ShadowToPlainAsync()).Select(p => p.Result).ToArray(); plain._primitive = _primitive.Select(p => p.Shadow).ToArray(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays plain) + protected async Task ShadowToPlainAsync(UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays plain) { plain._complexKnown = _complexKnown.Select(async p => await p.ShadowToPlainAsync()).Select(p => p.Result).ToArray(); plain._primitive = _primitive.Select(p => p.Shadow).ToArray(); @@ -1717,7 +1719,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays plain) + public async Task> PlainToShadowAsync(UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays plain) { var __complexKnown_i_FE8484DAB3 = 0; _complexKnown.Select(p => p.PlainToShadowAsync(plain._complexKnown[__complexKnown_i_FE8484DAB3++])).ToArray(); @@ -1736,7 +1738,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays plain, Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays latest = null) + public async Task DetectsAnyChangeAsync(UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays plain, UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -1765,24 +1767,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays CreateEmptyPoco() + public UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays CreateEmptyPoco() { - return new Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays(); + return new UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays(); } 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; @@ -1839,16 +1844,13 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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 Complex : AXSharp.Connector.ITwinObject { public OnlinerString HelloString { get; } - public OnlinerULInt Id { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -1873,9 +1875,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.UnknownArraysShouldNotBeTraspiled.Complex plain = new Pocos.UnknownArraysShouldNotBeTraspiled.Complex(); + UnknownArraysShouldNotBeTraspiled.Pocos.Complex plain = new UnknownArraysShouldNotBeTraspiled.Pocos.Complex(); await this.ReadAsync(); plain.HelloString = HelloString.LastValue; plain.Id = Id.LastValue; @@ -1884,9 +1886,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.UnknownArraysShouldNotBeTraspiled.Complex plain = new Pocos.UnknownArraysShouldNotBeTraspiled.Complex(); + UnknownArraysShouldNotBeTraspiled.Pocos.Complex plain = new UnknownArraysShouldNotBeTraspiled.Pocos.Complex(); plain.HelloString = HelloString.LastValue; plain.Id = Id.LastValue; return plain; @@ -1894,7 +1896,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.UnknownArraysShouldNotBeTraspiled.Complex plain) + protected async Task _OnlineToPlainNoacAsync(UnknownArraysShouldNotBeTraspiled.Pocos.Complex plain) { plain.HelloString = HelloString.LastValue; plain.Id = Id.LastValue; @@ -1906,7 +1908,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.UnknownArraysShouldNotBeTraspiled.Complex plain) + public async Task> PlainToOnlineAsync(UnknownArraysShouldNotBeTraspiled.Pocos.Complex plain) { #pragma warning disable CS0612 HelloString.LethargicWrite(plain.HelloString); @@ -1919,7 +1921,7 @@ public async Task> PlainToOnlineAsync(Pocos.UnknownA [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(Pocos.UnknownArraysShouldNotBeTraspiled.Complex plain) + public async Task _PlainToOnlineNoacAsync(UnknownArraysShouldNotBeTraspiled.Pocos.Complex plain) { #pragma warning disable CS0612 HelloString.LethargicWrite(plain.HelloString); @@ -1934,15 +1936,15 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.UnknownArraysShouldNotBeTraspiled.Complex plain = new Pocos.UnknownArraysShouldNotBeTraspiled.Complex(); + UnknownArraysShouldNotBeTraspiled.Pocos.Complex plain = new UnknownArraysShouldNotBeTraspiled.Pocos.Complex(); plain.HelloString = HelloString.Shadow; plain.Id = Id.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.UnknownArraysShouldNotBeTraspiled.Complex plain) + protected async Task ShadowToPlainAsync(UnknownArraysShouldNotBeTraspiled.Pocos.Complex plain) { plain.HelloString = HelloString.Shadow; plain.Id = Id.Shadow; @@ -1954,7 +1956,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.UnknownArraysShouldNotBeTraspiled.Complex plain) + public async Task> PlainToShadowAsync(UnknownArraysShouldNotBeTraspiled.Pocos.Complex plain) { HelloString.Shadow = plain.HelloString; Id.Shadow = plain.Id; @@ -1971,7 +1973,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.UnknownArraysShouldNotBeTraspiled.Complex plain, Pocos.UnknownArraysShouldNotBeTraspiled.Complex latest = null) + public async Task DetectsAnyChangeAsync(UnknownArraysShouldNotBeTraspiled.Pocos.Complex plain, UnknownArraysShouldNotBeTraspiled.Pocos.Complex latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -1992,24 +1994,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.UnknownArraysShouldNotBeTraspiled.Complex CreateEmptyPoco() + public UnknownArraysShouldNotBeTraspiled.Pocos.Complex CreateEmptyPoco() { - return new Pocos.UnknownArraysShouldNotBeTraspiled.Complex(); + return new UnknownArraysShouldNotBeTraspiled.Pocos.Complex(); } 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; @@ -2066,9 +2071,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/configuration.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/configuration.g.cs index a88a823f1..026a0b2ed 100644 --- 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/.g/Onliners/configuration.g.cs @@ -8,61 +8,33 @@ 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()] @@ -178,59 +150,32 @@ public unitsTwinController(AXSharp.Connector.ConnectorAdapter adapter) public partial class ComplexForConfig : 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 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; } - public Motor myMotor { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -281,9 +226,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.ComplexForConfig plain = new Pocos.ComplexForConfig(); + global::Pocos.ComplexForConfig plain = new global::Pocos.ComplexForConfig(); await this.ReadAsync(); plain.myBOOL = myBOOL.LastValue; plain.myBYTE = myBYTE.LastValue; @@ -320,9 +265,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.ComplexForConfig plain = new Pocos.ComplexForConfig(); + global::Pocos.ComplexForConfig plain = new global::Pocos.ComplexForConfig(); plain.myBOOL = myBOOL.LastValue; plain.myBYTE = myBYTE.LastValue; plain.myWORD = myWORD.LastValue; @@ -358,7 +303,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.ComplexForConfig plain) + protected async Task _OnlineToPlainNoacAsync(global::Pocos.ComplexForConfig plain) { plain.myBOOL = myBOOL.LastValue; plain.myBYTE = myBYTE.LastValue; @@ -398,7 +343,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.ComplexForConfig plain) + public async Task> PlainToOnlineAsync(global::Pocos.ComplexForConfig plain) { #pragma warning disable CS0612 myBOOL.LethargicWrite(plain.myBOOL); @@ -489,7 +434,7 @@ public async Task> PlainToOnlineAsync(Pocos.ComplexF [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(Pocos.ComplexForConfig plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.ComplexForConfig plain) { #pragma warning disable CS0612 myBOOL.LethargicWrite(plain.myBOOL); @@ -582,9 +527,9 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.ComplexForConfig plain = new Pocos.ComplexForConfig(); + global::Pocos.ComplexForConfig plain = new global::Pocos.ComplexForConfig(); plain.myBOOL = myBOOL.Shadow; plain.myBYTE = myBYTE.Shadow; plain.myWORD = myWORD.Shadow; @@ -616,7 +561,7 @@ public async virtual Task ShadowToPlain() return plain; } - protected async Task ShadowToPlainAsync(Pocos.ComplexForConfig plain) + protected async Task ShadowToPlainAsync(global::Pocos.ComplexForConfig plain) { plain.myBOOL = myBOOL.Shadow; plain.myBYTE = myBYTE.Shadow; @@ -654,7 +599,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.ComplexForConfig plain) + public async Task> PlainToShadowAsync(global::Pocos.ComplexForConfig plain) { myBOOL.Shadow = plain.myBOOL; myBYTE.Shadow = plain.myBYTE; @@ -697,7 +642,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.ComplexForConfig plain, Pocos.ComplexForConfig latest = null) + public async Task DetectsAnyChangeAsync(global::Pocos.ComplexForConfig plain, global::Pocos.ComplexForConfig latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -770,24 +715,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.ComplexForConfig CreateEmptyPoco() + public global::Pocos.ComplexForConfig CreateEmptyPoco() { - return new Pocos.ComplexForConfig(); + return new global::Pocos.ComplexForConfig(); } 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; @@ -844,9 +792,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } @@ -889,9 +835,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.Motor plain = new Pocos.Motor(); + global::Pocos.Motor plain = new global::Pocos.Motor(); await this.ReadAsync(); plain.isRunning = isRunning.LastValue; return plain; @@ -899,14 +845,14 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.Motor plain = new Pocos.Motor(); + global::Pocos.Motor plain = new global::Pocos.Motor(); plain.isRunning = isRunning.LastValue; return plain; } - protected async Task OnlineToPlainAsync(Pocos.Motor plain) + protected async Task OnlineToPlainAsync(global::Pocos.Motor plain) { plain.isRunning = isRunning.LastValue; return plain; @@ -917,7 +863,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.Motor plain) + public async Task> PlainToOnlineAsync(global::Pocos.Motor plain) { #pragma warning disable CS0612 isRunning.LethargicWrite(plain.isRunning); @@ -927,7 +873,7 @@ public async Task> PlainToOnlineAsync(Pocos.Motor pl [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(Pocos.Motor plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.Motor plain) { #pragma warning disable CS0612 isRunning.LethargicWrite(plain.isRunning); @@ -939,14 +885,14 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.Motor plain = new Pocos.Motor(); + global::Pocos.Motor plain = new global::Pocos.Motor(); plain.isRunning = isRunning.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.Motor plain) + protected async Task ShadowToPlainAsync(global::Pocos.Motor plain) { plain.isRunning = isRunning.Shadow; return plain; @@ -957,7 +903,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.Motor plain) + public async Task> PlainToShadowAsync(global::Pocos.Motor plain) { isRunning.Shadow = plain.isRunning; return this.RetrievePrimitives(); @@ -973,7 +919,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.Motor plain, Pocos.Motor latest = null) + public async Task DetectsAnyChangeAsync(global::Pocos.Motor plain, global::Pocos.Motor latest = null) { var somethingChanged = false; if (latest == null) @@ -992,24 +938,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.Motor CreateEmptyPoco() + public global::Pocos.Motor CreateEmptyPoco() { - return new Pocos.Motor(); + return new global::Pocos.Motor(); } 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; @@ -1066,16 +1015,13 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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 Vehicle : AXSharp.Connector.ITwinObject { public Motor m { get; } - public OnlinerInt displacement { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -1100,9 +1046,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.Vehicle plain = new Pocos.Vehicle(); + global::Pocos.Vehicle plain = new global::Pocos.Vehicle(); await this.ReadAsync(); #pragma warning disable CS0612 plain.m = await m._OnlineToPlainNoacAsync(); @@ -1113,9 +1059,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.Vehicle plain = new Pocos.Vehicle(); + global::Pocos.Vehicle plain = new global::Pocos.Vehicle(); #pragma warning disable CS0612 plain.m = await m._OnlineToPlainNoacAsync(); #pragma warning restore CS0612 @@ -1123,7 +1069,7 @@ public async virtual Task OnlineToPlain() return plain; } - protected async Task OnlineToPlainAsync(Pocos.Vehicle plain) + protected async Task OnlineToPlainAsync(global::Pocos.Vehicle plain) { #pragma warning disable CS0612 plain.m = await m._OnlineToPlainNoacAsync(); @@ -1137,7 +1083,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.Vehicle plain) + public async Task> PlainToOnlineAsync(global::Pocos.Vehicle plain) { #pragma warning disable CS0612 await this.m._PlainToOnlineNoacAsync(plain.m); @@ -1150,7 +1096,7 @@ public async Task> PlainToOnlineAsync(Pocos.Vehicle [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(Pocos.Vehicle plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.Vehicle plain) { #pragma warning disable CS0612 await this.m._PlainToOnlineNoacAsync(plain.m); @@ -1165,15 +1111,15 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.Vehicle plain = new Pocos.Vehicle(); + global::Pocos.Vehicle plain = new global::Pocos.Vehicle(); plain.m = await m.ShadowToPlainAsync(); plain.displacement = displacement.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.Vehicle plain) + protected async Task ShadowToPlainAsync(global::Pocos.Vehicle plain) { plain.m = await m.ShadowToPlainAsync(); plain.displacement = displacement.Shadow; @@ -1185,7 +1131,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.Vehicle plain) + public async Task> PlainToShadowAsync(global::Pocos.Vehicle plain) { await this.m.PlainToShadowAsync(plain.m); displacement.Shadow = plain.displacement; @@ -1202,7 +1148,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.Vehicle plain, Pocos.Vehicle latest = null) + public async Task DetectsAnyChangeAsync(global::Pocos.Vehicle plain, global::Pocos.Vehicle latest = null) { var somethingChanged = false; if (latest == null) @@ -1223,24 +1169,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.Vehicle CreateEmptyPoco() + public global::Pocos.Vehicle CreateEmptyPoco() { - return new Pocos.Vehicle(); + return new global::Pocos.Vehicle(); } 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; @@ -1297,8 +1246,6 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/file_with_usings.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/file_with_usings.g.cs index c2a14e5dd..4df192a21 100644 --- 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/.g/Onliners/file_with_usings.g.cs @@ -32,24 +32,24 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.FileWithUsingsSimpleFirstLevelNamespace.Hello plain = new Pocos.FileWithUsingsSimpleFirstLevelNamespace.Hello(); + FileWithUsingsSimpleFirstLevelNamespace.Pocos.Hello plain = new FileWithUsingsSimpleFirstLevelNamespace.Pocos.Hello(); 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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.FileWithUsingsSimpleFirstLevelNamespace.Hello plain = new Pocos.FileWithUsingsSimpleFirstLevelNamespace.Hello(); + FileWithUsingsSimpleFirstLevelNamespace.Pocos.Hello plain = new FileWithUsingsSimpleFirstLevelNamespace.Pocos.Hello(); 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(Pocos.FileWithUsingsSimpleFirstLevelNamespace.Hello plain) + protected async Task _OnlineToPlainNoacAsync(FileWithUsingsSimpleFirstLevelNamespace.Pocos.Hello plain) { return plain; } @@ -59,14 +59,14 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.FileWithUsingsSimpleFirstLevelNamespace.Hello plain) + public async Task> PlainToOnlineAsync(FileWithUsingsSimpleFirstLevelNamespace.Pocos.Hello 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(Pocos.FileWithUsingsSimpleFirstLevelNamespace.Hello plain) + public async Task _PlainToOnlineNoacAsync(FileWithUsingsSimpleFirstLevelNamespace.Pocos.Hello plain) { } @@ -75,13 +75,13 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.FileWithUsingsSimpleFirstLevelNamespace.Hello plain = new Pocos.FileWithUsingsSimpleFirstLevelNamespace.Hello(); + FileWithUsingsSimpleFirstLevelNamespace.Pocos.Hello plain = new FileWithUsingsSimpleFirstLevelNamespace.Pocos.Hello(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.FileWithUsingsSimpleFirstLevelNamespace.Hello plain) + protected async Task ShadowToPlainAsync(FileWithUsingsSimpleFirstLevelNamespace.Pocos.Hello plain) { return plain; } @@ -91,7 +91,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.FileWithUsingsSimpleFirstLevelNamespace.Hello plain) + public async Task> PlainToShadowAsync(FileWithUsingsSimpleFirstLevelNamespace.Pocos.Hello plain) { return this.RetrievePrimitives(); } @@ -106,7 +106,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.FileWithUsingsSimpleFirstLevelNamespace.Hello plain, Pocos.FileWithUsingsSimpleFirstLevelNamespace.Hello latest = null) + public async Task DetectsAnyChangeAsync(FileWithUsingsSimpleFirstLevelNamespace.Pocos.Hello plain, FileWithUsingsSimpleFirstLevelNamespace.Pocos.Hello latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -123,24 +123,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.FileWithUsingsSimpleFirstLevelNamespace.Hello CreateEmptyPoco() + public FileWithUsingsSimpleFirstLevelNamespace.Pocos.Hello CreateEmptyPoco() { - return new Pocos.FileWithUsingsSimpleFirstLevelNamespace.Hello(); + return new FileWithUsingsSimpleFirstLevelNamespace.Pocos.Hello(); } 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; @@ -197,9 +200,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } } @@ -228,24 +229,24 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.FileWithUsingsSimpleQualifiedNamespace.Qualified.Hello plain = new Pocos.FileWithUsingsSimpleQualifiedNamespace.Qualified.Hello(); + FileWithUsingsSimpleQualifiedNamespace.Qualified.Pocos.Hello plain = new FileWithUsingsSimpleQualifiedNamespace.Qualified.Pocos.Hello(); 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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.FileWithUsingsSimpleQualifiedNamespace.Qualified.Hello plain = new Pocos.FileWithUsingsSimpleQualifiedNamespace.Qualified.Hello(); + FileWithUsingsSimpleQualifiedNamespace.Qualified.Pocos.Hello plain = new FileWithUsingsSimpleQualifiedNamespace.Qualified.Pocos.Hello(); 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(Pocos.FileWithUsingsSimpleQualifiedNamespace.Qualified.Hello plain) + protected async Task _OnlineToPlainNoacAsync(FileWithUsingsSimpleQualifiedNamespace.Qualified.Pocos.Hello plain) { return plain; } @@ -255,14 +256,14 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.FileWithUsingsSimpleQualifiedNamespace.Qualified.Hello plain) + public async Task> PlainToOnlineAsync(FileWithUsingsSimpleQualifiedNamespace.Qualified.Pocos.Hello 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(Pocos.FileWithUsingsSimpleQualifiedNamespace.Qualified.Hello plain) + public async Task _PlainToOnlineNoacAsync(FileWithUsingsSimpleQualifiedNamespace.Qualified.Pocos.Hello plain) { } @@ -271,13 +272,13 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.FileWithUsingsSimpleQualifiedNamespace.Qualified.Hello plain = new Pocos.FileWithUsingsSimpleQualifiedNamespace.Qualified.Hello(); + FileWithUsingsSimpleQualifiedNamespace.Qualified.Pocos.Hello plain = new FileWithUsingsSimpleQualifiedNamespace.Qualified.Pocos.Hello(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.FileWithUsingsSimpleQualifiedNamespace.Qualified.Hello plain) + protected async Task ShadowToPlainAsync(FileWithUsingsSimpleQualifiedNamespace.Qualified.Pocos.Hello plain) { return plain; } @@ -287,7 +288,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.FileWithUsingsSimpleQualifiedNamespace.Qualified.Hello plain) + public async Task> PlainToShadowAsync(FileWithUsingsSimpleQualifiedNamespace.Qualified.Pocos.Hello plain) { return this.RetrievePrimitives(); } @@ -302,7 +303,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.FileWithUsingsSimpleQualifiedNamespace.Qualified.Hello plain, Pocos.FileWithUsingsSimpleQualifiedNamespace.Qualified.Hello latest = null) + public async Task DetectsAnyChangeAsync(FileWithUsingsSimpleQualifiedNamespace.Qualified.Pocos.Hello plain, FileWithUsingsSimpleQualifiedNamespace.Qualified.Pocos.Hello latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -319,24 +320,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.FileWithUsingsSimpleQualifiedNamespace.Qualified.Hello CreateEmptyPoco() + public FileWithUsingsSimpleQualifiedNamespace.Qualified.Pocos.Hello CreateEmptyPoco() { - return new Pocos.FileWithUsingsSimpleQualifiedNamespace.Qualified.Hello(); + return new FileWithUsingsSimpleQualifiedNamespace.Qualified.Pocos.Hello(); } 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; @@ -393,9 +397,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } } @@ -426,24 +428,24 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Hello plain = new Pocos.FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Hello(); + FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Pocos.Hello plain = new FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Pocos.Hello(); 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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Hello plain = new Pocos.FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Hello(); + FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Pocos.Hello plain = new FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Pocos.Hello(); 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(Pocos.FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Hello plain) + protected async Task _OnlineToPlainNoacAsync(FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Pocos.Hello plain) { return plain; } @@ -453,14 +455,14 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Hello plain) + public async Task> PlainToOnlineAsync(FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Pocos.Hello 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(Pocos.FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Hello plain) + public async Task _PlainToOnlineNoacAsync(FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Pocos.Hello plain) { } @@ -469,13 +471,13 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Hello plain = new Pocos.FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Hello(); + FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Pocos.Hello plain = new FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Pocos.Hello(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Hello plain) + protected async Task ShadowToPlainAsync(FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Pocos.Hello plain) { return plain; } @@ -485,7 +487,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Hello plain) + public async Task> PlainToShadowAsync(FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Pocos.Hello plain) { return this.RetrievePrimitives(); } @@ -500,7 +502,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Hello plain, Pocos.FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Hello latest = null) + public async Task DetectsAnyChangeAsync(FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Pocos.Hello plain, FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Pocos.Hello latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -517,24 +519,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Hello CreateEmptyPoco() + public FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Pocos.Hello CreateEmptyPoco() { - return new Pocos.FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Hello(); + return new FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Pocos.Hello(); } 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; @@ -591,9 +596,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } } @@ -623,24 +626,24 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.ExampleNamespace.Hello plain = new Pocos.ExampleNamespace.Hello(); + ExampleNamespace.Pocos.Hello plain = new ExampleNamespace.Pocos.Hello(); 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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.ExampleNamespace.Hello plain = new Pocos.ExampleNamespace.Hello(); + ExampleNamespace.Pocos.Hello plain = new ExampleNamespace.Pocos.Hello(); 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(Pocos.ExampleNamespace.Hello plain) + protected async Task _OnlineToPlainNoacAsync(ExampleNamespace.Pocos.Hello plain) { return plain; } @@ -650,14 +653,14 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.ExampleNamespace.Hello plain) + public async Task> PlainToOnlineAsync(ExampleNamespace.Pocos.Hello 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(Pocos.ExampleNamespace.Hello plain) + public async Task _PlainToOnlineNoacAsync(ExampleNamespace.Pocos.Hello plain) { } @@ -666,13 +669,13 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.ExampleNamespace.Hello plain = new Pocos.ExampleNamespace.Hello(); + ExampleNamespace.Pocos.Hello plain = new ExampleNamespace.Pocos.Hello(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.ExampleNamespace.Hello plain) + protected async Task ShadowToPlainAsync(ExampleNamespace.Pocos.Hello plain) { return plain; } @@ -682,7 +685,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.ExampleNamespace.Hello plain) + public async Task> PlainToShadowAsync(ExampleNamespace.Pocos.Hello plain) { return this.RetrievePrimitives(); } @@ -697,7 +700,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.ExampleNamespace.Hello plain, Pocos.ExampleNamespace.Hello latest = null) + public async Task DetectsAnyChangeAsync(ExampleNamespace.Pocos.Hello plain, ExampleNamespace.Pocos.Hello latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -714,24 +717,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.ExampleNamespace.Hello CreateEmptyPoco() + public ExampleNamespace.Pocos.Hello CreateEmptyPoco() { - return new Pocos.ExampleNamespace.Hello(); + return new ExampleNamespace.Pocos.Hello(); } 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; @@ -788,9 +794,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/generics.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/generics.g.cs index 6f4816eff..b80829bf2 100644 --- 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/.g/Onliners/generics.g.cs @@ -29,24 +29,24 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.GenericsTests.Extender plain = new Pocos.GenericsTests.Extender(); + GenericsTests.Pocos.Extender plain = new GenericsTests.Pocos.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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.GenericsTests.Extender plain = new Pocos.GenericsTests.Extender(); + GenericsTests.Pocos.Extender plain = new GenericsTests.Pocos.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 _OnlineToPlainNoacAsync(Pocos.GenericsTests.Extender plain) + protected async Task _OnlineToPlainNoacAsync(GenericsTests.Pocos.Extender plain) { return plain; } @@ -56,14 +56,14 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.GenericsTests.Extender plain) + public async Task> PlainToOnlineAsync(GenericsTests.Pocos.Extender 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(Pocos.GenericsTests.Extender plain) + public async Task _PlainToOnlineNoacAsync(GenericsTests.Pocos.Extender plain) { } @@ -72,13 +72,13 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.GenericsTests.Extender plain = new Pocos.GenericsTests.Extender(); + GenericsTests.Pocos.Extender plain = new GenericsTests.Pocos.Extender(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.GenericsTests.Extender plain) + protected async Task ShadowToPlainAsync(GenericsTests.Pocos.Extender plain) { return plain; } @@ -88,7 +88,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.GenericsTests.Extender plain) + public async Task> PlainToShadowAsync(GenericsTests.Pocos.Extender plain) { return this.RetrievePrimitives(); } @@ -103,7 +103,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.GenericsTests.Extender plain, Pocos.GenericsTests.Extender latest = null) + public async Task DetectsAnyChangeAsync(GenericsTests.Pocos.Extender plain, GenericsTests.Pocos.Extender latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -120,24 +120,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.GenericsTests.Extender CreateEmptyPoco() + public GenericsTests.Pocos.Extender CreateEmptyPoco() { - return new Pocos.GenericsTests.Extender(); + return new GenericsTests.Pocos.Extender(); } 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; @@ -194,16 +197,13 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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 SomeTypeToBeGeneric : AXSharp.Connector.ITwinObject { public OnlinerBool Boolean { get; } - public OnlinerInt Cele { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -228,9 +228,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.GenericsTests.SomeTypeToBeGeneric plain = new Pocos.GenericsTests.SomeTypeToBeGeneric(); + GenericsTests.Pocos.SomeTypeToBeGeneric plain = new GenericsTests.Pocos.SomeTypeToBeGeneric(); await this.ReadAsync(); plain.Boolean = Boolean.LastValue; plain.Cele = Cele.LastValue; @@ -239,9 +239,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.GenericsTests.SomeTypeToBeGeneric plain = new Pocos.GenericsTests.SomeTypeToBeGeneric(); + GenericsTests.Pocos.SomeTypeToBeGeneric plain = new GenericsTests.Pocos.SomeTypeToBeGeneric(); plain.Boolean = Boolean.LastValue; plain.Cele = Cele.LastValue; return plain; @@ -249,7 +249,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.GenericsTests.SomeTypeToBeGeneric plain) + protected async Task _OnlineToPlainNoacAsync(GenericsTests.Pocos.SomeTypeToBeGeneric plain) { plain.Boolean = Boolean.LastValue; plain.Cele = Cele.LastValue; @@ -261,7 +261,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.GenericsTests.SomeTypeToBeGeneric plain) + public async Task> PlainToOnlineAsync(GenericsTests.Pocos.SomeTypeToBeGeneric plain) { #pragma warning disable CS0612 Boolean.LethargicWrite(plain.Boolean); @@ -274,7 +274,7 @@ public async Task> PlainToOnlineAsync(Pocos.Generics [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(Pocos.GenericsTests.SomeTypeToBeGeneric plain) + public async Task _PlainToOnlineNoacAsync(GenericsTests.Pocos.SomeTypeToBeGeneric plain) { #pragma warning disable CS0612 Boolean.LethargicWrite(plain.Boolean); @@ -289,15 +289,15 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.GenericsTests.SomeTypeToBeGeneric plain = new Pocos.GenericsTests.SomeTypeToBeGeneric(); + GenericsTests.Pocos.SomeTypeToBeGeneric plain = new GenericsTests.Pocos.SomeTypeToBeGeneric(); plain.Boolean = Boolean.Shadow; plain.Cele = Cele.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.GenericsTests.SomeTypeToBeGeneric plain) + protected async Task ShadowToPlainAsync(GenericsTests.Pocos.SomeTypeToBeGeneric plain) { plain.Boolean = Boolean.Shadow; plain.Cele = Cele.Shadow; @@ -309,7 +309,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.GenericsTests.SomeTypeToBeGeneric plain) + public async Task> PlainToShadowAsync(GenericsTests.Pocos.SomeTypeToBeGeneric plain) { Boolean.Shadow = plain.Boolean; Cele.Shadow = plain.Cele; @@ -326,7 +326,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.GenericsTests.SomeTypeToBeGeneric plain, Pocos.GenericsTests.SomeTypeToBeGeneric latest = null) + public async Task DetectsAnyChangeAsync(GenericsTests.Pocos.SomeTypeToBeGeneric plain, GenericsTests.Pocos.SomeTypeToBeGeneric latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -347,24 +347,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.GenericsTests.SomeTypeToBeGeneric CreateEmptyPoco() + public GenericsTests.Pocos.SomeTypeToBeGeneric CreateEmptyPoco() { - return new Pocos.GenericsTests.SomeTypeToBeGeneric(); + return new GenericsTests.Pocos.SomeTypeToBeGeneric(); } 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; @@ -421,9 +424,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } @@ -449,9 +450,9 @@ public async override Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public new async Task OnlineToPlainAsync() + public new async Task OnlineToPlainAsync() { - Pocos.GenericsTests.Extendee2 plain = new Pocos.GenericsTests.Extendee2(); + GenericsTests.Pocos.Extendee2 plain = new GenericsTests.Pocos.Extendee2(); await this.ReadAsync(); #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); @@ -464,9 +465,9 @@ public async override Task OnlineToPlain() [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() + public new async Task _OnlineToPlainNoacAsync() { - Pocos.GenericsTests.Extendee2 plain = new Pocos.GenericsTests.Extendee2(); + GenericsTests.Pocos.Extendee2 plain = new GenericsTests.Pocos.Extendee2(); #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); #pragma warning restore CS0612 @@ -478,7 +479,7 @@ public async override Task OnlineToPlain() [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(Pocos.GenericsTests.Extendee2 plain) + protected async Task _OnlineToPlainNoacAsync(GenericsTests.Pocos.Extendee2 plain) { #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); @@ -494,7 +495,7 @@ public async override Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.GenericsTests.Extendee2 plain) + public async Task> PlainToOnlineAsync(GenericsTests.Pocos.Extendee2 plain) { await base._PlainToOnlineNoacAsync(plain); #pragma warning disable CS0612 @@ -505,7 +506,7 @@ public async Task> PlainToOnlineAsync(Pocos.Generics [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(Pocos.GenericsTests.Extendee2 plain) + public async Task _PlainToOnlineNoacAsync(GenericsTests.Pocos.Extendee2 plain) { await base._PlainToOnlineNoacAsync(plain); #pragma warning disable CS0612 @@ -518,15 +519,15 @@ public async override Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public new async Task ShadowToPlainAsync() + public new async Task ShadowToPlainAsync() { - Pocos.GenericsTests.Extendee2 plain = new Pocos.GenericsTests.Extendee2(); + GenericsTests.Pocos.Extendee2 plain = new GenericsTests.Pocos.Extendee2(); await base.ShadowToPlainAsync(plain); plain.SomeData = await SomeData.ShadowToPlainAsync(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.GenericsTests.Extendee2 plain) + protected async Task ShadowToPlainAsync(GenericsTests.Pocos.Extendee2 plain) { await base.ShadowToPlainAsync(plain); plain.SomeData = await SomeData.ShadowToPlainAsync(); @@ -538,7 +539,7 @@ public async override Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.GenericsTests.Extendee2 plain) + public async Task> PlainToShadowAsync(GenericsTests.Pocos.Extendee2 plain) { await base.PlainToShadowAsync(plain); await this.SomeData.PlainToShadowAsync(plain.SomeData); @@ -555,7 +556,7 @@ public async override Task AnyChangeAsync(T 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(Pocos.GenericsTests.Extendee2 plain, Pocos.GenericsTests.Extendee2 latest = null) + public new async Task DetectsAnyChangeAsync(GenericsTests.Pocos.Extendee2 plain, GenericsTests.Pocos.Extendee2 latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -576,9 +577,9 @@ public async override Task AnyChangeAsync(T plain) this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public new Pocos.GenericsTests.Extendee2 CreateEmptyPoco() + public new GenericsTests.Pocos.Extendee2 CreateEmptyPoco() { - return new Pocos.GenericsTests.Extendee2(); + return new GenericsTests.Pocos.Extendee2(); } } } \ No newline at end of file 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/.g/Onliners/makereadonce.g.cs index dbe7b8fbf..2ac189cd9 100644 --- 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/.g/Onliners/makereadonce.g.cs @@ -11,12 +11,10 @@ public partial class MembersWithMakeReadOnce : AXSharp.Connector.ITwinObject { [ReadOnce()] public OnlinerString makeReadOnceMember { get; } - public OnlinerString someOtherMember { get; } [ReadOnce()] public makereadonce.ComplexMember makeReadComplexMember { get; } - public makereadonce.ComplexMember someotherComplexMember { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -45,9 +43,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.makereadonce.MembersWithMakeReadOnce plain = new Pocos.makereadonce.MembersWithMakeReadOnce(); + makereadonce.Pocos.MembersWithMakeReadOnce plain = new makereadonce.Pocos.MembersWithMakeReadOnce(); await this.ReadAsync(); plain.makeReadOnceMember = makeReadOnceMember.LastValue; plain.someOtherMember = someOtherMember.LastValue; @@ -62,9 +60,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.makereadonce.MembersWithMakeReadOnce plain = new Pocos.makereadonce.MembersWithMakeReadOnce(); + makereadonce.Pocos.MembersWithMakeReadOnce plain = new makereadonce.Pocos.MembersWithMakeReadOnce(); plain.makeReadOnceMember = makeReadOnceMember.LastValue; plain.someOtherMember = someOtherMember.LastValue; #pragma warning disable CS0612 @@ -78,7 +76,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.makereadonce.MembersWithMakeReadOnce plain) + protected async Task _OnlineToPlainNoacAsync(makereadonce.Pocos.MembersWithMakeReadOnce plain) { plain.makeReadOnceMember = makeReadOnceMember.LastValue; plain.someOtherMember = someOtherMember.LastValue; @@ -96,7 +94,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.makereadonce.MembersWithMakeReadOnce plain) + public async Task> PlainToOnlineAsync(makereadonce.Pocos.MembersWithMakeReadOnce plain) { #pragma warning disable CS0612 makeReadOnceMember.LethargicWrite(plain.makeReadOnceMember); @@ -115,7 +113,7 @@ public async Task> PlainToOnlineAsync(Pocos.makeread [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(Pocos.makereadonce.MembersWithMakeReadOnce plain) + public async Task _PlainToOnlineNoacAsync(makereadonce.Pocos.MembersWithMakeReadOnce plain) { #pragma warning disable CS0612 makeReadOnceMember.LethargicWrite(plain.makeReadOnceMember); @@ -136,9 +134,9 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.makereadonce.MembersWithMakeReadOnce plain = new Pocos.makereadonce.MembersWithMakeReadOnce(); + makereadonce.Pocos.MembersWithMakeReadOnce plain = new makereadonce.Pocos.MembersWithMakeReadOnce(); plain.makeReadOnceMember = makeReadOnceMember.Shadow; plain.someOtherMember = someOtherMember.Shadow; plain.makeReadComplexMember = await makeReadComplexMember.ShadowToPlainAsync(); @@ -146,7 +144,7 @@ public async virtual Task ShadowToPlain() return plain; } - protected async Task ShadowToPlainAsync(Pocos.makereadonce.MembersWithMakeReadOnce plain) + protected async Task ShadowToPlainAsync(makereadonce.Pocos.MembersWithMakeReadOnce plain) { plain.makeReadOnceMember = makeReadOnceMember.Shadow; plain.someOtherMember = someOtherMember.Shadow; @@ -160,7 +158,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.makereadonce.MembersWithMakeReadOnce plain) + public async Task> PlainToShadowAsync(makereadonce.Pocos.MembersWithMakeReadOnce plain) { makeReadOnceMember.Shadow = plain.makeReadOnceMember; someOtherMember.Shadow = plain.someOtherMember; @@ -179,7 +177,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.makereadonce.MembersWithMakeReadOnce plain, Pocos.makereadonce.MembersWithMakeReadOnce latest = null) + public async Task DetectsAnyChangeAsync(makereadonce.Pocos.MembersWithMakeReadOnce plain, makereadonce.Pocos.MembersWithMakeReadOnce latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -204,24 +202,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.makereadonce.MembersWithMakeReadOnce CreateEmptyPoco() + public makereadonce.Pocos.MembersWithMakeReadOnce CreateEmptyPoco() { - return new Pocos.makereadonce.MembersWithMakeReadOnce(); + return new makereadonce.Pocos.MembersWithMakeReadOnce(); } 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; @@ -278,16 +279,13 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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 ComplexMember : AXSharp.Connector.ITwinObject { public OnlinerString someMember { get; } - public OnlinerString someOtherMember { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -312,9 +310,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.makereadonce.ComplexMember plain = new Pocos.makereadonce.ComplexMember(); + makereadonce.Pocos.ComplexMember plain = new makereadonce.Pocos.ComplexMember(); await this.ReadAsync(); plain.someMember = someMember.LastValue; plain.someOtherMember = someOtherMember.LastValue; @@ -323,9 +321,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.makereadonce.ComplexMember plain = new Pocos.makereadonce.ComplexMember(); + makereadonce.Pocos.ComplexMember plain = new makereadonce.Pocos.ComplexMember(); plain.someMember = someMember.LastValue; plain.someOtherMember = someOtherMember.LastValue; return plain; @@ -333,7 +331,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.makereadonce.ComplexMember plain) + protected async Task _OnlineToPlainNoacAsync(makereadonce.Pocos.ComplexMember plain) { plain.someMember = someMember.LastValue; plain.someOtherMember = someOtherMember.LastValue; @@ -345,7 +343,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.makereadonce.ComplexMember plain) + public async Task> PlainToOnlineAsync(makereadonce.Pocos.ComplexMember plain) { #pragma warning disable CS0612 someMember.LethargicWrite(plain.someMember); @@ -358,7 +356,7 @@ public async Task> PlainToOnlineAsync(Pocos.makeread [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(Pocos.makereadonce.ComplexMember plain) + public async Task _PlainToOnlineNoacAsync(makereadonce.Pocos.ComplexMember plain) { #pragma warning disable CS0612 someMember.LethargicWrite(plain.someMember); @@ -373,15 +371,15 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.makereadonce.ComplexMember plain = new Pocos.makereadonce.ComplexMember(); + makereadonce.Pocos.ComplexMember plain = new makereadonce.Pocos.ComplexMember(); plain.someMember = someMember.Shadow; plain.someOtherMember = someOtherMember.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.makereadonce.ComplexMember plain) + protected async Task ShadowToPlainAsync(makereadonce.Pocos.ComplexMember plain) { plain.someMember = someMember.Shadow; plain.someOtherMember = someOtherMember.Shadow; @@ -393,7 +391,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.makereadonce.ComplexMember plain) + public async Task> PlainToShadowAsync(makereadonce.Pocos.ComplexMember plain) { someMember.Shadow = plain.someMember; someOtherMember.Shadow = plain.someOtherMember; @@ -410,7 +408,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.makereadonce.ComplexMember plain, Pocos.makereadonce.ComplexMember latest = null) + public async Task DetectsAnyChangeAsync(makereadonce.Pocos.ComplexMember plain, makereadonce.Pocos.ComplexMember latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -431,24 +429,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.makereadonce.ComplexMember CreateEmptyPoco() + public makereadonce.Pocos.ComplexMember CreateEmptyPoco() { - return new Pocos.makereadonce.ComplexMember(); + return new makereadonce.Pocos.ComplexMember(); } 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; @@ -505,9 +506,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/makereadonly.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/makereadonly.g.cs index 3ddfc24b1..7bb29172f 100644 --- 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/.g/Onliners/makereadonly.g.cs @@ -11,12 +11,10 @@ public partial class MembersWithMakeReadOnly : AXSharp.Connector.ITwinObject { [ReadOnly()] public OnlinerString makeReadOnceMember { get; } - public OnlinerString someOtherMember { get; } [ReadOnly()] public makereadonly.ComplexMember makeReadComplexMember { get; } - public makereadonly.ComplexMember someotherComplexMember { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -45,9 +43,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.makereadonly.MembersWithMakeReadOnly plain = new Pocos.makereadonly.MembersWithMakeReadOnly(); + makereadonly.Pocos.MembersWithMakeReadOnly plain = new makereadonly.Pocos.MembersWithMakeReadOnly(); await this.ReadAsync(); plain.makeReadOnceMember = makeReadOnceMember.LastValue; plain.someOtherMember = someOtherMember.LastValue; @@ -62,9 +60,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.makereadonly.MembersWithMakeReadOnly plain = new Pocos.makereadonly.MembersWithMakeReadOnly(); + makereadonly.Pocos.MembersWithMakeReadOnly plain = new makereadonly.Pocos.MembersWithMakeReadOnly(); plain.makeReadOnceMember = makeReadOnceMember.LastValue; plain.someOtherMember = someOtherMember.LastValue; #pragma warning disable CS0612 @@ -78,7 +76,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.makereadonly.MembersWithMakeReadOnly plain) + protected async Task _OnlineToPlainNoacAsync(makereadonly.Pocos.MembersWithMakeReadOnly plain) { plain.makeReadOnceMember = makeReadOnceMember.LastValue; plain.someOtherMember = someOtherMember.LastValue; @@ -96,7 +94,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.makereadonly.MembersWithMakeReadOnly plain) + public async Task> PlainToOnlineAsync(makereadonly.Pocos.MembersWithMakeReadOnly plain) { #pragma warning disable CS0612 makeReadOnceMember.LethargicWrite(plain.makeReadOnceMember); @@ -115,7 +113,7 @@ public async Task> PlainToOnlineAsync(Pocos.makeread [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(Pocos.makereadonly.MembersWithMakeReadOnly plain) + public async Task _PlainToOnlineNoacAsync(makereadonly.Pocos.MembersWithMakeReadOnly plain) { #pragma warning disable CS0612 makeReadOnceMember.LethargicWrite(plain.makeReadOnceMember); @@ -136,9 +134,9 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.makereadonly.MembersWithMakeReadOnly plain = new Pocos.makereadonly.MembersWithMakeReadOnly(); + makereadonly.Pocos.MembersWithMakeReadOnly plain = new makereadonly.Pocos.MembersWithMakeReadOnly(); plain.makeReadOnceMember = makeReadOnceMember.Shadow; plain.someOtherMember = someOtherMember.Shadow; plain.makeReadComplexMember = await makeReadComplexMember.ShadowToPlainAsync(); @@ -146,7 +144,7 @@ public async virtual Task ShadowToPlain() return plain; } - protected async Task ShadowToPlainAsync(Pocos.makereadonly.MembersWithMakeReadOnly plain) + protected async Task ShadowToPlainAsync(makereadonly.Pocos.MembersWithMakeReadOnly plain) { plain.makeReadOnceMember = makeReadOnceMember.Shadow; plain.someOtherMember = someOtherMember.Shadow; @@ -160,7 +158,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.makereadonly.MembersWithMakeReadOnly plain) + public async Task> PlainToShadowAsync(makereadonly.Pocos.MembersWithMakeReadOnly plain) { makeReadOnceMember.Shadow = plain.makeReadOnceMember; someOtherMember.Shadow = plain.someOtherMember; @@ -179,7 +177,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.makereadonly.MembersWithMakeReadOnly plain, Pocos.makereadonly.MembersWithMakeReadOnly latest = null) + public async Task DetectsAnyChangeAsync(makereadonly.Pocos.MembersWithMakeReadOnly plain, makereadonly.Pocos.MembersWithMakeReadOnly latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -204,24 +202,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.makereadonly.MembersWithMakeReadOnly CreateEmptyPoco() + public makereadonly.Pocos.MembersWithMakeReadOnly CreateEmptyPoco() { - return new Pocos.makereadonly.MembersWithMakeReadOnly(); + return new makereadonly.Pocos.MembersWithMakeReadOnly(); } 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; @@ -278,16 +279,13 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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 ComplexMember : AXSharp.Connector.ITwinObject { public OnlinerString someMember { get; } - public OnlinerString someOtherMember { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -312,9 +310,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.makereadonly.ComplexMember plain = new Pocos.makereadonly.ComplexMember(); + makereadonly.Pocos.ComplexMember plain = new makereadonly.Pocos.ComplexMember(); await this.ReadAsync(); plain.someMember = someMember.LastValue; plain.someOtherMember = someOtherMember.LastValue; @@ -323,9 +321,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.makereadonly.ComplexMember plain = new Pocos.makereadonly.ComplexMember(); + makereadonly.Pocos.ComplexMember plain = new makereadonly.Pocos.ComplexMember(); plain.someMember = someMember.LastValue; plain.someOtherMember = someOtherMember.LastValue; return plain; @@ -333,7 +331,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.makereadonly.ComplexMember plain) + protected async Task _OnlineToPlainNoacAsync(makereadonly.Pocos.ComplexMember plain) { plain.someMember = someMember.LastValue; plain.someOtherMember = someOtherMember.LastValue; @@ -345,7 +343,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.makereadonly.ComplexMember plain) + public async Task> PlainToOnlineAsync(makereadonly.Pocos.ComplexMember plain) { #pragma warning disable CS0612 someMember.LethargicWrite(plain.someMember); @@ -358,7 +356,7 @@ public async Task> PlainToOnlineAsync(Pocos.makeread [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(Pocos.makereadonly.ComplexMember plain) + public async Task _PlainToOnlineNoacAsync(makereadonly.Pocos.ComplexMember plain) { #pragma warning disable CS0612 someMember.LethargicWrite(plain.someMember); @@ -373,15 +371,15 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.makereadonly.ComplexMember plain = new Pocos.makereadonly.ComplexMember(); + makereadonly.Pocos.ComplexMember plain = new makereadonly.Pocos.ComplexMember(); plain.someMember = someMember.Shadow; plain.someOtherMember = someOtherMember.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.makereadonly.ComplexMember plain) + protected async Task ShadowToPlainAsync(makereadonly.Pocos.ComplexMember plain) { plain.someMember = someMember.Shadow; plain.someOtherMember = someOtherMember.Shadow; @@ -393,7 +391,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.makereadonly.ComplexMember plain) + public async Task> PlainToShadowAsync(makereadonly.Pocos.ComplexMember plain) { someMember.Shadow = plain.someMember; someOtherMember.Shadow = plain.someOtherMember; @@ -410,7 +408,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.makereadonly.ComplexMember plain, Pocos.makereadonly.ComplexMember latest = null) + public async Task DetectsAnyChangeAsync(makereadonly.Pocos.ComplexMember plain, makereadonly.Pocos.ComplexMember latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -431,24 +429,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.makereadonly.ComplexMember CreateEmptyPoco() + public makereadonly.Pocos.ComplexMember CreateEmptyPoco() { - return new Pocos.makereadonly.ComplexMember(); + return new makereadonly.Pocos.ComplexMember(); } 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; @@ -505,9 +506,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/misc.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/misc.g.cs index 86d9dce5d..460f0f170 100644 --- 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/.g/Onliners/misc.g.cs @@ -37,9 +37,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.Enums.ClassWithEnums plain = new Pocos.Enums.ClassWithEnums(); + Enums.Pocos.ClassWithEnums plain = new Enums.Pocos.ClassWithEnums(); await this.ReadAsync(); plain.colors = (Enums.Colors)colors.LastValue; plain.NamedValuesColors = NamedValuesColors.LastValue; @@ -48,9 +48,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.Enums.ClassWithEnums plain = new Pocos.Enums.ClassWithEnums(); + Enums.Pocos.ClassWithEnums plain = new Enums.Pocos.ClassWithEnums(); plain.colors = (Enums.Colors)colors.LastValue; plain.NamedValuesColors = NamedValuesColors.LastValue; return plain; @@ -58,7 +58,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.Enums.ClassWithEnums plain) + protected async Task _OnlineToPlainNoacAsync(Enums.Pocos.ClassWithEnums plain) { plain.colors = (Enums.Colors)colors.LastValue; plain.NamedValuesColors = NamedValuesColors.LastValue; @@ -70,7 +70,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.Enums.ClassWithEnums plain) + public async Task> PlainToOnlineAsync(Enums.Pocos.ClassWithEnums plain) { #pragma warning disable CS0612 colors.LethargicWrite((short)plain.colors); @@ -83,7 +83,7 @@ public async Task> PlainToOnlineAsync(Pocos.Enums.Cl [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(Pocos.Enums.ClassWithEnums plain) + public async Task _PlainToOnlineNoacAsync(Enums.Pocos.ClassWithEnums plain) { #pragma warning disable CS0612 colors.LethargicWrite((short)plain.colors); @@ -98,15 +98,15 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.Enums.ClassWithEnums plain = new Pocos.Enums.ClassWithEnums(); + Enums.Pocos.ClassWithEnums plain = new Enums.Pocos.ClassWithEnums(); plain.colors = (Enums.Colors)colors.Shadow; plain.NamedValuesColors = NamedValuesColors.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.Enums.ClassWithEnums plain) + protected async Task ShadowToPlainAsync(Enums.Pocos.ClassWithEnums plain) { plain.colors = (Enums.Colors)colors.Shadow; plain.NamedValuesColors = NamedValuesColors.Shadow; @@ -118,7 +118,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.Enums.ClassWithEnums plain) + public async Task> PlainToShadowAsync(Enums.Pocos.ClassWithEnums plain) { colors.Shadow = (short)plain.colors; NamedValuesColors.Shadow = plain.NamedValuesColors; @@ -135,7 +135,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.Enums.ClassWithEnums plain, Pocos.Enums.ClassWithEnums latest = null) + public async Task DetectsAnyChangeAsync(Enums.Pocos.ClassWithEnums plain, Enums.Pocos.ClassWithEnums latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -156,24 +156,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.Enums.ClassWithEnums CreateEmptyPoco() + public Enums.Pocos.ClassWithEnums CreateEmptyPoco() { - return new Pocos.Enums.ClassWithEnums(); + return new Enums.Pocos.ClassWithEnums(); } 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; @@ -230,9 +233,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } @@ -256,7 +257,6 @@ namespace misc public partial class VariousMembers : AXSharp.Connector.ITwinObject { public misc.SomeClass _SomeClass { get; } - public misc.Motor _Motor { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -281,9 +281,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.misc.VariousMembers plain = new Pocos.misc.VariousMembers(); + misc.Pocos.VariousMembers plain = new misc.Pocos.VariousMembers(); await this.ReadAsync(); #pragma warning disable CS0612 plain._SomeClass = await _SomeClass._OnlineToPlainNoacAsync(); @@ -296,9 +296,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.misc.VariousMembers plain = new Pocos.misc.VariousMembers(); + misc.Pocos.VariousMembers plain = new misc.Pocos.VariousMembers(); #pragma warning disable CS0612 plain._SomeClass = await _SomeClass._OnlineToPlainNoacAsync(); #pragma warning restore CS0612 @@ -310,7 +310,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.misc.VariousMembers plain) + protected async Task _OnlineToPlainNoacAsync(misc.Pocos.VariousMembers plain) { #pragma warning disable CS0612 plain._SomeClass = await _SomeClass._OnlineToPlainNoacAsync(); @@ -326,7 +326,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.misc.VariousMembers plain) + public async Task> PlainToOnlineAsync(misc.Pocos.VariousMembers plain) { #pragma warning disable CS0612 await this._SomeClass._PlainToOnlineNoacAsync(plain._SomeClass); @@ -339,7 +339,7 @@ public async Task> PlainToOnlineAsync(Pocos.misc.Var [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(Pocos.misc.VariousMembers plain) + public async Task _PlainToOnlineNoacAsync(misc.Pocos.VariousMembers plain) { #pragma warning disable CS0612 await this._SomeClass._PlainToOnlineNoacAsync(plain._SomeClass); @@ -354,15 +354,15 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.misc.VariousMembers plain = new Pocos.misc.VariousMembers(); + misc.Pocos.VariousMembers plain = new misc.Pocos.VariousMembers(); plain._SomeClass = await _SomeClass.ShadowToPlainAsync(); plain._Motor = await _Motor.ShadowToPlainAsync(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.misc.VariousMembers plain) + protected async Task ShadowToPlainAsync(misc.Pocos.VariousMembers plain) { plain._SomeClass = await _SomeClass.ShadowToPlainAsync(); plain._Motor = await _Motor.ShadowToPlainAsync(); @@ -374,7 +374,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.misc.VariousMembers plain) + public async Task> PlainToShadowAsync(misc.Pocos.VariousMembers plain) { await this._SomeClass.PlainToShadowAsync(plain._SomeClass); await this._Motor.PlainToShadowAsync(plain._Motor); @@ -391,7 +391,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.misc.VariousMembers plain, Pocos.misc.VariousMembers latest = null) + public async Task DetectsAnyChangeAsync(misc.Pocos.VariousMembers plain, misc.Pocos.VariousMembers latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -412,24 +412,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.misc.VariousMembers CreateEmptyPoco() + public misc.Pocos.VariousMembers CreateEmptyPoco() { - return new Pocos.misc.VariousMembers(); + return new misc.Pocos.VariousMembers(); } 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; @@ -486,9 +489,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } @@ -517,9 +518,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.misc.SomeClass plain = new Pocos.misc.SomeClass(); + misc.Pocos.SomeClass plain = new misc.Pocos.SomeClass(); await this.ReadAsync(); plain.SomeClassVariable = SomeClassVariable.LastValue; return plain; @@ -527,16 +528,16 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.misc.SomeClass plain = new Pocos.misc.SomeClass(); + misc.Pocos.SomeClass plain = new misc.Pocos.SomeClass(); plain.SomeClassVariable = SomeClassVariable.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(Pocos.misc.SomeClass plain) + protected async Task _OnlineToPlainNoacAsync(misc.Pocos.SomeClass plain) { plain.SomeClassVariable = SomeClassVariable.LastValue; return plain; @@ -547,7 +548,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.misc.SomeClass plain) + public async Task> PlainToOnlineAsync(misc.Pocos.SomeClass plain) { #pragma warning disable CS0612 SomeClassVariable.LethargicWrite(plain.SomeClassVariable); @@ -557,7 +558,7 @@ public async Task> PlainToOnlineAsync(Pocos.misc.Som [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(Pocos.misc.SomeClass plain) + public async Task _PlainToOnlineNoacAsync(misc.Pocos.SomeClass plain) { #pragma warning disable CS0612 SomeClassVariable.LethargicWrite(plain.SomeClassVariable); @@ -569,14 +570,14 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.misc.SomeClass plain = new Pocos.misc.SomeClass(); + misc.Pocos.SomeClass plain = new misc.Pocos.SomeClass(); plain.SomeClassVariable = SomeClassVariable.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.misc.SomeClass plain) + protected async Task ShadowToPlainAsync(misc.Pocos.SomeClass plain) { plain.SomeClassVariable = SomeClassVariable.Shadow; return plain; @@ -587,7 +588,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.misc.SomeClass plain) + public async Task> PlainToShadowAsync(misc.Pocos.SomeClass plain) { SomeClassVariable.Shadow = plain.SomeClassVariable; return this.RetrievePrimitives(); @@ -603,7 +604,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.misc.SomeClass plain, Pocos.misc.SomeClass latest = null) + public async Task DetectsAnyChangeAsync(misc.Pocos.SomeClass plain, misc.Pocos.SomeClass latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -622,24 +623,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.misc.SomeClass CreateEmptyPoco() + public misc.Pocos.SomeClass CreateEmptyPoco() { - return new Pocos.misc.SomeClass(); + return new misc.Pocos.SomeClass(); } 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; @@ -696,9 +700,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } @@ -727,9 +729,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.misc.Motor plain = new Pocos.misc.Motor(); + misc.Pocos.Motor plain = new misc.Pocos.Motor(); await this.ReadAsync(); plain.isRunning = isRunning.LastValue; return plain; @@ -737,14 +739,14 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.misc.Motor plain = new Pocos.misc.Motor(); + misc.Pocos.Motor plain = new misc.Pocos.Motor(); plain.isRunning = isRunning.LastValue; return plain; } - protected async Task OnlineToPlainAsync(Pocos.misc.Motor plain) + protected async Task OnlineToPlainAsync(misc.Pocos.Motor plain) { plain.isRunning = isRunning.LastValue; return plain; @@ -755,7 +757,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.misc.Motor plain) + public async Task> PlainToOnlineAsync(misc.Pocos.Motor plain) { #pragma warning disable CS0612 isRunning.LethargicWrite(plain.isRunning); @@ -765,7 +767,7 @@ public async Task> PlainToOnlineAsync(Pocos.misc.Mot [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(Pocos.misc.Motor plain) + public async Task _PlainToOnlineNoacAsync(misc.Pocos.Motor plain) { #pragma warning disable CS0612 isRunning.LethargicWrite(plain.isRunning); @@ -777,14 +779,14 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.misc.Motor plain = new Pocos.misc.Motor(); + misc.Pocos.Motor plain = new misc.Pocos.Motor(); plain.isRunning = isRunning.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.misc.Motor plain) + protected async Task ShadowToPlainAsync(misc.Pocos.Motor plain) { plain.isRunning = isRunning.Shadow; return plain; @@ -795,7 +797,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.misc.Motor plain) + public async Task> PlainToShadowAsync(misc.Pocos.Motor plain) { isRunning.Shadow = plain.isRunning; return this.RetrievePrimitives(); @@ -811,7 +813,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.misc.Motor plain, Pocos.misc.Motor latest = null) + public async Task DetectsAnyChangeAsync(misc.Pocos.Motor plain, misc.Pocos.Motor latest = null) { var somethingChanged = false; if (latest == null) @@ -830,24 +832,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.misc.Motor CreateEmptyPoco() + public misc.Pocos.Motor CreateEmptyPoco() { - return new Pocos.misc.Motor(); + return new misc.Pocos.Motor(); } 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; @@ -904,16 +909,13 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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 Vehicle : AXSharp.Connector.ITwinObject { public misc.Motor m { get; } - public OnlinerInt displacement { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -938,9 +940,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.misc.Vehicle plain = new Pocos.misc.Vehicle(); + misc.Pocos.Vehicle plain = new misc.Pocos.Vehicle(); await this.ReadAsync(); #pragma warning disable CS0612 plain.m = await m._OnlineToPlainNoacAsync(); @@ -951,9 +953,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.misc.Vehicle plain = new Pocos.misc.Vehicle(); + misc.Pocos.Vehicle plain = new misc.Pocos.Vehicle(); #pragma warning disable CS0612 plain.m = await m._OnlineToPlainNoacAsync(); #pragma warning restore CS0612 @@ -961,7 +963,7 @@ public async virtual Task OnlineToPlain() return plain; } - protected async Task OnlineToPlainAsync(Pocos.misc.Vehicle plain) + protected async Task OnlineToPlainAsync(misc.Pocos.Vehicle plain) { #pragma warning disable CS0612 plain.m = await m._OnlineToPlainNoacAsync(); @@ -975,7 +977,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.misc.Vehicle plain) + public async Task> PlainToOnlineAsync(misc.Pocos.Vehicle plain) { #pragma warning disable CS0612 await this.m._PlainToOnlineNoacAsync(plain.m); @@ -988,7 +990,7 @@ public async Task> PlainToOnlineAsync(Pocos.misc.Veh [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(Pocos.misc.Vehicle plain) + public async Task _PlainToOnlineNoacAsync(misc.Pocos.Vehicle plain) { #pragma warning disable CS0612 await this.m._PlainToOnlineNoacAsync(plain.m); @@ -1003,15 +1005,15 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.misc.Vehicle plain = new Pocos.misc.Vehicle(); + misc.Pocos.Vehicle plain = new misc.Pocos.Vehicle(); plain.m = await m.ShadowToPlainAsync(); plain.displacement = displacement.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.misc.Vehicle plain) + protected async Task ShadowToPlainAsync(misc.Pocos.Vehicle plain) { plain.m = await m.ShadowToPlainAsync(); plain.displacement = displacement.Shadow; @@ -1023,7 +1025,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.misc.Vehicle plain) + public async Task> PlainToShadowAsync(misc.Pocos.Vehicle plain) { await this.m.PlainToShadowAsync(plain.m); displacement.Shadow = plain.displacement; @@ -1040,7 +1042,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.misc.Vehicle plain, Pocos.misc.Vehicle latest = null) + public async Task DetectsAnyChangeAsync(misc.Pocos.Vehicle plain, misc.Pocos.Vehicle latest = null) { var somethingChanged = false; if (latest == null) @@ -1061,24 +1063,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.misc.Vehicle CreateEmptyPoco() + public misc.Pocos.Vehicle CreateEmptyPoco() { - return new Pocos.misc.Vehicle(); + return new misc.Pocos.Vehicle(); } 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; @@ -1135,9 +1140,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } } @@ -1147,7 +1150,6 @@ namespace UnknownArraysShouldNotBeTraspiled public partial class ClassWithArrays : AXSharp.Connector.ITwinObject { public UnknownArraysShouldNotBeTraspiled.Complex[] _complexKnown { get; } - public OnlinerByte[] _primitive { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -1174,9 +1176,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays plain = new Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays(); + UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays plain = new UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays(); await this.ReadAsync(); #pragma warning disable CS0612 plain._complexKnown = _complexKnown.Select(async p => await p._OnlineToPlainNoacAsync()).Select(p => p.Result).ToArray(); @@ -1187,9 +1189,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays plain = new Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays(); + UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays plain = new UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays(); #pragma warning disable CS0612 plain._complexKnown = _complexKnown.Select(async p => await p._OnlineToPlainNoacAsync()).Select(p => p.Result).ToArray(); #pragma warning restore CS0612 @@ -1199,7 +1201,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays plain) + protected async Task _OnlineToPlainNoacAsync(UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays plain) { #pragma warning disable CS0612 plain._complexKnown = _complexKnown.Select(async p => await p._OnlineToPlainNoacAsync()).Select(p => p.Result).ToArray(); @@ -1213,7 +1215,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays plain) + public async Task> PlainToOnlineAsync(UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays plain) { var __complexKnown_i_FE8484DAB3 = 0; #pragma warning disable CS0612 @@ -1228,7 +1230,7 @@ public async Task> PlainToOnlineAsync(Pocos.UnknownA [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(Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays plain) + public async Task _PlainToOnlineNoacAsync(UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays plain) { var __complexKnown_i_FE8484DAB3 = 0; #pragma warning disable CS0612 @@ -1245,15 +1247,15 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays plain = new Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays(); + UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays plain = new UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays(); plain._complexKnown = _complexKnown.Select(async p => await p.ShadowToPlainAsync()).Select(p => p.Result).ToArray(); plain._primitive = _primitive.Select(p => p.Shadow).ToArray(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays plain) + protected async Task ShadowToPlainAsync(UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays plain) { plain._complexKnown = _complexKnown.Select(async p => await p.ShadowToPlainAsync()).Select(p => p.Result).ToArray(); plain._primitive = _primitive.Select(p => p.Shadow).ToArray(); @@ -1265,7 +1267,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays plain) + public async Task> PlainToShadowAsync(UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays plain) { var __complexKnown_i_FE8484DAB3 = 0; _complexKnown.Select(p => p.PlainToShadowAsync(plain._complexKnown[__complexKnown_i_FE8484DAB3++])).ToArray(); @@ -1284,7 +1286,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays plain, Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays latest = null) + public async Task DetectsAnyChangeAsync(UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays plain, UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -1313,24 +1315,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays CreateEmptyPoco() + public UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays CreateEmptyPoco() { - return new Pocos.UnknownArraysShouldNotBeTraspiled.ClassWithArrays(); + return new UnknownArraysShouldNotBeTraspiled.Pocos.ClassWithArrays(); } 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; @@ -1387,16 +1392,13 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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 Complex : AXSharp.Connector.ITwinObject { public OnlinerString HelloString { get; } - public OnlinerULInt Id { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -1421,9 +1423,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.UnknownArraysShouldNotBeTraspiled.Complex plain = new Pocos.UnknownArraysShouldNotBeTraspiled.Complex(); + UnknownArraysShouldNotBeTraspiled.Pocos.Complex plain = new UnknownArraysShouldNotBeTraspiled.Pocos.Complex(); await this.ReadAsync(); plain.HelloString = HelloString.LastValue; plain.Id = Id.LastValue; @@ -1432,9 +1434,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.UnknownArraysShouldNotBeTraspiled.Complex plain = new Pocos.UnknownArraysShouldNotBeTraspiled.Complex(); + UnknownArraysShouldNotBeTraspiled.Pocos.Complex plain = new UnknownArraysShouldNotBeTraspiled.Pocos.Complex(); plain.HelloString = HelloString.LastValue; plain.Id = Id.LastValue; return plain; @@ -1442,7 +1444,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.UnknownArraysShouldNotBeTraspiled.Complex plain) + protected async Task _OnlineToPlainNoacAsync(UnknownArraysShouldNotBeTraspiled.Pocos.Complex plain) { plain.HelloString = HelloString.LastValue; plain.Id = Id.LastValue; @@ -1454,7 +1456,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.UnknownArraysShouldNotBeTraspiled.Complex plain) + public async Task> PlainToOnlineAsync(UnknownArraysShouldNotBeTraspiled.Pocos.Complex plain) { #pragma warning disable CS0612 HelloString.LethargicWrite(plain.HelloString); @@ -1467,7 +1469,7 @@ public async Task> PlainToOnlineAsync(Pocos.UnknownA [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(Pocos.UnknownArraysShouldNotBeTraspiled.Complex plain) + public async Task _PlainToOnlineNoacAsync(UnknownArraysShouldNotBeTraspiled.Pocos.Complex plain) { #pragma warning disable CS0612 HelloString.LethargicWrite(plain.HelloString); @@ -1482,15 +1484,15 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.UnknownArraysShouldNotBeTraspiled.Complex plain = new Pocos.UnknownArraysShouldNotBeTraspiled.Complex(); + UnknownArraysShouldNotBeTraspiled.Pocos.Complex plain = new UnknownArraysShouldNotBeTraspiled.Pocos.Complex(); plain.HelloString = HelloString.Shadow; plain.Id = Id.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.UnknownArraysShouldNotBeTraspiled.Complex plain) + protected async Task ShadowToPlainAsync(UnknownArraysShouldNotBeTraspiled.Pocos.Complex plain) { plain.HelloString = HelloString.Shadow; plain.Id = Id.Shadow; @@ -1502,7 +1504,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.UnknownArraysShouldNotBeTraspiled.Complex plain) + public async Task> PlainToShadowAsync(UnknownArraysShouldNotBeTraspiled.Pocos.Complex plain) { HelloString.Shadow = plain.HelloString; Id.Shadow = plain.Id; @@ -1519,7 +1521,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.UnknownArraysShouldNotBeTraspiled.Complex plain, Pocos.UnknownArraysShouldNotBeTraspiled.Complex latest = null) + public async Task DetectsAnyChangeAsync(UnknownArraysShouldNotBeTraspiled.Pocos.Complex plain, UnknownArraysShouldNotBeTraspiled.Pocos.Complex latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -1540,24 +1542,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.UnknownArraysShouldNotBeTraspiled.Complex CreateEmptyPoco() + public UnknownArraysShouldNotBeTraspiled.Pocos.Complex CreateEmptyPoco() { - return new Pocos.UnknownArraysShouldNotBeTraspiled.Complex(); + return new UnknownArraysShouldNotBeTraspiled.Pocos.Complex(); } 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; @@ -1614,9 +1619,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/mixed_access.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/mixed_access.g.cs index 06477de59..8646778ce 100644 --- 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/.g/Onliners/mixed_access.g.cs @@ -8,19 +8,12 @@ public partial class unitsTwinController : ITwinController { public AXSharp.Connector.Connector Connector { 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; } public unitsTwinController(AXSharp.Connector.ConnectorAdapter adapter, object[] parameters) @@ -73,9 +66,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.Motor plain = new Pocos.Motor(); + global::Pocos.Motor plain = new global::Pocos.Motor(); await this.ReadAsync(); plain.Run = Run.LastValue; return plain; @@ -83,16 +76,16 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.Motor plain = new Pocos.Motor(); + global::Pocos.Motor plain = new global::Pocos.Motor(); plain.Run = Run.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(Pocos.Motor plain) + protected async Task _OnlineToPlainNoacAsync(global::Pocos.Motor plain) { plain.Run = Run.LastValue; return plain; @@ -103,7 +96,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.Motor plain) + public async Task> PlainToOnlineAsync(global::Pocos.Motor plain) { #pragma warning disable CS0612 Run.LethargicWrite(plain.Run); @@ -113,7 +106,7 @@ public async Task> PlainToOnlineAsync(Pocos.Motor pl [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(Pocos.Motor plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.Motor plain) { #pragma warning disable CS0612 Run.LethargicWrite(plain.Run); @@ -125,14 +118,14 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.Motor plain = new Pocos.Motor(); + global::Pocos.Motor plain = new global::Pocos.Motor(); plain.Run = Run.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.Motor plain) + protected async Task ShadowToPlainAsync(global::Pocos.Motor plain) { plain.Run = Run.Shadow; return plain; @@ -143,7 +136,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.Motor plain) + public async Task> PlainToShadowAsync(global::Pocos.Motor plain) { Run.Shadow = plain.Run; return this.RetrievePrimitives(); @@ -159,7 +152,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.Motor plain, Pocos.Motor latest = null) + public async Task DetectsAnyChangeAsync(global::Pocos.Motor plain, global::Pocos.Motor latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -178,24 +171,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.Motor CreateEmptyPoco() + public global::Pocos.Motor CreateEmptyPoco() { - return new Pocos.Motor(); + return new global::Pocos.Motor(); } 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; @@ -252,9 +248,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } @@ -283,9 +277,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.struct1 plain = new Pocos.struct1(); + global::Pocos.struct1 plain = new global::Pocos.struct1(); await this.ReadAsync(); #pragma warning disable CS0612 plain.s2 = await s2._OnlineToPlainNoacAsync(); @@ -295,16 +289,16 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.struct1 plain = new Pocos.struct1(); + global::Pocos.struct1 plain = new global::Pocos.struct1(); #pragma warning disable CS0612 plain.s2 = await s2._OnlineToPlainNoacAsync(); #pragma warning restore CS0612 return plain; } - protected async Task OnlineToPlainAsync(Pocos.struct1 plain) + protected async Task OnlineToPlainAsync(global::Pocos.struct1 plain) { #pragma warning disable CS0612 plain.s2 = await s2._OnlineToPlainNoacAsync(); @@ -317,7 +311,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.struct1 plain) + public async Task> PlainToOnlineAsync(global::Pocos.struct1 plain) { #pragma warning disable CS0612 await this.s2._PlainToOnlineNoacAsync(plain.s2); @@ -327,7 +321,7 @@ public async Task> PlainToOnlineAsync(Pocos.struct1 [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(Pocos.struct1 plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.struct1 plain) { #pragma warning disable CS0612 await this.s2._PlainToOnlineNoacAsync(plain.s2); @@ -339,14 +333,14 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.struct1 plain = new Pocos.struct1(); + global::Pocos.struct1 plain = new global::Pocos.struct1(); plain.s2 = await s2.ShadowToPlainAsync(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.struct1 plain) + protected async Task ShadowToPlainAsync(global::Pocos.struct1 plain) { plain.s2 = await s2.ShadowToPlainAsync(); return plain; @@ -357,7 +351,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.struct1 plain) + public async Task> PlainToShadowAsync(global::Pocos.struct1 plain) { await this.s2.PlainToShadowAsync(plain.s2); return this.RetrievePrimitives(); @@ -373,7 +367,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.struct1 plain, Pocos.struct1 latest = null) + public async Task DetectsAnyChangeAsync(global::Pocos.struct1 plain, global::Pocos.struct1 latest = null) { var somethingChanged = false; if (latest == null) @@ -392,24 +386,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.struct1 CreateEmptyPoco() + public global::Pocos.struct1 CreateEmptyPoco() { - return new Pocos.struct1(); + return new global::Pocos.struct1(); } 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; @@ -466,9 +463,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } @@ -497,9 +492,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.struct2 plain = new Pocos.struct2(); + global::Pocos.struct2 plain = new global::Pocos.struct2(); await this.ReadAsync(); #pragma warning disable CS0612 plain.s3 = await s3._OnlineToPlainNoacAsync(); @@ -509,16 +504,16 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.struct2 plain = new Pocos.struct2(); + global::Pocos.struct2 plain = new global::Pocos.struct2(); #pragma warning disable CS0612 plain.s3 = await s3._OnlineToPlainNoacAsync(); #pragma warning restore CS0612 return plain; } - protected async Task OnlineToPlainAsync(Pocos.struct2 plain) + protected async Task OnlineToPlainAsync(global::Pocos.struct2 plain) { #pragma warning disable CS0612 plain.s3 = await s3._OnlineToPlainNoacAsync(); @@ -531,7 +526,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.struct2 plain) + public async Task> PlainToOnlineAsync(global::Pocos.struct2 plain) { #pragma warning disable CS0612 await this.s3._PlainToOnlineNoacAsync(plain.s3); @@ -541,7 +536,7 @@ public async Task> PlainToOnlineAsync(Pocos.struct2 [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(Pocos.struct2 plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.struct2 plain) { #pragma warning disable CS0612 await this.s3._PlainToOnlineNoacAsync(plain.s3); @@ -553,14 +548,14 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.struct2 plain = new Pocos.struct2(); + global::Pocos.struct2 plain = new global::Pocos.struct2(); plain.s3 = await s3.ShadowToPlainAsync(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.struct2 plain) + protected async Task ShadowToPlainAsync(global::Pocos.struct2 plain) { plain.s3 = await s3.ShadowToPlainAsync(); return plain; @@ -571,7 +566,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.struct2 plain) + public async Task> PlainToShadowAsync(global::Pocos.struct2 plain) { await this.s3.PlainToShadowAsync(plain.s3); return this.RetrievePrimitives(); @@ -587,7 +582,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.struct2 plain, Pocos.struct2 latest = null) + public async Task DetectsAnyChangeAsync(global::Pocos.struct2 plain, global::Pocos.struct2 latest = null) { var somethingChanged = false; if (latest == null) @@ -606,24 +601,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.struct2 CreateEmptyPoco() + public global::Pocos.struct2 CreateEmptyPoco() { - return new Pocos.struct2(); + return new global::Pocos.struct2(); } 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; @@ -680,9 +678,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } @@ -711,9 +707,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.struct3 plain = new Pocos.struct3(); + global::Pocos.struct3 plain = new global::Pocos.struct3(); await this.ReadAsync(); #pragma warning disable CS0612 plain.s4 = await s4._OnlineToPlainNoacAsync(); @@ -723,16 +719,16 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.struct3 plain = new Pocos.struct3(); + global::Pocos.struct3 plain = new global::Pocos.struct3(); #pragma warning disable CS0612 plain.s4 = await s4._OnlineToPlainNoacAsync(); #pragma warning restore CS0612 return plain; } - protected async Task OnlineToPlainAsync(Pocos.struct3 plain) + protected async Task OnlineToPlainAsync(global::Pocos.struct3 plain) { #pragma warning disable CS0612 plain.s4 = await s4._OnlineToPlainNoacAsync(); @@ -745,7 +741,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.struct3 plain) + public async Task> PlainToOnlineAsync(global::Pocos.struct3 plain) { #pragma warning disable CS0612 await this.s4._PlainToOnlineNoacAsync(plain.s4); @@ -755,7 +751,7 @@ public async Task> PlainToOnlineAsync(Pocos.struct3 [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(Pocos.struct3 plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.struct3 plain) { #pragma warning disable CS0612 await this.s4._PlainToOnlineNoacAsync(plain.s4); @@ -767,14 +763,14 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.struct3 plain = new Pocos.struct3(); + global::Pocos.struct3 plain = new global::Pocos.struct3(); plain.s4 = await s4.ShadowToPlainAsync(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.struct3 plain) + protected async Task ShadowToPlainAsync(global::Pocos.struct3 plain) { plain.s4 = await s4.ShadowToPlainAsync(); return plain; @@ -785,7 +781,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.struct3 plain) + public async Task> PlainToShadowAsync(global::Pocos.struct3 plain) { await this.s4.PlainToShadowAsync(plain.s4); return this.RetrievePrimitives(); @@ -801,7 +797,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.struct3 plain, Pocos.struct3 latest = null) + public async Task DetectsAnyChangeAsync(global::Pocos.struct3 plain, global::Pocos.struct3 latest = null) { var somethingChanged = false; if (latest == null) @@ -820,24 +816,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.struct3 CreateEmptyPoco() + public global::Pocos.struct3 CreateEmptyPoco() { - return new Pocos.struct3(); + return new global::Pocos.struct3(); } 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; @@ -894,9 +893,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } @@ -925,9 +922,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.struct4 plain = new Pocos.struct4(); + global::Pocos.struct4 plain = new global::Pocos.struct4(); await this.ReadAsync(); plain.s5 = s5.LastValue; return plain; @@ -935,14 +932,14 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.struct4 plain = new Pocos.struct4(); + global::Pocos.struct4 plain = new global::Pocos.struct4(); plain.s5 = s5.LastValue; return plain; } - protected async Task OnlineToPlainAsync(Pocos.struct4 plain) + protected async Task OnlineToPlainAsync(global::Pocos.struct4 plain) { plain.s5 = s5.LastValue; return plain; @@ -953,7 +950,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.struct4 plain) + public async Task> PlainToOnlineAsync(global::Pocos.struct4 plain) { #pragma warning disable CS0612 s5.LethargicWrite(plain.s5); @@ -963,7 +960,7 @@ public async Task> PlainToOnlineAsync(Pocos.struct4 [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(Pocos.struct4 plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.struct4 plain) { #pragma warning disable CS0612 s5.LethargicWrite(plain.s5); @@ -975,14 +972,14 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.struct4 plain = new Pocos.struct4(); + global::Pocos.struct4 plain = new global::Pocos.struct4(); plain.s5 = s5.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.struct4 plain) + protected async Task ShadowToPlainAsync(global::Pocos.struct4 plain) { plain.s5 = s5.Shadow; return plain; @@ -993,7 +990,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.struct4 plain) + public async Task> PlainToShadowAsync(global::Pocos.struct4 plain) { s5.Shadow = plain.s5; return this.RetrievePrimitives(); @@ -1009,7 +1006,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.struct4 plain, Pocos.struct4 latest = null) + public async Task DetectsAnyChangeAsync(global::Pocos.struct4 plain, global::Pocos.struct4 latest = null) { var somethingChanged = false; if (latest == null) @@ -1028,24 +1025,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.struct4 CreateEmptyPoco() + public global::Pocos.struct4 CreateEmptyPoco() { - return new Pocos.struct4(); + return new global::Pocos.struct4(); } 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; @@ -1102,16 +1102,13 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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 AbstractMotor : AXSharp.Connector.ITwinObject { public OnlinerBool Run { get; } - public OnlinerBool ReverseDirection { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -1136,9 +1133,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.AbstractMotor plain = new Pocos.AbstractMotor(); + global::Pocos.AbstractMotor plain = new global::Pocos.AbstractMotor(); await this.ReadAsync(); plain.Run = Run.LastValue; plain.ReverseDirection = ReverseDirection.LastValue; @@ -1147,9 +1144,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.AbstractMotor plain = new Pocos.AbstractMotor(); + global::Pocos.AbstractMotor plain = new global::Pocos.AbstractMotor(); plain.Run = Run.LastValue; plain.ReverseDirection = ReverseDirection.LastValue; return plain; @@ -1157,7 +1154,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.AbstractMotor plain) + protected async Task _OnlineToPlainNoacAsync(global::Pocos.AbstractMotor plain) { plain.Run = Run.LastValue; plain.ReverseDirection = ReverseDirection.LastValue; @@ -1169,7 +1166,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.AbstractMotor plain) + public async Task> PlainToOnlineAsync(global::Pocos.AbstractMotor plain) { #pragma warning disable CS0612 Run.LethargicWrite(plain.Run); @@ -1182,7 +1179,7 @@ public async Task> PlainToOnlineAsync(Pocos.Abstract [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(Pocos.AbstractMotor plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.AbstractMotor plain) { #pragma warning disable CS0612 Run.LethargicWrite(plain.Run); @@ -1197,15 +1194,15 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.AbstractMotor plain = new Pocos.AbstractMotor(); + global::Pocos.AbstractMotor plain = new global::Pocos.AbstractMotor(); plain.Run = Run.Shadow; plain.ReverseDirection = ReverseDirection.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.AbstractMotor plain) + protected async Task ShadowToPlainAsync(global::Pocos.AbstractMotor plain) { plain.Run = Run.Shadow; plain.ReverseDirection = ReverseDirection.Shadow; @@ -1217,7 +1214,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.AbstractMotor plain) + public async Task> PlainToShadowAsync(global::Pocos.AbstractMotor plain) { Run.Shadow = plain.Run; ReverseDirection.Shadow = plain.ReverseDirection; @@ -1234,7 +1231,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.AbstractMotor plain, Pocos.AbstractMotor latest = null) + public async Task DetectsAnyChangeAsync(global::Pocos.AbstractMotor plain, global::Pocos.AbstractMotor latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -1255,24 +1252,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.AbstractMotor CreateEmptyPoco() + public global::Pocos.AbstractMotor CreateEmptyPoco() { - return new Pocos.AbstractMotor(); + 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; @@ -1329,9 +1329,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } @@ -1351,9 +1349,9 @@ public async override Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public new async Task OnlineToPlainAsync() + public new async Task OnlineToPlainAsync() { - Pocos.GenericMotor plain = new Pocos.GenericMotor(); + global::Pocos.GenericMotor plain = new global::Pocos.GenericMotor(); await this.ReadAsync(); #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); @@ -1363,9 +1361,9 @@ public async override Task OnlineToPlain() [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() + public new async Task _OnlineToPlainNoacAsync() { - Pocos.GenericMotor plain = new Pocos.GenericMotor(); + global::Pocos.GenericMotor plain = new global::Pocos.GenericMotor(); #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); #pragma warning restore CS0612 @@ -1374,7 +1372,7 @@ public async override Task OnlineToPlain() [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(Pocos.GenericMotor plain) + protected async Task _OnlineToPlainNoacAsync(global::Pocos.GenericMotor plain) { #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); @@ -1387,7 +1385,7 @@ public async override Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.GenericMotor plain) + public async Task> PlainToOnlineAsync(global::Pocos.GenericMotor plain) { await base._PlainToOnlineNoacAsync(plain); return await this.WriteAsync(); @@ -1395,7 +1393,7 @@ public async Task> PlainToOnlineAsync(Pocos.GenericM [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(Pocos.GenericMotor plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.GenericMotor plain) { await base._PlainToOnlineNoacAsync(plain); } @@ -1405,14 +1403,14 @@ public async override Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public new async Task ShadowToPlainAsync() + public new async Task ShadowToPlainAsync() { - Pocos.GenericMotor plain = new Pocos.GenericMotor(); + global::Pocos.GenericMotor plain = new global::Pocos.GenericMotor(); await base.ShadowToPlainAsync(plain); return plain; } - protected async Task ShadowToPlainAsync(Pocos.GenericMotor plain) + protected async Task ShadowToPlainAsync(global::Pocos.GenericMotor plain) { await base.ShadowToPlainAsync(plain); return plain; @@ -1423,7 +1421,7 @@ public async override Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.GenericMotor plain) + public async Task> PlainToShadowAsync(global::Pocos.GenericMotor plain) { await base.PlainToShadowAsync(plain); return this.RetrievePrimitives(); @@ -1439,7 +1437,7 @@ public async override Task AnyChangeAsync(T 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(Pocos.GenericMotor plain, Pocos.GenericMotor latest = null) + public new async Task DetectsAnyChangeAsync(global::Pocos.GenericMotor plain, global::Pocos.GenericMotor latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -1458,9 +1456,9 @@ public async override Task AnyChangeAsync(T plain) this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public new Pocos.GenericMotor CreateEmptyPoco() + public new global::Pocos.GenericMotor CreateEmptyPoco() { - return new Pocos.GenericMotor(); + return new global::Pocos.GenericMotor(); } } @@ -1480,9 +1478,9 @@ public async override Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public new async Task OnlineToPlainAsync() + public new async Task OnlineToPlainAsync() { - Pocos.SpecificMotorA plain = new Pocos.SpecificMotorA(); + global::Pocos.SpecificMotorA plain = new global::Pocos.SpecificMotorA(); await this.ReadAsync(); #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); @@ -1492,9 +1490,9 @@ public async override Task OnlineToPlain() [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() + public new async Task _OnlineToPlainNoacAsync() { - Pocos.SpecificMotorA plain = new Pocos.SpecificMotorA(); + global::Pocos.SpecificMotorA plain = new global::Pocos.SpecificMotorA(); #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); #pragma warning restore CS0612 @@ -1503,7 +1501,7 @@ public async override Task OnlineToPlain() [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(Pocos.SpecificMotorA plain) + protected async Task _OnlineToPlainNoacAsync(global::Pocos.SpecificMotorA plain) { #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); @@ -1516,7 +1514,7 @@ public async override Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.SpecificMotorA plain) + public async Task> PlainToOnlineAsync(global::Pocos.SpecificMotorA plain) { await base._PlainToOnlineNoacAsync(plain); return await this.WriteAsync(); @@ -1524,7 +1522,7 @@ public async Task> PlainToOnlineAsync(Pocos.Specific [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(Pocos.SpecificMotorA plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.SpecificMotorA plain) { await base._PlainToOnlineNoacAsync(plain); } @@ -1534,14 +1532,14 @@ public async override Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public new async Task ShadowToPlainAsync() + public new async Task ShadowToPlainAsync() { - Pocos.SpecificMotorA plain = new Pocos.SpecificMotorA(); + global::Pocos.SpecificMotorA plain = new global::Pocos.SpecificMotorA(); await base.ShadowToPlainAsync(plain); return plain; } - protected async Task ShadowToPlainAsync(Pocos.SpecificMotorA plain) + protected async Task ShadowToPlainAsync(global::Pocos.SpecificMotorA plain) { await base.ShadowToPlainAsync(plain); return plain; @@ -1552,7 +1550,7 @@ public async override Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.SpecificMotorA plain) + public async Task> PlainToShadowAsync(global::Pocos.SpecificMotorA plain) { await base.PlainToShadowAsync(plain); return this.RetrievePrimitives(); @@ -1568,7 +1566,7 @@ public async override Task AnyChangeAsync(T 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(Pocos.SpecificMotorA plain, Pocos.SpecificMotorA latest = null) + public new async Task DetectsAnyChangeAsync(global::Pocos.SpecificMotorA plain, global::Pocos.SpecificMotorA latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -1587,8 +1585,8 @@ public async override Task AnyChangeAsync(T plain) this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public new Pocos.SpecificMotorA CreateEmptyPoco() + public new global::Pocos.SpecificMotorA CreateEmptyPoco() { - return new Pocos.SpecificMotorA(); + return new global::Pocos.SpecificMotorA(); } } \ No newline at end of file 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/.g/Onliners/ref_to_simple.g.cs index 8a0e32552..aa8c32959 100644 --- 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/.g/Onliners/ref_to_simple.g.cs @@ -29,24 +29,24 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.RefToSimple.ref_to_simple plain = new Pocos.RefToSimple.ref_to_simple(); + RefToSimple.Pocos.ref_to_simple plain = new RefToSimple.Pocos.ref_to_simple(); 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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.RefToSimple.ref_to_simple plain = new Pocos.RefToSimple.ref_to_simple(); + RefToSimple.Pocos.ref_to_simple plain = new RefToSimple.Pocos.ref_to_simple(); 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(Pocos.RefToSimple.ref_to_simple plain) + protected async Task _OnlineToPlainNoacAsync(RefToSimple.Pocos.ref_to_simple plain) { return plain; } @@ -56,14 +56,14 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.RefToSimple.ref_to_simple plain) + public async Task> PlainToOnlineAsync(RefToSimple.Pocos.ref_to_simple 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(Pocos.RefToSimple.ref_to_simple plain) + public async Task _PlainToOnlineNoacAsync(RefToSimple.Pocos.ref_to_simple plain) { } @@ -72,13 +72,13 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.RefToSimple.ref_to_simple plain = new Pocos.RefToSimple.ref_to_simple(); + RefToSimple.Pocos.ref_to_simple plain = new RefToSimple.Pocos.ref_to_simple(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.RefToSimple.ref_to_simple plain) + protected async Task ShadowToPlainAsync(RefToSimple.Pocos.ref_to_simple plain) { return plain; } @@ -88,7 +88,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.RefToSimple.ref_to_simple plain) + public async Task> PlainToShadowAsync(RefToSimple.Pocos.ref_to_simple plain) { return this.RetrievePrimitives(); } @@ -103,7 +103,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.RefToSimple.ref_to_simple plain, Pocos.RefToSimple.ref_to_simple latest = null) + public async Task DetectsAnyChangeAsync(RefToSimple.Pocos.ref_to_simple plain, RefToSimple.Pocos.ref_to_simple latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -120,24 +120,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.RefToSimple.ref_to_simple CreateEmptyPoco() + public RefToSimple.Pocos.ref_to_simple CreateEmptyPoco() { - return new Pocos.RefToSimple.ref_to_simple(); + return new RefToSimple.Pocos.ref_to_simple(); } 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; @@ -194,9 +197,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } @@ -225,9 +226,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.RefToSimple.referenced plain = new Pocos.RefToSimple.referenced(); + RefToSimple.Pocos.referenced plain = new RefToSimple.Pocos.referenced(); await this.ReadAsync(); plain.b = b.LastValue; return plain; @@ -235,16 +236,16 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.RefToSimple.referenced plain = new Pocos.RefToSimple.referenced(); + RefToSimple.Pocos.referenced plain = new RefToSimple.Pocos.referenced(); plain.b = b.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(Pocos.RefToSimple.referenced plain) + protected async Task _OnlineToPlainNoacAsync(RefToSimple.Pocos.referenced plain) { plain.b = b.LastValue; return plain; @@ -255,7 +256,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.RefToSimple.referenced plain) + public async Task> PlainToOnlineAsync(RefToSimple.Pocos.referenced plain) { #pragma warning disable CS0612 b.LethargicWrite(plain.b); @@ -265,7 +266,7 @@ public async Task> PlainToOnlineAsync(Pocos.RefToSim [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(Pocos.RefToSimple.referenced plain) + public async Task _PlainToOnlineNoacAsync(RefToSimple.Pocos.referenced plain) { #pragma warning disable CS0612 b.LethargicWrite(plain.b); @@ -277,14 +278,14 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.RefToSimple.referenced plain = new Pocos.RefToSimple.referenced(); + RefToSimple.Pocos.referenced plain = new RefToSimple.Pocos.referenced(); plain.b = b.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.RefToSimple.referenced plain) + protected async Task ShadowToPlainAsync(RefToSimple.Pocos.referenced plain) { plain.b = b.Shadow; return plain; @@ -295,7 +296,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.RefToSimple.referenced plain) + public async Task> PlainToShadowAsync(RefToSimple.Pocos.referenced plain) { b.Shadow = plain.b; return this.RetrievePrimitives(); @@ -311,7 +312,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.RefToSimple.referenced plain, Pocos.RefToSimple.referenced latest = null) + public async Task DetectsAnyChangeAsync(RefToSimple.Pocos.referenced plain, RefToSimple.Pocos.referenced latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -330,24 +331,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.RefToSimple.referenced CreateEmptyPoco() + public RefToSimple.Pocos.referenced CreateEmptyPoco() { - return new Pocos.RefToSimple.referenced(); + return new RefToSimple.Pocos.referenced(); } 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; @@ -404,9 +408,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/simple_empty_class.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/simple_empty_class.g.cs index 1128e1fd7..b0e4d2fac 100644 --- 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/.g/Onliners/simple_empty_class.g.cs @@ -27,24 +27,24 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.simple_class plain = new Pocos.simple_class(); + global::Pocos.simple_class plain = new global::Pocos.simple_class(); 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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.simple_class plain = new Pocos.simple_class(); + global::Pocos.simple_class plain = new global::Pocos.simple_class(); 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(Pocos.simple_class plain) + protected async Task _OnlineToPlainNoacAsync(global::Pocos.simple_class plain) { return plain; } @@ -54,14 +54,14 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.simple_class plain) + public async Task> PlainToOnlineAsync(global::Pocos.simple_class 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(Pocos.simple_class plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.simple_class plain) { } @@ -70,13 +70,13 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.simple_class plain = new Pocos.simple_class(); + global::Pocos.simple_class plain = new global::Pocos.simple_class(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.simple_class plain) + protected async Task ShadowToPlainAsync(global::Pocos.simple_class plain) { return plain; } @@ -86,7 +86,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.simple_class plain) + public async Task> PlainToShadowAsync(global::Pocos.simple_class plain) { return this.RetrievePrimitives(); } @@ -101,7 +101,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.simple_class plain, Pocos.simple_class latest = null) + public async Task DetectsAnyChangeAsync(global::Pocos.simple_class plain, global::Pocos.simple_class latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -118,24 +118,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.simple_class CreateEmptyPoco() + public global::Pocos.simple_class CreateEmptyPoco() { - return new Pocos.simple_class(); + return new global::Pocos.simple_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; @@ -192,8 +195,6 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/simple_empty_class_within_namespace.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/simple_empty_class_within_namespace.g.cs index 2b4111d08..44c3f9b49 100644 --- 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/.g/Onliners/simple_empty_class_within_namespace.g.cs @@ -29,24 +29,24 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.sampleNamespace.simple_empty_class_within_namespace plain = new Pocos.sampleNamespace.simple_empty_class_within_namespace(); + sampleNamespace.Pocos.simple_empty_class_within_namespace plain = new sampleNamespace.Pocos.simple_empty_class_within_namespace(); 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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.sampleNamespace.simple_empty_class_within_namespace plain = new Pocos.sampleNamespace.simple_empty_class_within_namespace(); + sampleNamespace.Pocos.simple_empty_class_within_namespace plain = new sampleNamespace.Pocos.simple_empty_class_within_namespace(); 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(Pocos.sampleNamespace.simple_empty_class_within_namespace plain) + protected async Task _OnlineToPlainNoacAsync(sampleNamespace.Pocos.simple_empty_class_within_namespace plain) { return plain; } @@ -56,14 +56,14 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.sampleNamespace.simple_empty_class_within_namespace plain) + public async Task> PlainToOnlineAsync(sampleNamespace.Pocos.simple_empty_class_within_namespace 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(Pocos.sampleNamespace.simple_empty_class_within_namespace plain) + public async Task _PlainToOnlineNoacAsync(sampleNamespace.Pocos.simple_empty_class_within_namespace plain) { } @@ -72,13 +72,13 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.sampleNamespace.simple_empty_class_within_namespace plain = new Pocos.sampleNamespace.simple_empty_class_within_namespace(); + sampleNamespace.Pocos.simple_empty_class_within_namespace plain = new sampleNamespace.Pocos.simple_empty_class_within_namespace(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.sampleNamespace.simple_empty_class_within_namespace plain) + protected async Task ShadowToPlainAsync(sampleNamespace.Pocos.simple_empty_class_within_namespace plain) { return plain; } @@ -88,7 +88,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.sampleNamespace.simple_empty_class_within_namespace plain) + public async Task> PlainToShadowAsync(sampleNamespace.Pocos.simple_empty_class_within_namespace plain) { return this.RetrievePrimitives(); } @@ -103,7 +103,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.sampleNamespace.simple_empty_class_within_namespace plain, Pocos.sampleNamespace.simple_empty_class_within_namespace latest = null) + public async Task DetectsAnyChangeAsync(sampleNamespace.Pocos.simple_empty_class_within_namespace plain, sampleNamespace.Pocos.simple_empty_class_within_namespace latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -120,24 +120,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.sampleNamespace.simple_empty_class_within_namespace CreateEmptyPoco() + public sampleNamespace.Pocos.simple_empty_class_within_namespace CreateEmptyPoco() { - return new Pocos.sampleNamespace.simple_empty_class_within_namespace(); + return new sampleNamespace.Pocos.simple_empty_class_within_namespace(); } 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; @@ -194,9 +197,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/struct_simple.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/struct_simple.g.cs index 642d16fa2..58204ec80 100644 --- 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/.g/Onliners/struct_simple.g.cs @@ -30,9 +30,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.Motor plain = new Pocos.Motor(); + global::Pocos.Motor plain = new global::Pocos.Motor(); await this.ReadAsync(); plain.isRunning = isRunning.LastValue; return plain; @@ -40,14 +40,14 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.Motor plain = new Pocos.Motor(); + global::Pocos.Motor plain = new global::Pocos.Motor(); plain.isRunning = isRunning.LastValue; return plain; } - protected async Task OnlineToPlainAsync(Pocos.Motor plain) + protected async Task OnlineToPlainAsync(global::Pocos.Motor plain) { plain.isRunning = isRunning.LastValue; return plain; @@ -58,7 +58,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.Motor plain) + public async Task> PlainToOnlineAsync(global::Pocos.Motor plain) { #pragma warning disable CS0612 isRunning.LethargicWrite(plain.isRunning); @@ -68,7 +68,7 @@ public async Task> PlainToOnlineAsync(Pocos.Motor pl [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(Pocos.Motor plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.Motor plain) { #pragma warning disable CS0612 isRunning.LethargicWrite(plain.isRunning); @@ -80,14 +80,14 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.Motor plain = new Pocos.Motor(); + global::Pocos.Motor plain = new global::Pocos.Motor(); plain.isRunning = isRunning.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.Motor plain) + protected async Task ShadowToPlainAsync(global::Pocos.Motor plain) { plain.isRunning = isRunning.Shadow; return plain; @@ -98,7 +98,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.Motor plain) + public async Task> PlainToShadowAsync(global::Pocos.Motor plain) { isRunning.Shadow = plain.isRunning; return this.RetrievePrimitives(); @@ -114,7 +114,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.Motor plain, Pocos.Motor latest = null) + public async Task DetectsAnyChangeAsync(global::Pocos.Motor plain, global::Pocos.Motor latest = null) { var somethingChanged = false; if (latest == null) @@ -133,24 +133,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.Motor CreateEmptyPoco() + public global::Pocos.Motor CreateEmptyPoco() { - return new Pocos.Motor(); + return new global::Pocos.Motor(); } 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; @@ -207,16 +210,13 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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 Vehicle : AXSharp.Connector.ITwinObject { public Motor m { get; } - public OnlinerInt displacement { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -241,9 +241,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.Vehicle plain = new Pocos.Vehicle(); + global::Pocos.Vehicle plain = new global::Pocos.Vehicle(); await this.ReadAsync(); #pragma warning disable CS0612 plain.m = await m._OnlineToPlainNoacAsync(); @@ -254,9 +254,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.Vehicle plain = new Pocos.Vehicle(); + global::Pocos.Vehicle plain = new global::Pocos.Vehicle(); #pragma warning disable CS0612 plain.m = await m._OnlineToPlainNoacAsync(); #pragma warning restore CS0612 @@ -264,7 +264,7 @@ public async virtual Task OnlineToPlain() return plain; } - protected async Task OnlineToPlainAsync(Pocos.Vehicle plain) + protected async Task OnlineToPlainAsync(global::Pocos.Vehicle plain) { #pragma warning disable CS0612 plain.m = await m._OnlineToPlainNoacAsync(); @@ -278,7 +278,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.Vehicle plain) + public async Task> PlainToOnlineAsync(global::Pocos.Vehicle plain) { #pragma warning disable CS0612 await this.m._PlainToOnlineNoacAsync(plain.m); @@ -291,7 +291,7 @@ public async Task> PlainToOnlineAsync(Pocos.Vehicle [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(Pocos.Vehicle plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.Vehicle plain) { #pragma warning disable CS0612 await this.m._PlainToOnlineNoacAsync(plain.m); @@ -306,15 +306,15 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.Vehicle plain = new Pocos.Vehicle(); + global::Pocos.Vehicle plain = new global::Pocos.Vehicle(); plain.m = await m.ShadowToPlainAsync(); plain.displacement = displacement.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.Vehicle plain) + protected async Task ShadowToPlainAsync(global::Pocos.Vehicle plain) { plain.m = await m.ShadowToPlainAsync(); plain.displacement = displacement.Shadow; @@ -326,7 +326,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.Vehicle plain) + public async Task> PlainToShadowAsync(global::Pocos.Vehicle plain) { await this.m.PlainToShadowAsync(plain.m); displacement.Shadow = plain.displacement; @@ -343,7 +343,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.Vehicle plain, Pocos.Vehicle latest = null) + public async Task DetectsAnyChangeAsync(global::Pocos.Vehicle plain, global::Pocos.Vehicle latest = null) { var somethingChanged = false; if (latest == null) @@ -364,24 +364,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.Vehicle CreateEmptyPoco() + public global::Pocos.Vehicle CreateEmptyPoco() { - return new Pocos.Vehicle(); + return new global::Pocos.Vehicle(); } 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; @@ -438,8 +441,6 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/type_named_values.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/type_named_values.g.cs index 9800927d8..8f91b8ea0 100644 --- 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/.g/Onliners/type_named_values.g.cs @@ -40,9 +40,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.NamedValuesNamespace.using_type_named_values plain = new Pocos.NamedValuesNamespace.using_type_named_values(); + NamedValuesNamespace.Pocos.using_type_named_values plain = new NamedValuesNamespace.Pocos.using_type_named_values(); await this.ReadAsync(); plain.LColors = LColors.LastValue; return plain; @@ -50,16 +50,16 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.NamedValuesNamespace.using_type_named_values plain = new Pocos.NamedValuesNamespace.using_type_named_values(); + NamedValuesNamespace.Pocos.using_type_named_values plain = new NamedValuesNamespace.Pocos.using_type_named_values(); plain.LColors = LColors.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(Pocos.NamedValuesNamespace.using_type_named_values plain) + protected async Task _OnlineToPlainNoacAsync(NamedValuesNamespace.Pocos.using_type_named_values plain) { plain.LColors = LColors.LastValue; return plain; @@ -70,7 +70,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.NamedValuesNamespace.using_type_named_values plain) + public async Task> PlainToOnlineAsync(NamedValuesNamespace.Pocos.using_type_named_values plain) { #pragma warning disable CS0612 LColors.LethargicWrite(plain.LColors); @@ -80,7 +80,7 @@ public async Task> PlainToOnlineAsync(Pocos.NamedVal [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(Pocos.NamedValuesNamespace.using_type_named_values plain) + public async Task _PlainToOnlineNoacAsync(NamedValuesNamespace.Pocos.using_type_named_values plain) { #pragma warning disable CS0612 LColors.LethargicWrite(plain.LColors); @@ -92,14 +92,14 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.NamedValuesNamespace.using_type_named_values plain = new Pocos.NamedValuesNamespace.using_type_named_values(); + NamedValuesNamespace.Pocos.using_type_named_values plain = new NamedValuesNamespace.Pocos.using_type_named_values(); plain.LColors = LColors.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.NamedValuesNamespace.using_type_named_values plain) + protected async Task ShadowToPlainAsync(NamedValuesNamespace.Pocos.using_type_named_values plain) { plain.LColors = LColors.Shadow; return plain; @@ -110,7 +110,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.NamedValuesNamespace.using_type_named_values plain) + public async Task> PlainToShadowAsync(NamedValuesNamespace.Pocos.using_type_named_values plain) { LColors.Shadow = plain.LColors; return this.RetrievePrimitives(); @@ -126,7 +126,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.NamedValuesNamespace.using_type_named_values plain, Pocos.NamedValuesNamespace.using_type_named_values latest = null) + public async Task DetectsAnyChangeAsync(NamedValuesNamespace.Pocos.using_type_named_values plain, NamedValuesNamespace.Pocos.using_type_named_values latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -145,24 +145,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.NamedValuesNamespace.using_type_named_values CreateEmptyPoco() + public NamedValuesNamespace.Pocos.using_type_named_values CreateEmptyPoco() { - return new Pocos.NamedValuesNamespace.using_type_named_values(); + return new NamedValuesNamespace.Pocos.using_type_named_values(); } 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; @@ -219,9 +222,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/type_named_values_literals.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/type_named_values_literals.g.cs index 930b7791e..6d62a378b 100644 --- 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/.g/Onliners/type_named_values_literals.g.cs @@ -42,9 +42,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.Simatic.Ax.StateFramework.using_type_named_values plain = new Pocos.Simatic.Ax.StateFramework.using_type_named_values(); + Simatic.Ax.StateFramework.Pocos.using_type_named_values plain = new Simatic.Ax.StateFramework.Pocos.using_type_named_values(); await this.ReadAsync(); plain.LColors = LColors.LastValue; return plain; @@ -52,16 +52,16 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.Simatic.Ax.StateFramework.using_type_named_values plain = new Pocos.Simatic.Ax.StateFramework.using_type_named_values(); + Simatic.Ax.StateFramework.Pocos.using_type_named_values plain = new Simatic.Ax.StateFramework.Pocos.using_type_named_values(); plain.LColors = LColors.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(Pocos.Simatic.Ax.StateFramework.using_type_named_values plain) + protected async Task _OnlineToPlainNoacAsync(Simatic.Ax.StateFramework.Pocos.using_type_named_values plain) { plain.LColors = LColors.LastValue; return plain; @@ -72,7 +72,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.Simatic.Ax.StateFramework.using_type_named_values plain) + public async Task> PlainToOnlineAsync(Simatic.Ax.StateFramework.Pocos.using_type_named_values plain) { #pragma warning disable CS0612 LColors.LethargicWrite(plain.LColors); @@ -82,7 +82,7 @@ public async Task> PlainToOnlineAsync(Pocos.Simatic. [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(Pocos.Simatic.Ax.StateFramework.using_type_named_values plain) + public async Task _PlainToOnlineNoacAsync(Simatic.Ax.StateFramework.Pocos.using_type_named_values plain) { #pragma warning disable CS0612 LColors.LethargicWrite(plain.LColors); @@ -94,14 +94,14 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.Simatic.Ax.StateFramework.using_type_named_values plain = new Pocos.Simatic.Ax.StateFramework.using_type_named_values(); + Simatic.Ax.StateFramework.Pocos.using_type_named_values plain = new Simatic.Ax.StateFramework.Pocos.using_type_named_values(); plain.LColors = LColors.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.Simatic.Ax.StateFramework.using_type_named_values plain) + protected async Task ShadowToPlainAsync(Simatic.Ax.StateFramework.Pocos.using_type_named_values plain) { plain.LColors = LColors.Shadow; return plain; @@ -112,7 +112,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.Simatic.Ax.StateFramework.using_type_named_values plain) + public async Task> PlainToShadowAsync(Simatic.Ax.StateFramework.Pocos.using_type_named_values plain) { LColors.Shadow = plain.LColors; return this.RetrievePrimitives(); @@ -128,7 +128,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.Simatic.Ax.StateFramework.using_type_named_values plain, Pocos.Simatic.Ax.StateFramework.using_type_named_values latest = null) + public async Task DetectsAnyChangeAsync(Simatic.Ax.StateFramework.Pocos.using_type_named_values plain, Simatic.Ax.StateFramework.Pocos.using_type_named_values latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -147,24 +147,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.Simatic.Ax.StateFramework.using_type_named_values CreateEmptyPoco() + public Simatic.Ax.StateFramework.Pocos.using_type_named_values CreateEmptyPoco() { - return new Pocos.Simatic.Ax.StateFramework.using_type_named_values(); + return new Simatic.Ax.StateFramework.Pocos.using_type_named_values(); } 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; @@ -221,9 +224,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/type_with_enum.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/type_with_enum.g.cs index 2e72b5109..ec7388c85 100644 --- 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/.g/Onliners/type_with_enum.g.cs @@ -53,9 +53,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.Simatic.Ax.StateFramework.CompareGuardLint plain = new Pocos.Simatic.Ax.StateFramework.CompareGuardLint(); + Simatic.Ax.StateFramework.Pocos.CompareGuardLint plain = new Simatic.Ax.StateFramework.Pocos.CompareGuardLint(); await this.ReadAsync(); plain.CompareToValue = CompareToValue.LastValue; plain.Condition = (Simatic.Ax.StateFramework.Condition)Condition.LastValue; @@ -64,9 +64,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.Simatic.Ax.StateFramework.CompareGuardLint plain = new Pocos.Simatic.Ax.StateFramework.CompareGuardLint(); + Simatic.Ax.StateFramework.Pocos.CompareGuardLint plain = new Simatic.Ax.StateFramework.Pocos.CompareGuardLint(); plain.CompareToValue = CompareToValue.LastValue; plain.Condition = (Simatic.Ax.StateFramework.Condition)Condition.LastValue; return plain; @@ -74,7 +74,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.Simatic.Ax.StateFramework.CompareGuardLint plain) + protected async Task _OnlineToPlainNoacAsync(Simatic.Ax.StateFramework.Pocos.CompareGuardLint plain) { plain.CompareToValue = CompareToValue.LastValue; plain.Condition = (Simatic.Ax.StateFramework.Condition)Condition.LastValue; @@ -86,7 +86,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.Simatic.Ax.StateFramework.CompareGuardLint plain) + public async Task> PlainToOnlineAsync(Simatic.Ax.StateFramework.Pocos.CompareGuardLint plain) { #pragma warning disable CS0612 CompareToValue.LethargicWrite(plain.CompareToValue); @@ -99,7 +99,7 @@ public async Task> PlainToOnlineAsync(Pocos.Simatic. [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(Pocos.Simatic.Ax.StateFramework.CompareGuardLint plain) + public async Task _PlainToOnlineNoacAsync(Simatic.Ax.StateFramework.Pocos.CompareGuardLint plain) { #pragma warning disable CS0612 CompareToValue.LethargicWrite(plain.CompareToValue); @@ -114,15 +114,15 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.Simatic.Ax.StateFramework.CompareGuardLint plain = new Pocos.Simatic.Ax.StateFramework.CompareGuardLint(); + Simatic.Ax.StateFramework.Pocos.CompareGuardLint plain = new Simatic.Ax.StateFramework.Pocos.CompareGuardLint(); plain.CompareToValue = CompareToValue.Shadow; plain.Condition = (Simatic.Ax.StateFramework.Condition)Condition.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.Simatic.Ax.StateFramework.CompareGuardLint plain) + protected async Task ShadowToPlainAsync(Simatic.Ax.StateFramework.Pocos.CompareGuardLint plain) { plain.CompareToValue = CompareToValue.Shadow; plain.Condition = (Simatic.Ax.StateFramework.Condition)Condition.Shadow; @@ -134,7 +134,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.Simatic.Ax.StateFramework.CompareGuardLint plain) + public async Task> PlainToShadowAsync(Simatic.Ax.StateFramework.Pocos.CompareGuardLint plain) { CompareToValue.Shadow = plain.CompareToValue; Condition.Shadow = (short)plain.Condition; @@ -151,7 +151,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.Simatic.Ax.StateFramework.CompareGuardLint plain, Pocos.Simatic.Ax.StateFramework.CompareGuardLint latest = null) + public async Task DetectsAnyChangeAsync(Simatic.Ax.StateFramework.Pocos.CompareGuardLint plain, Simatic.Ax.StateFramework.Pocos.CompareGuardLint latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -172,24 +172,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.Simatic.Ax.StateFramework.CompareGuardLint CreateEmptyPoco() + public Simatic.Ax.StateFramework.Pocos.CompareGuardLint CreateEmptyPoco() { - return new Pocos.Simatic.Ax.StateFramework.CompareGuardLint(); + return new Simatic.Ax.StateFramework.Pocos.CompareGuardLint(); } 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; @@ -246,9 +249,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/types_with_name_attributes.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/types_with_name_attributes.g.cs index a21b850e2..56fc275f1 100644 --- 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/.g/Onliners/types_with_name_attributes.g.cs @@ -33,9 +33,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.TypeWithNameAttributes.Motor plain = new Pocos.TypeWithNameAttributes.Motor(); + TypeWithNameAttributes.Pocos.Motor plain = new TypeWithNameAttributes.Pocos.Motor(); await this.ReadAsync(); plain.isRunning = isRunning.LastValue; return plain; @@ -43,14 +43,14 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.TypeWithNameAttributes.Motor plain = new Pocos.TypeWithNameAttributes.Motor(); + TypeWithNameAttributes.Pocos.Motor plain = new TypeWithNameAttributes.Pocos.Motor(); plain.isRunning = isRunning.LastValue; return plain; } - protected async Task OnlineToPlainAsync(Pocos.TypeWithNameAttributes.Motor plain) + protected async Task OnlineToPlainAsync(TypeWithNameAttributes.Pocos.Motor plain) { plain.isRunning = isRunning.LastValue; return plain; @@ -61,7 +61,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.TypeWithNameAttributes.Motor plain) + public async Task> PlainToOnlineAsync(TypeWithNameAttributes.Pocos.Motor plain) { #pragma warning disable CS0612 isRunning.LethargicWrite(plain.isRunning); @@ -71,7 +71,7 @@ public async Task> PlainToOnlineAsync(Pocos.TypeWith [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(Pocos.TypeWithNameAttributes.Motor plain) + public async Task _PlainToOnlineNoacAsync(TypeWithNameAttributes.Pocos.Motor plain) { #pragma warning disable CS0612 isRunning.LethargicWrite(plain.isRunning); @@ -83,14 +83,14 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.TypeWithNameAttributes.Motor plain = new Pocos.TypeWithNameAttributes.Motor(); + TypeWithNameAttributes.Pocos.Motor plain = new TypeWithNameAttributes.Pocos.Motor(); plain.isRunning = isRunning.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.TypeWithNameAttributes.Motor plain) + protected async Task ShadowToPlainAsync(TypeWithNameAttributes.Pocos.Motor plain) { plain.isRunning = isRunning.Shadow; return plain; @@ -101,7 +101,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.TypeWithNameAttributes.Motor plain) + public async Task> PlainToShadowAsync(TypeWithNameAttributes.Pocos.Motor plain) { isRunning.Shadow = plain.isRunning; return this.RetrievePrimitives(); @@ -117,7 +117,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.TypeWithNameAttributes.Motor plain, Pocos.TypeWithNameAttributes.Motor latest = null) + public async Task DetectsAnyChangeAsync(TypeWithNameAttributes.Pocos.Motor plain, TypeWithNameAttributes.Pocos.Motor latest = null) { var somethingChanged = false; if (latest == null) @@ -136,24 +136,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.TypeWithNameAttributes.Motor CreateEmptyPoco() + public TypeWithNameAttributes.Pocos.Motor CreateEmptyPoco() { - return new Pocos.TypeWithNameAttributes.Motor(); + return new TypeWithNameAttributes.Pocos.Motor(); } 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; @@ -210,16 +213,13 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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 Vehicle : AXSharp.Connector.ITwinObject { public TypeWithNameAttributes.Motor m { get; } - public OnlinerInt displacement { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -244,9 +244,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.TypeWithNameAttributes.Vehicle plain = new Pocos.TypeWithNameAttributes.Vehicle(); + TypeWithNameAttributes.Pocos.Vehicle plain = new TypeWithNameAttributes.Pocos.Vehicle(); await this.ReadAsync(); #pragma warning disable CS0612 plain.m = await m._OnlineToPlainNoacAsync(); @@ -257,9 +257,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.TypeWithNameAttributes.Vehicle plain = new Pocos.TypeWithNameAttributes.Vehicle(); + TypeWithNameAttributes.Pocos.Vehicle plain = new TypeWithNameAttributes.Pocos.Vehicle(); #pragma warning disable CS0612 plain.m = await m._OnlineToPlainNoacAsync(); #pragma warning restore CS0612 @@ -267,7 +267,7 @@ public async virtual Task OnlineToPlain() return plain; } - protected async Task OnlineToPlainAsync(Pocos.TypeWithNameAttributes.Vehicle plain) + protected async Task OnlineToPlainAsync(TypeWithNameAttributes.Pocos.Vehicle plain) { #pragma warning disable CS0612 plain.m = await m._OnlineToPlainNoacAsync(); @@ -281,7 +281,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.TypeWithNameAttributes.Vehicle plain) + public async Task> PlainToOnlineAsync(TypeWithNameAttributes.Pocos.Vehicle plain) { #pragma warning disable CS0612 await this.m._PlainToOnlineNoacAsync(plain.m); @@ -294,7 +294,7 @@ public async Task> PlainToOnlineAsync(Pocos.TypeWith [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(Pocos.TypeWithNameAttributes.Vehicle plain) + public async Task _PlainToOnlineNoacAsync(TypeWithNameAttributes.Pocos.Vehicle plain) { #pragma warning disable CS0612 await this.m._PlainToOnlineNoacAsync(plain.m); @@ -309,15 +309,15 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.TypeWithNameAttributes.Vehicle plain = new Pocos.TypeWithNameAttributes.Vehicle(); + TypeWithNameAttributes.Pocos.Vehicle plain = new TypeWithNameAttributes.Pocos.Vehicle(); plain.m = await m.ShadowToPlainAsync(); plain.displacement = displacement.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.TypeWithNameAttributes.Vehicle plain) + protected async Task ShadowToPlainAsync(TypeWithNameAttributes.Pocos.Vehicle plain) { plain.m = await m.ShadowToPlainAsync(); plain.displacement = displacement.Shadow; @@ -329,7 +329,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.TypeWithNameAttributes.Vehicle plain) + public async Task> PlainToShadowAsync(TypeWithNameAttributes.Pocos.Vehicle plain) { await this.m.PlainToShadowAsync(plain.m); displacement.Shadow = plain.displacement; @@ -346,7 +346,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.TypeWithNameAttributes.Vehicle plain, Pocos.TypeWithNameAttributes.Vehicle latest = null) + public async Task DetectsAnyChangeAsync(TypeWithNameAttributes.Pocos.Vehicle plain, TypeWithNameAttributes.Pocos.Vehicle latest = null) { var somethingChanged = false; if (latest == null) @@ -367,24 +367,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.TypeWithNameAttributes.Vehicle CreateEmptyPoco() + public TypeWithNameAttributes.Pocos.Vehicle CreateEmptyPoco() { - return new Pocos.TypeWithNameAttributes.Vehicle(); + return new TypeWithNameAttributes.Pocos.Vehicle(); } 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; @@ -441,9 +444,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::units.PlcTranslator.Instance; } @@ -480,9 +481,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.TypeWithNameAttributes.NoAccessModifierClass plain = new Pocos.TypeWithNameAttributes.NoAccessModifierClass(); + TypeWithNameAttributes.Pocos.NoAccessModifierClass plain = new TypeWithNameAttributes.Pocos.NoAccessModifierClass(); await this.ReadAsync(); plain.SomeClassVariable = SomeClassVariable.LastValue; return plain; @@ -490,16 +491,16 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.TypeWithNameAttributes.NoAccessModifierClass plain = new Pocos.TypeWithNameAttributes.NoAccessModifierClass(); + TypeWithNameAttributes.Pocos.NoAccessModifierClass plain = new TypeWithNameAttributes.Pocos.NoAccessModifierClass(); plain.SomeClassVariable = SomeClassVariable.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(Pocos.TypeWithNameAttributes.NoAccessModifierClass plain) + protected async Task _OnlineToPlainNoacAsync(TypeWithNameAttributes.Pocos.NoAccessModifierClass plain) { plain.SomeClassVariable = SomeClassVariable.LastValue; return plain; @@ -510,7 +511,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.TypeWithNameAttributes.NoAccessModifierClass plain) + public async Task> PlainToOnlineAsync(TypeWithNameAttributes.Pocos.NoAccessModifierClass plain) { #pragma warning disable CS0612 SomeClassVariable.LethargicWrite(plain.SomeClassVariable); @@ -520,7 +521,7 @@ public async Task> PlainToOnlineAsync(Pocos.TypeWith [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(Pocos.TypeWithNameAttributes.NoAccessModifierClass plain) + public async Task _PlainToOnlineNoacAsync(TypeWithNameAttributes.Pocos.NoAccessModifierClass plain) { #pragma warning disable CS0612 SomeClassVariable.LethargicWrite(plain.SomeClassVariable); @@ -532,14 +533,14 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.TypeWithNameAttributes.NoAccessModifierClass plain = new Pocos.TypeWithNameAttributes.NoAccessModifierClass(); + TypeWithNameAttributes.Pocos.NoAccessModifierClass plain = new TypeWithNameAttributes.Pocos.NoAccessModifierClass(); plain.SomeClassVariable = SomeClassVariable.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.TypeWithNameAttributes.NoAccessModifierClass plain) + protected async Task ShadowToPlainAsync(TypeWithNameAttributes.Pocos.NoAccessModifierClass plain) { plain.SomeClassVariable = SomeClassVariable.Shadow; return plain; @@ -550,7 +551,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.TypeWithNameAttributes.NoAccessModifierClass plain) + public async Task> PlainToShadowAsync(TypeWithNameAttributes.Pocos.NoAccessModifierClass plain) { SomeClassVariable.Shadow = plain.SomeClassVariable; return this.RetrievePrimitives(); @@ -566,7 +567,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.TypeWithNameAttributes.NoAccessModifierClass plain, Pocos.TypeWithNameAttributes.NoAccessModifierClass latest = null) + public async Task DetectsAnyChangeAsync(TypeWithNameAttributes.Pocos.NoAccessModifierClass plain, TypeWithNameAttributes.Pocos.NoAccessModifierClass latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -585,24 +586,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.TypeWithNameAttributes.NoAccessModifierClass CreateEmptyPoco() + public TypeWithNameAttributes.Pocos.NoAccessModifierClass CreateEmptyPoco() { - return new Pocos.TypeWithNameAttributes.NoAccessModifierClass(); + return new TypeWithNameAttributes.Pocos.NoAccessModifierClass(); } 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; @@ -659,9 +663,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/Onliners/types_with_property_attributes.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/types_with_property_attributes.g.cs index 8b812a5f5..fba421dce 100644 --- 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/.g/Onliners/types_with_property_attributes.g.cs @@ -42,9 +42,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.TypesWithPropertyAttributes.SomeAddedProperties plain = new Pocos.TypesWithPropertyAttributes.SomeAddedProperties(); + TypesWithPropertyAttributes.Pocos.SomeAddedProperties plain = new TypesWithPropertyAttributes.Pocos.SomeAddedProperties(); await this.ReadAsync(); plain.Counter = Counter.LastValue; return plain; @@ -52,16 +52,16 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.TypesWithPropertyAttributes.SomeAddedProperties plain = new Pocos.TypesWithPropertyAttributes.SomeAddedProperties(); + TypesWithPropertyAttributes.Pocos.SomeAddedProperties plain = new TypesWithPropertyAttributes.Pocos.SomeAddedProperties(); plain.Counter = Counter.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(Pocos.TypesWithPropertyAttributes.SomeAddedProperties plain) + protected async Task _OnlineToPlainNoacAsync(TypesWithPropertyAttributes.Pocos.SomeAddedProperties plain) { plain.Counter = Counter.LastValue; return plain; @@ -72,7 +72,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.TypesWithPropertyAttributes.SomeAddedProperties plain) + public async Task> PlainToOnlineAsync(TypesWithPropertyAttributes.Pocos.SomeAddedProperties plain) { #pragma warning disable CS0612 Counter.LethargicWrite(plain.Counter); @@ -82,7 +82,7 @@ public async Task> PlainToOnlineAsync(Pocos.TypesWit [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(Pocos.TypesWithPropertyAttributes.SomeAddedProperties plain) + public async Task _PlainToOnlineNoacAsync(TypesWithPropertyAttributes.Pocos.SomeAddedProperties plain) { #pragma warning disable CS0612 Counter.LethargicWrite(plain.Counter); @@ -94,14 +94,14 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.TypesWithPropertyAttributes.SomeAddedProperties plain = new Pocos.TypesWithPropertyAttributes.SomeAddedProperties(); + TypesWithPropertyAttributes.Pocos.SomeAddedProperties plain = new TypesWithPropertyAttributes.Pocos.SomeAddedProperties(); plain.Counter = Counter.Shadow; return plain; } - protected async Task ShadowToPlainAsync(Pocos.TypesWithPropertyAttributes.SomeAddedProperties plain) + protected async Task ShadowToPlainAsync(TypesWithPropertyAttributes.Pocos.SomeAddedProperties plain) { plain.Counter = Counter.Shadow; return plain; @@ -112,7 +112,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.TypesWithPropertyAttributes.SomeAddedProperties plain) + public async Task> PlainToShadowAsync(TypesWithPropertyAttributes.Pocos.SomeAddedProperties plain) { Counter.Shadow = plain.Counter; return this.RetrievePrimitives(); @@ -128,7 +128,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.TypesWithPropertyAttributes.SomeAddedProperties plain, Pocos.TypesWithPropertyAttributes.SomeAddedProperties latest = null) + public async Task DetectsAnyChangeAsync(TypesWithPropertyAttributes.Pocos.SomeAddedProperties plain, TypesWithPropertyAttributes.Pocos.SomeAddedProperties latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -147,24 +147,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.TypesWithPropertyAttributes.SomeAddedProperties CreateEmptyPoco() + public TypesWithPropertyAttributes.Pocos.SomeAddedProperties CreateEmptyPoco() { - return new Pocos.TypesWithPropertyAttributes.SomeAddedProperties(); + return new TypesWithPropertyAttributes.Pocos.SomeAddedProperties(); } 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; @@ -221,9 +224,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo 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/.g/POCO/abstract_members.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/abstract_members.g.cs index 89ec4046b..5400b2acd 100644 --- 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/.g/POCO/abstract_members.g.cs @@ -11,7 +11,6 @@ public AbstractMotor() } public Boolean Run { get; set; } - public Boolean ReverseDirection { get; set; } } } \ No newline at end of file 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/.g/POCO/array_declaration.g.cs index 4be77021f..f6fa692e1 100644 --- 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/.g/POCO/array_declaration.g.cs @@ -2,23 +2,26 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace ArrayDeclarationSimpleNamespace { - namespace ArrayDeclarationSimpleNamespace + namespace Pocos { public partial class array_declaration_class : AXSharp.Connector.IPlain { public array_declaration_class() { #pragma warning disable CS0612 - AXSharp.Connector.BuilderHelpers.Arrays.InstantiateArray(complex, () => new ArrayDeclarationSimpleNamespace.some_complex_type(), new[] { (1, 100) }); + AXSharp.Connector.BuilderHelpers.Arrays.InstantiateArray(complex, () => new ArrayDeclarationSimpleNamespace.Pocos.some_complex_type(), new[] { (1, 100) }); #pragma warning restore CS0612 } public Int16[] primitive { get; set; } = new Int16[100]; - public ArrayDeclarationSimpleNamespace.some_complex_type[] complex { get; set; } = new ArrayDeclarationSimpleNamespace.some_complex_type[100]; + public ArrayDeclarationSimpleNamespace.Pocos.some_complex_type[] complex { get; set; } = new ArrayDeclarationSimpleNamespace.Pocos.some_complex_type[100]; } + } + namespace Pocos + { public partial class some_complex_type : AXSharp.Connector.IPlain { public some_complex_type() 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/.g/POCO/class_all_primitives.g.cs index d6d0b616a..3e365e2a1 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/.g/POCO/class_all_primitives.g.cs @@ -11,35 +11,20 @@ public class_all_primitives() } public Boolean myBOOL { get; set; } - public Byte myBYTE { get; set; } - public UInt16 myWORD { get; set; } - public UInt32 myDWORD { get; set; } - public UInt64 myLWORD { get; set; } - public SByte mySINT { get; set; } - public Int16 myINT { get; set; } - public Int32 myDINT { get; set; } - public Int64 myLINT { get; set; } - public Byte myUSINT { get; set; } - public UInt16 myUINT { get; set; } - public UInt32 myUDINT { get; set; } - public UInt64 myULINT { get; set; } - public Single myREAL { get; set; } - 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); 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/.g/POCO/class_extended_by_known_type.g.cs index a02dfcfd9..cbd2bd155 100644 --- 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/.g/POCO/class_extended_by_known_type.g.cs @@ -2,19 +2,22 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace Simatic.Ax.StateFramework { - namespace Simatic.Ax.StateFramework + namespace Pocos { - public partial class State1Transition : Simatic.Ax.StateFramework.AbstractState, AXSharp.Connector.IPlain + public partial class State1Transition : Simatic.Ax.StateFramework.Pocos.AbstractState, AXSharp.Connector.IPlain { public State1Transition() : base() { } } } +} - namespace Simatic.Ax.StateFramework +namespace Simatic.Ax.StateFramework +{ + namespace Pocos { public partial class AbstractState : AXSharp.Connector.IPlain, IState, IStateMuteable { @@ -23,7 +26,6 @@ public AbstractState() } public Int16 StateID { get; set; } - public string StateName { get; set; } = string.Empty; } } 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/.g/POCO/class_extends.g.cs index 4ce871c91..d52dd7eef 100644 --- 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/.g/POCO/class_extends.g.cs @@ -4,13 +4,16 @@ namespace Pocos { - public partial class Extended : Extendee, AXSharp.Connector.IPlain + public partial class Extended : global::Pocos.Extendee, AXSharp.Connector.IPlain { public Extended() : base() { } } +} +namespace Pocos +{ public partial class Extendee : AXSharp.Connector.IPlain { public Extendee() 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/.g/POCO/class_extends_and_implements.g.cs index 91481513b..599ef8e51 100644 --- 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/.g/POCO/class_extends_and_implements.g.cs @@ -4,25 +4,28 @@ namespace Pocos { - public partial class ExtendsAndImplements : ExtendeeExtendsAndImplements, AXSharp.Connector.IPlain, IImplementation1, IImplementation2 + public partial class ExtendsAndImplements : global::Pocos.ExtendeeExtendsAndImplements, AXSharp.Connector.IPlain, IImplementation1, IImplementation2 { public ExtendsAndImplements() : base() { } } +} +namespace Pocos +{ public partial class ExtendeeExtendsAndImplements : AXSharp.Connector.IPlain { public ExtendeeExtendsAndImplements() { } } +} - public partial interface IImplementation1 - { - } +public partial interface IImplementation1 +{ +} - public partial interface IImplementation2 - { - } +public partial interface IImplementation2 +{ } \ No newline at end of file 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/.g/POCO/class_generic_extension.g.cs index 906b0bc07..e2b834c26 100644 --- 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/.g/POCO/class_generic_extension.g.cs @@ -2,9 +2,9 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace Generics { - namespace Generics + namespace Pocos { public partial class Extender : AXSharp.Connector.IPlain { @@ -12,26 +12,35 @@ public Extender() { } } + } - public partial class Extendee : Generics.Extender, AXSharp.Connector.IPlain + namespace Pocos + { + public partial class Extendee : Generics.Pocos.Extender, AXSharp.Connector.IPlain { public Extendee() : base() { } - public Generics.SomeType SomeType { get; set; } = new Generics.SomeType(); - public Generics.SomeType SomeTypeAsPoco { get; set; } = new Generics.SomeType(); + public Generics.Pocos.SomeType SomeType { get; set; } = new Generics.Pocos.SomeType(); + public Generics.Pocos.SomeType SomeTypeAsPoco { get; set; } = new Generics.Pocos.SomeType(); } + } - public partial class Extendee2 : Generics.Extender, AXSharp.Connector.IPlain + namespace Pocos + { + public partial class Extendee2 : Generics.Pocos.Extender, AXSharp.Connector.IPlain { public Extendee2() : base() { } - public Generics.SomeType SomeType { get; set; } = new Generics.SomeType(); + public Generics.Pocos.SomeType SomeType { get; set; } = new Generics.Pocos.SomeType(); } + } + namespace Pocos + { public partial class SomeType : AXSharp.Connector.IPlain { public SomeType() 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/.g/POCO/class_implements.g.cs index 5eb39ed0d..d5e22e3ad 100644 --- 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/.g/POCO/class_implements.g.cs @@ -10,8 +10,8 @@ public _NULL_CONTEXT() { } } +} - public partial interface IContext - { - } +public partial interface IContext +{ } \ No newline at end of file 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/.g/POCO/class_implements_multiple.g.cs index aca3704d2..948849eb5 100644 --- 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/.g/POCO/class_implements_multiple.g.cs @@ -10,12 +10,12 @@ public _NULL_CONTEXT_MULTIPLE() { } } +} - public partial interface IContext_Multiple - { - } +public partial interface IContext_Multiple +{ +} - public partial interface IObject_Multiple - { - } +public partial interface IObject_Multiple +{ } \ No newline at end of file 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/.g/POCO/class_with_complex_members.g.cs index 27f5f1d89..8e81b9e42 100644 --- 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/.g/POCO/class_with_complex_members.g.cs @@ -2,9 +2,9 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace ClassWithComplexTypesNamespace { - namespace ClassWithComplexTypesNamespace + namespace Pocos { public partial class ClassWithComplexTypes : AXSharp.Connector.IPlain { @@ -12,9 +12,12 @@ public ClassWithComplexTypes() { } - public ClassWithComplexTypesNamespace.ComplexType1 myComplexType { get; set; } = new ClassWithComplexTypesNamespace.ComplexType1(); + public ClassWithComplexTypesNamespace.Pocos.ComplexType1 myComplexType { get; set; } = new ClassWithComplexTypesNamespace.Pocos.ComplexType1(); } + } + namespace Pocos + { public partial class ComplexType1 : AXSharp.Connector.IPlain { public ComplexType1() 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/.g/POCO/class_with_non_public_members.g.cs index 7f96b8734..f0bd08a34 100644 --- 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/.g/POCO/class_with_non_public_members.g.cs @@ -2,9 +2,9 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace ClassWithNonTraspilableMemberssNamespace { - namespace ClassWithNonTraspilableMemberssNamespace + namespace Pocos { public partial class ClassWithNonTraspilableMembers : AXSharp.Connector.IPlain { @@ -12,9 +12,12 @@ public ClassWithNonTraspilableMembers() { } - public ClassWithNonTraspilableMemberssNamespace.ComplexType1 myComplexType { get; set; } = new ClassWithNonTraspilableMemberssNamespace.ComplexType1(); + public ClassWithNonTraspilableMemberssNamespace.Pocos.ComplexType1 myComplexType { get; set; } = new ClassWithNonTraspilableMemberssNamespace.Pocos.ComplexType1(); } + } + namespace Pocos + { public partial class ComplexType1 : AXSharp.Connector.IPlain { public ComplexType1() 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/.g/POCO/class_with_pragmas.g.cs index 874c95304..f86e93fa7 100644 --- 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/.g/POCO/class_with_pragmas.g.cs @@ -2,9 +2,9 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace ClassWithPragmasNamespace { - namespace ClassWithPragmasNamespace + namespace Pocos { public partial class ClassWithPragmas : AXSharp.Connector.IPlain { @@ -13,9 +13,12 @@ public ClassWithPragmas() } [Container(Layout.Wrap)] - public ClassWithPragmasNamespace.ComplexType1 myComplexType { get; set; } = new ClassWithPragmasNamespace.ComplexType1(); + public ClassWithPragmasNamespace.Pocos.ComplexType1 myComplexType { get; set; } = new ClassWithPragmasNamespace.Pocos.ComplexType1(); } + } + namespace Pocos + { public partial class ComplexType1 : AXSharp.Connector.IPlain { public ComplexType1() 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/.g/POCO/class_with_primitive_members.g.cs index 130080570..41e42dcdf 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/.g/POCO/class_with_primitive_members.g.cs @@ -2,9 +2,9 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace ClassWithPrimitiveTypesNamespace { - namespace ClassWithPrimitiveTypesNamespace + namespace Pocos { public partial class ClassWithPrimitiveTypes : AXSharp.Connector.IPlain { @@ -13,35 +13,20 @@ public ClassWithPrimitiveTypes() } public Boolean myBOOL { get; set; } - public Byte myBYTE { get; set; } - public UInt16 myWORD { get; set; } - public UInt32 myDWORD { get; set; } - public UInt64 myLWORD { get; set; } - public SByte mySINT { get; set; } - public Int16 myINT { get; set; } - public Int32 myDINT { get; set; } - public Int64 myLINT { get; set; } - public Byte myUSINT { get; set; } - public UInt16 myUINT { get; set; } - public UInt32 myUDINT { get; set; } - public UInt64 myULINT { get; set; } - public Single myREAL { get; set; } - 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); @@ -51,9 +36,7 @@ public ClassWithPrimitiveTypes() public DateTime myDATE_AND_TIME { get; set; } = default(DateTime); public DateTime myLDATE_AND_TIME { get; set; } = default(DateTime); public Char myCHAR { get; set; } - public Char myWCHAR { get; set; } - 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_with_using_directives.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_with_using_directives.g.cs index ca595c931..ccc0bd7cd 100644 --- 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/.g/POCO/class_with_using_directives.g.cs @@ -16,8 +16,7 @@ public ClassWithUsingDirectives() using SimpleFirstLevelNamespace ; using SimpleQualifiedNamespace . Qualified ; using HelloLevelOne . HelloLevelTwo ; -} - +} } namespace SimpleFirstLevelNamespace { } @@ -31,4 +30,4 @@ namespace HelloLevelOne namespace HelloLevelTwo { } -} } +} \ No newline at end of file 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/.g/POCO/compileromitsattribute.g.cs index fd3e74f63..338ccb41d 100644 --- 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/.g/POCO/compileromitsattribute.g.cs @@ -2,9 +2,9 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace CompilerOmmits { - namespace CompilerOmmits + namespace Pocos { public partial class ClassWithArrays : AXSharp.Connector.IPlain { @@ -13,10 +13,13 @@ public ClassWithArrays() } [CompilerOmitsAttribute("Onliner")] - public CompilerOmmits.Complex _must_be_omitted_in_onliner { get; set; } = new CompilerOmmits.Complex(); + public CompilerOmmits.Pocos.Complex _must_be_omitted_in_onliner { get; set; } = new CompilerOmmits.Pocos.Complex(); public Byte[] _primitive { get; set; } = new Byte[11]; } + } + namespace Pocos + { public partial class Complex : AXSharp.Connector.IPlain { public Complex() @@ -27,8 +30,11 @@ public Complex() public UInt64 Id { get; set; } } } +} - namespace Enums +namespace Enums +{ + namespace Pocos { public partial class ClassWithEnums : AXSharp.Connector.IPlain { @@ -37,12 +43,14 @@ public ClassWithEnums() } public global::Enums.Colors colors { get; set; } - public String NamedValuesColors { get; set; } } } +} - namespace misc +namespace misc +{ + namespace Pocos { public partial class VariousMembers : AXSharp.Connector.IPlain { @@ -50,10 +58,13 @@ public VariousMembers() { } - public misc.SomeClass _SomeClass { get; set; } = new misc.SomeClass(); - public misc.Motor _Motor { get; set; } = new misc.Motor(); + public misc.Pocos.SomeClass _SomeClass { get; set; } = new misc.Pocos.SomeClass(); + public misc.Pocos.Motor _Motor { get; set; } = new misc.Pocos.Motor(); } + } + namespace Pocos + { public partial class SomeClass : AXSharp.Connector.IPlain { public SomeClass() @@ -62,7 +73,10 @@ public SomeClass() public string SomeClassVariable { get; set; } = string.Empty; } + } + namespace Pocos + { public partial class Motor : AXSharp.Connector.IPlain { public Motor() @@ -71,33 +85,42 @@ public Motor() public Boolean isRunning { get; set; } } + } + namespace Pocos + { public partial class Vehicle : AXSharp.Connector.IPlain { public Vehicle() { } - public misc.Motor m { get; set; } = new misc.Motor(); + public misc.Pocos.Motor m { get; set; } = new misc.Pocos.Motor(); public Int16 displacement { get; set; } } } +} - namespace UnknownArraysShouldNotBeTraspiled +namespace UnknownArraysShouldNotBeTraspiled +{ + namespace Pocos { public partial class ClassWithArrays : AXSharp.Connector.IPlain { public ClassWithArrays() { #pragma warning disable CS0612 - AXSharp.Connector.BuilderHelpers.Arrays.InstantiateArray(_complexKnown, () => new UnknownArraysShouldNotBeTraspiled.Complex(), new[] { (0, 10) }); + AXSharp.Connector.BuilderHelpers.Arrays.InstantiateArray(_complexKnown, () => new UnknownArraysShouldNotBeTraspiled.Pocos.Complex(), new[] { (0, 10) }); #pragma warning restore CS0612 } - public UnknownArraysShouldNotBeTraspiled.Complex[] _complexKnown { get; set; } = new UnknownArraysShouldNotBeTraspiled.Complex[11]; + public UnknownArraysShouldNotBeTraspiled.Pocos.Complex[] _complexKnown { get; set; } = new UnknownArraysShouldNotBeTraspiled.Pocos.Complex[11]; public Byte[] _primitive { get; set; } = new Byte[11]; } + } + namespace Pocos + { public partial class Complex : AXSharp.Connector.IPlain { public Complex() 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/.g/POCO/configuration.g.cs index bf5892631..63db40273 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/.g/POCO/configuration.g.cs @@ -6,37 +6,22 @@ namespace Pocos { public partial class unitsTwinController { - public ComplexForConfig Complex { get; set; } = new ComplexForConfig(); + public global::Pocos.ComplexForConfig Complex { get; set; } = new global::Pocos.ComplexForConfig(); public Boolean myBOOL { get; set; } - public Byte myBYTE { get; set; } - public UInt16 myWORD { get; set; } - public UInt32 myDWORD { get; set; } - public UInt64 myLWORD { get; set; } - public SByte mySINT { get; set; } - public Int16 myINT { get; set; } - public Int32 myDINT { get; set; } - public Int64 myLINT { get; set; } - public Byte myUSINT { get; set; } - public UInt16 myUINT { get; set; } - public UInt32 myUDINT { get; set; } - public UInt64 myULINT { get; set; } - public Single myREAL { get; set; } - 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); @@ -46,27 +31,31 @@ public partial class unitsTwinController public DateTime myDATE_AND_TIME { get; set; } = default(DateTime); public DateTime myLDATE_AND_TIME { get; set; } = default(DateTime); public Char myCHAR { get; set; } - public Char myWCHAR { get; set; } - public string mySTRING { get; set; } = string.Empty; public string myWSTRING { get; set; } = string.Empty; + [ReadOnce()] public string myWSTRING_readOnce { get; set; } = string.Empty; + [ReadOnly()] public string myWSTRING_readOnly { get; set; } = string.Empty; + [ReadOnce()] - public ComplexForConfig cReadOnce { get; set; } = new ComplexForConfig(); + public global::Pocos.ComplexForConfig cReadOnce { get; set; } = new global::Pocos.ComplexForConfig(); + [ReadOnly()] - public ComplexForConfig cReadOnly { get; set; } = new ComplexForConfig(); + public global::Pocos.ComplexForConfig cReadOnly { get; set; } = new global::Pocos.ComplexForConfig(); public global::Colorss Colorss { get; set; } - public UInt64 Colorsss { get; set; } [CompilerOmitsAttribute("Onliner")] public Boolean _must_be_omitted_in_onliner { get; set; } } +} +namespace Pocos +{ public partial class ComplexForConfig : AXSharp.Connector.IPlain { public ComplexForConfig() @@ -74,35 +63,20 @@ public ComplexForConfig() } public Boolean myBOOL { get; set; } - public Byte myBYTE { get; set; } - public UInt16 myWORD { get; set; } - public UInt32 myDWORD { get; set; } - public UInt64 myLWORD { get; set; } - public SByte mySINT { get; set; } - public Int16 myINT { get; set; } - public Int32 myDINT { get; set; } - public Int64 myLINT { get; set; } - public Byte myUSINT { get; set; } - public UInt16 myUINT { get; set; } - public UInt32 myUDINT { get; set; } - public UInt64 myULINT { get; set; } - public Single myREAL { get; set; } - 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); @@ -112,14 +86,15 @@ public ComplexForConfig() public DateTime myDATE_AND_TIME { get; set; } = default(DateTime); public DateTime myLDATE_AND_TIME { get; set; } = default(DateTime); public Char myCHAR { get; set; } - public Char myWCHAR { get; set; } - public string mySTRING { get; set; } = string.Empty; public string myWSTRING { get; set; } = string.Empty; - public Motor myMotor { get; set; } = new Motor(); + public global::Pocos.Motor myMotor { get; set; } = new global::Pocos.Motor(); } +} +namespace Pocos +{ public partial class Motor : AXSharp.Connector.IPlain { public Motor() @@ -128,14 +103,17 @@ public Motor() public Boolean isRunning { get; set; } } +} +namespace Pocos +{ public partial class Vehicle : AXSharp.Connector.IPlain { public Vehicle() { } - public Motor m { get; set; } = new Motor(); + public global::Pocos.Motor m { get; set; } = new global::Pocos.Motor(); public Int16 displacement { get; set; } } } \ No newline at end of file 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/.g/POCO/enum_simple.g.cs index e23d372b9..da1480552 100644 --- 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/.g/POCO/enum_simple.g.cs @@ -1,7 +1,3 @@ using System; using AXSharp.Abstractions.Presentation; -using AXSharp.Connector; - -namespace Pocos -{ -} \ No newline at end of file +using AXSharp.Connector; \ No newline at end of file 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/.g/POCO/file_with_unsupported.g.cs index 56cacaa1e..a5813f10c 100644 --- 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/.g/POCO/file_with_unsupported.g.cs @@ -2,9 +2,6 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace Unsupported { - namespace Unsupported - { - } } \ No newline at end of file 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/.g/POCO/file_with_usings.g.cs index 1fecb9332..531988641 100644 --- 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/.g/POCO/file_with_usings.g.cs @@ -1,13 +1,13 @@ using System; using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -using Pocos.FileWithUsingsSimpleFirstLevelNamespace; -using Pocos.FileWithUsingsSimpleQualifiedNamespace.Qualified; -using Pocos.FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo; +using FileWithUsingsSimpleFirstLevelNamespace.Pocos; +using FileWithUsingsSimpleQualifiedNamespace.Qualified.Pocos; +using FileWithUsingsHelloLevelOne.FileWithUsingsHelloLevelTwo.Pocos; -namespace Pocos +namespace FileWithUsingsSimpleFirstLevelNamespace { - namespace FileWithUsingsSimpleFirstLevelNamespace + namespace Pocos { public partial class Hello : AXSharp.Connector.IPlain { @@ -16,8 +16,11 @@ public Hello() } } } +} - namespace FileWithUsingsSimpleQualifiedNamespace.Qualified +namespace FileWithUsingsSimpleQualifiedNamespace.Qualified +{ + namespace Pocos { public partial class Hello : AXSharp.Connector.IPlain { @@ -26,10 +29,13 @@ public Hello() } } } +} - namespace FileWithUsingsHelloLevelOne +namespace FileWithUsingsHelloLevelOne +{ + namespace FileWithUsingsHelloLevelTwo { - namespace FileWithUsingsHelloLevelTwo + namespace Pocos { public partial class Hello : AXSharp.Connector.IPlain { @@ -39,8 +45,11 @@ public Hello() } } } +} - namespace ExampleNamespace +namespace ExampleNamespace +{ + namespace Pocos { public partial class Hello : AXSharp.Connector.IPlain { 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/.g/POCO/generics.g.cs index c950e084b..9e56f3177 100644 --- 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/.g/POCO/generics.g.cs @@ -2,9 +2,9 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace GenericsTests { - namespace GenericsTests + namespace Pocos { public partial class Extender : AXSharp.Connector.IPlain { @@ -12,7 +12,10 @@ public Extender() { } } + } + namespace Pocos + { public partial class SomeTypeToBeGeneric : AXSharp.Connector.IPlain { public SomeTypeToBeGeneric() @@ -20,11 +23,13 @@ public SomeTypeToBeGeneric() } public Boolean Boolean { get; set; } - public Int16 Cele { get; set; } } + } - public partial class Extendee2 : GenericsTests.Extender, AXSharp.Connector.IPlain + namespace Pocos + { + public partial class Extendee2 : GenericsTests.Pocos.Extender, AXSharp.Connector.IPlain { public Extendee2() : base() { @@ -33,7 +38,7 @@ public Extendee2() : base() [AXOpen.Data.AxoDataEntityAttribute] [Container(Layout.Stack)] [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "Shared Header")] - public GenericsTests.SomeTypeToBeGeneric SomeData { get; set; } = new GenericsTests.SomeTypeToBeGeneric(); + public GenericsTests.Pocos.SomeTypeToBeGeneric SomeData { get; set; } = new GenericsTests.Pocos.SomeTypeToBeGeneric(); } } } \ No newline at end of file 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/.g/POCO/makereadonce.g.cs index 32d6a7428..0b7fa1cdf 100644 --- 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/.g/POCO/makereadonce.g.cs @@ -2,9 +2,9 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace makereadonce { - namespace makereadonce + namespace Pocos { public partial class MembersWithMakeReadOnce : AXSharp.Connector.IPlain { @@ -15,11 +15,15 @@ public MembersWithMakeReadOnce() [ReadOnce()] public string makeReadOnceMember { get; set; } = string.Empty; public string someOtherMember { get; set; } = string.Empty; + [ReadOnce()] - public makereadonce.ComplexMember makeReadComplexMember { get; set; } = new makereadonce.ComplexMember(); - public makereadonce.ComplexMember someotherComplexMember { get; set; } = new makereadonce.ComplexMember(); + public makereadonce.Pocos.ComplexMember makeReadComplexMember { get; set; } = new makereadonce.Pocos.ComplexMember(); + public makereadonce.Pocos.ComplexMember someotherComplexMember { get; set; } = new makereadonce.Pocos.ComplexMember(); } + } + namespace Pocos + { public partial class ComplexMember : AXSharp.Connector.IPlain { public ComplexMember() 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/.g/POCO/makereadonly.g.cs index e4a569d8f..accfa07d7 100644 --- 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/.g/POCO/makereadonly.g.cs @@ -2,9 +2,9 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace makereadonly { - namespace makereadonly + namespace Pocos { public partial class MembersWithMakeReadOnly : AXSharp.Connector.IPlain { @@ -15,11 +15,15 @@ public MembersWithMakeReadOnly() [ReadOnly()] public string makeReadOnceMember { get; set; } = string.Empty; public string someOtherMember { get; set; } = string.Empty; + [ReadOnly()] - public makereadonly.ComplexMember makeReadComplexMember { get; set; } = new makereadonly.ComplexMember(); - public makereadonly.ComplexMember someotherComplexMember { get; set; } = new makereadonly.ComplexMember(); + public makereadonly.Pocos.ComplexMember makeReadComplexMember { get; set; } = new makereadonly.Pocos.ComplexMember(); + public makereadonly.Pocos.ComplexMember someotherComplexMember { get; set; } = new makereadonly.Pocos.ComplexMember(); } + } + namespace Pocos + { public partial class ComplexMember : AXSharp.Connector.IPlain { public ComplexMember() 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/.g/POCO/misc.g.cs index c1d3efe39..5a02e1b13 100644 --- 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/.g/POCO/misc.g.cs @@ -2,9 +2,9 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace Enums { - namespace Enums + namespace Pocos { public partial class ClassWithEnums : AXSharp.Connector.IPlain { @@ -13,12 +13,14 @@ public ClassWithEnums() } public global::Enums.Colors colors { get; set; } - public String NamedValuesColors { get; set; } } } +} - namespace misc +namespace misc +{ + namespace Pocos { public partial class VariousMembers : AXSharp.Connector.IPlain { @@ -26,10 +28,13 @@ public VariousMembers() { } - public misc.SomeClass _SomeClass { get; set; } = new misc.SomeClass(); - public misc.Motor _Motor { get; set; } = new misc.Motor(); + public misc.Pocos.SomeClass _SomeClass { get; set; } = new misc.Pocos.SomeClass(); + public misc.Pocos.Motor _Motor { get; set; } = new misc.Pocos.Motor(); } + } + namespace Pocos + { public partial class SomeClass : AXSharp.Connector.IPlain { public SomeClass() @@ -38,7 +43,10 @@ public SomeClass() public string SomeClassVariable { get; set; } = string.Empty; } + } + namespace Pocos + { public partial class Motor : AXSharp.Connector.IPlain { public Motor() @@ -47,33 +55,42 @@ public Motor() public Boolean isRunning { get; set; } } + } + namespace Pocos + { public partial class Vehicle : AXSharp.Connector.IPlain { public Vehicle() { } - public misc.Motor m { get; set; } = new misc.Motor(); + public misc.Pocos.Motor m { get; set; } = new misc.Pocos.Motor(); public Int16 displacement { get; set; } } } +} - namespace UnknownArraysShouldNotBeTraspiled +namespace UnknownArraysShouldNotBeTraspiled +{ + namespace Pocos { public partial class ClassWithArrays : AXSharp.Connector.IPlain { public ClassWithArrays() { #pragma warning disable CS0612 - AXSharp.Connector.BuilderHelpers.Arrays.InstantiateArray(_complexKnown, () => new UnknownArraysShouldNotBeTraspiled.Complex(), new[] { (0, 10) }); + AXSharp.Connector.BuilderHelpers.Arrays.InstantiateArray(_complexKnown, () => new UnknownArraysShouldNotBeTraspiled.Pocos.Complex(), new[] { (0, 10) }); #pragma warning restore CS0612 } - public UnknownArraysShouldNotBeTraspiled.Complex[] _complexKnown { get; set; } = new UnknownArraysShouldNotBeTraspiled.Complex[11]; + public UnknownArraysShouldNotBeTraspiled.Pocos.Complex[] _complexKnown { get; set; } = new UnknownArraysShouldNotBeTraspiled.Pocos.Complex[11]; public Byte[] _primitive { get; set; } = new Byte[11]; } + } + namespace Pocos + { public partial class Complex : AXSharp.Connector.IPlain { public Complex() 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/.g/POCO/mixed_access.g.cs index ef826ab87..8a60e2631 100644 --- 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/.g/POCO/mixed_access.g.cs @@ -7,16 +7,17 @@ namespace Pocos public partial class unitsTwinController { public Boolean MotorOn { get; set; } - public Int16 MotorState { get; set; } - - public Motor Motor1 { get; set; } = new Motor(); - public Motor Motor2 { get; set; } = new Motor(); - public struct1 s1 { get; set; } = new struct1(); - public struct4 s4 { get; set; } = new struct4(); - public SpecificMotorA mot1 { get; set; } = new SpecificMotorA(); + public global::Pocos.Motor Motor1 { get; set; } = new global::Pocos.Motor(); + public global::Pocos.Motor Motor2 { get; set; } = new global::Pocos.Motor(); + public global::Pocos.struct1 s1 { get; set; } = new global::Pocos.struct1(); + public global::Pocos.struct4 s4 { get; set; } = new global::Pocos.struct4(); + public global::Pocos.SpecificMotorA mot1 { get; set; } = new global::Pocos.SpecificMotorA(); } +} +namespace Pocos +{ public partial class Motor : AXSharp.Connector.IPlain { public Motor() @@ -25,34 +26,46 @@ public Motor() public Boolean Run { get; set; } } +} +namespace Pocos +{ public partial class struct1 : AXSharp.Connector.IPlain { public struct1() { } - public struct2 s2 { get; set; } = new struct2(); + public global::Pocos.struct2 s2 { get; set; } = new global::Pocos.struct2(); } +} +namespace Pocos +{ public partial class struct2 : AXSharp.Connector.IPlain { public struct2() { } - public struct3 s3 { get; set; } = new struct3(); + public global::Pocos.struct3 s3 { get; set; } = new global::Pocos.struct3(); } +} +namespace Pocos +{ public partial class struct3 : AXSharp.Connector.IPlain { public struct3() { } - public struct4 s4 { get; set; } = new struct4(); + public global::Pocos.struct4 s4 { get; set; } = new global::Pocos.struct4(); } +} +namespace Pocos +{ public partial class struct4 : AXSharp.Connector.IPlain { public struct4() @@ -61,7 +74,10 @@ public struct4() public Int16 s5 { get; set; } } +} +namespace Pocos +{ public partial class AbstractMotor : AXSharp.Connector.IPlain { public AbstractMotor() @@ -69,18 +85,23 @@ public AbstractMotor() } public Boolean Run { get; set; } - public Boolean ReverseDirection { get; set; } } +} - public partial class GenericMotor : AbstractMotor, AXSharp.Connector.IPlain +namespace Pocos +{ + public partial class GenericMotor : global::Pocos.AbstractMotor, AXSharp.Connector.IPlain { public GenericMotor() : base() { } } +} - public partial class SpecificMotorA : GenericMotor, AXSharp.Connector.IPlain +namespace Pocos +{ + public partial class SpecificMotorA : global::Pocos.GenericMotor, AXSharp.Connector.IPlain { public SpecificMotorA() : base() { 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/.g/POCO/program.g.cs index e23d372b9..da1480552 100644 --- 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/.g/POCO/program.g.cs @@ -1,7 +1,3 @@ using System; using AXSharp.Abstractions.Presentation; -using AXSharp.Connector; - -namespace Pocos -{ -} \ No newline at end of file +using AXSharp.Connector; \ No newline at end of file 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/.g/POCO/ref_to_simple.g.cs index 22248e832..61341c517 100644 --- 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/.g/POCO/ref_to_simple.g.cs @@ -2,9 +2,9 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace RefToSimple { - namespace RefToSimple + namespace Pocos { public partial class ref_to_simple : AXSharp.Connector.IPlain { @@ -12,7 +12,10 @@ public ref_to_simple() { } } + } + namespace Pocos + { public partial class referenced : AXSharp.Connector.IPlain { public referenced() 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/.g/POCO/simple_empty_class_within_namespace.g.cs index 3cf279ae8..1a44a5d90 100644 --- 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/.g/POCO/simple_empty_class_within_namespace.g.cs @@ -2,9 +2,9 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace sampleNamespace { - namespace sampleNamespace + namespace Pocos { public partial class simple_empty_class_within_namespace : AXSharp.Connector.IPlain { 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/.g/POCO/struct_simple.g.cs index 0c0b4d7c5..c8379bf3c 100644 --- 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/.g/POCO/struct_simple.g.cs @@ -12,14 +12,17 @@ public Motor() public Boolean isRunning { get; set; } } +} +namespace Pocos +{ public partial class Vehicle : AXSharp.Connector.IPlain { public Vehicle() { } - public Motor m { get; set; } = new Motor(); + public global::Pocos.Motor m { get; set; } = new global::Pocos.Motor(); public Int16 displacement { get; set; } } } \ No newline at end of file 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/.g/POCO/type_named_values.g.cs index a5e6936b1..686775c2c 100644 --- 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/.g/POCO/type_named_values.g.cs @@ -2,9 +2,9 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace NamedValuesNamespace { - namespace NamedValuesNamespace + namespace Pocos { public partial class using_type_named_values : AXSharp.Connector.IPlain { 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/.g/POCO/type_named_values_literals.g.cs index 14b4df591..7d364e2fa 100644 --- 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/.g/POCO/type_named_values_literals.g.cs @@ -2,9 +2,9 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace Simatic.Ax.StateFramework { - namespace Simatic.Ax.StateFramework + namespace Pocos { public partial class using_type_named_values : AXSharp.Connector.IPlain { 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/.g/POCO/type_with_enum.g.cs index 3a3c5da53..5ba94fd35 100644 --- 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/.g/POCO/type_with_enum.g.cs @@ -2,16 +2,16 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace Simatic.Ax.StateFramework { - namespace Simatic.Ax.StateFramework + public partial interface IGuard { - public partial interface IGuard - { - } } +} - namespace Simatic.Ax.StateFramework +namespace Simatic.Ax.StateFramework +{ + namespace Pocos { public partial class CompareGuardLint : AXSharp.Connector.IPlain, IGuard { @@ -20,7 +20,6 @@ public CompareGuardLint() } public Int64 CompareToValue { get; set; } - public global::Simatic.Ax.StateFramework.Condition Condition { get; set; } } } 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/.g/POCO/types_with_name_attributes.g.cs index 2c9aba9fb..945a50ce2 100644 --- 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/.g/POCO/types_with_name_attributes.g.cs @@ -2,9 +2,9 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace TypeWithNameAttributes { - namespace TypeWithNameAttributes + namespace Pocos { public partial class Motor : AXSharp.Connector.IPlain { @@ -14,17 +14,23 @@ public Motor() public Boolean isRunning { get; set; } } + } + namespace Pocos + { public partial class Vehicle : AXSharp.Connector.IPlain { public Vehicle() { } - public TypeWithNameAttributes.Motor m { get; set; } = new TypeWithNameAttributes.Motor(); + public TypeWithNameAttributes.Pocos.Motor m { get; set; } = new TypeWithNameAttributes.Pocos.Motor(); public Int16 displacement { get; set; } } + } + namespace Pocos + { public partial class NoAccessModifierClass : AXSharp.Connector.IPlain { public NoAccessModifierClass() 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/.g/POCO/types_with_property_attributes.g.cs index 85e0d82b0..22cf8a9e7 100644 --- 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/.g/POCO/types_with_property_attributes.g.cs @@ -2,9 +2,9 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace TypesWithPropertyAttributes { - namespace TypesWithPropertyAttributes + namespace Pocos { [AXSharp.Connector.AddedPropertiesAttribute("Description", "Some added property name value")] public partial class SomeAddedProperties : AXSharp.Connector.IPlain diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/units.csproj b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/units.csproj index 826d6fc1a..480959d2e 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/units.csproj +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/units.csproj @@ -1,13 +1,13 @@ - net8.0 + net9.0 enable enable - - + + diff --git a/src/AXSharp.compiler/tests/AXSharp.CompilerTests/ApaxTests.cs b/src/AXSharp.compiler/tests/AXSharp.CompilerTests/ApaxTests.cs index 59435e5ed..4ef0687a4 100644 --- a/src/AXSharp.compiler/tests/AXSharp.CompilerTests/ApaxTests.cs +++ b/src/AXSharp.compiler/tests/AXSharp.CompilerTests/ApaxTests.cs @@ -76,6 +76,9 @@ public void should_load_and_parse_apax_app_file() [Fact()] public void should_update_apax_version() { +#if !DEBUG + return; +#endif var apaxWorkspaceFile = Apax.CreateApaxDto(Path.Combine(testFolder, @"samples//plt1//app//apax.yml")); Assert.Equal("plt-app", apaxWorkspaceFile.Name); Assert.Equal("app", apaxWorkspaceFile.Type); diff --git a/src/AXSharp.compiler/tests/AXSharp.ixc.Tests/DisplayNameOrderer.cs b/src/AXSharp.compiler/tests/AXSharp.ixc.Tests/DisplayNameOrderer.cs index ed091457a..ab6f7fc70 100644 --- a/src/AXSharp.compiler/tests/AXSharp.ixc.Tests/DisplayNameOrderer.cs +++ b/src/AXSharp.compiler/tests/AXSharp.ixc.Tests/DisplayNameOrderer.cs @@ -7,7 +7,7 @@ using Xunit.Abstractions; -[assembly: TestCollectionOrderer("AXSharp.ixcTests.DisplayNameOrderer", "AXSharp.ixcTests")] +[assembly: TestCollectionOrderer("AXSharp.ixcTests.DisplayNameOrderer", "AXSharp.ixc.Tests")] [assembly: CollectionBehavior(DisableTestParallelization = true)] namespace AXSharp.ixcTests; diff --git a/src/AXSharp.compiler/tests/integration/expected/.gitignore b/src/AXSharp.compiler/tests/integration/expected/.gitignore new file mode 100644 index 000000000..42d9b3c6a --- /dev/null +++ b/src/AXSharp.compiler/tests/integration/expected/.gitignore @@ -0,0 +1,6 @@ +.apax +.env +bin + +obj +testresult diff --git a/src/AXSharp.compiler/tests/integration/expected/apax-lock.json b/src/AXSharp.compiler/tests/integration/expected/apax-lock.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/src/AXSharp.compiler/tests/integration/expected/apax-lock.json @@ -0,0 +1 @@ +{} diff --git a/src/AXSharp.compiler/tests/integration/expected/apax.yml b/src/AXSharp.compiler/tests/integration/expected/apax.yml new file mode 100644 index 000000000..fe5608865 --- /dev/null +++ b/src/AXSharp.compiler/tests/integration/expected/apax.yml @@ -0,0 +1,3 @@ +name: "integration" +version: 0.1.0 +type: workspace diff --git a/src/AXSharp.compiler/tests/integration/expected/app/AXSharp.config.json b/src/AXSharp.compiler/tests/integration/expected/app/AXSharp.config.json index 543f25b00..a761de8d2 100644 --- a/src/AXSharp.compiler/tests/integration/expected/app/AXSharp.config.json +++ b/src/AXSharp.compiler/tests/integration/expected/app/AXSharp.config.json @@ -1 +1 @@ -{"OutputProjectFolder":"ix"} \ No newline at end of file +{"OutputProjectFolder":"ix","UseBase":false,"NoDependencyUpdate":false,"IgnoreS7Pragmas":false,"SkipDependencyCompilation":false,"ProjectFile":"app.csproj"} \ No newline at end of file diff --git a/src/AXSharp.compiler/tests/integration/expected/app/axsharp.companion.json b/src/AXSharp.compiler/tests/integration/expected/app/axsharp.companion.json new file mode 100644 index 000000000..16d006cd2 --- /dev/null +++ b/src/AXSharp.compiler/tests/integration/expected/app/axsharp.companion.json @@ -0,0 +1 @@ +{"Id":"app","Version":"0.0.0"} \ No newline at end of file diff --git a/src/AXSharp.compiler/tests/integration/expected/app/ix/.g/Onliners/configuration.g.cs b/src/AXSharp.compiler/tests/integration/expected/app/ix/.g/Onliners/configuration.g.cs index ce3ecb3f5..47f02510e 100644 --- a/src/AXSharp.compiler/tests/integration/expected/app/ix/.g/Onliners/configuration.g.cs +++ b/src/AXSharp.compiler/tests/integration/expected/app/ix/.g/Onliners/configuration.g.cs @@ -8,9 +8,7 @@ public partial class appTwinController : ITwinController { public AXSharp.Connector.Connector Connector { get; } - public lib1.MyClass lib1_MyClass { get; } - public lib2.MyClass lib2_MyClass { get; } public appTwinController(AXSharp.Connector.ConnectorAdapter adapter, object[] parameters) diff --git a/src/AXSharp.compiler/tests/integration/expected/app/ix/.g/POCO/configuration.g.cs b/src/AXSharp.compiler/tests/integration/expected/app/ix/.g/POCO/configuration.g.cs index 842fa3b13..762b4ddad 100644 --- a/src/AXSharp.compiler/tests/integration/expected/app/ix/.g/POCO/configuration.g.cs +++ b/src/AXSharp.compiler/tests/integration/expected/app/ix/.g/POCO/configuration.g.cs @@ -6,7 +6,7 @@ namespace Pocos { public partial class appTwinController { - public lib1.MyClass lib1_MyClass { get; set; } = new lib1.MyClass(); - public lib2.MyClass lib2_MyClass { get; set; } = new lib2.MyClass(); + public lib1.Pocos.MyClass lib1_MyClass { get; set; } = new lib1.Pocos.MyClass(); + public lib2.Pocos.MyClass lib2_MyClass { get; set; } = new lib2.Pocos.MyClass(); } } \ No newline at end of file diff --git a/src/AXSharp.compiler/tests/integration/expected/app/ix/.g/POCO/program.g.cs b/src/AXSharp.compiler/tests/integration/expected/app/ix/.g/POCO/program.g.cs index e23d372b9..da1480552 100644 --- a/src/AXSharp.compiler/tests/integration/expected/app/ix/.g/POCO/program.g.cs +++ b/src/AXSharp.compiler/tests/integration/expected/app/ix/.g/POCO/program.g.cs @@ -1,7 +1,3 @@ using System; using AXSharp.Abstractions.Presentation; -using AXSharp.Connector; - -namespace Pocos -{ -} \ No newline at end of file +using AXSharp.Connector; \ No newline at end of file diff --git a/src/AXSharp.compiler/tests/integration/expected/build.ps1 b/src/AXSharp.compiler/tests/integration/expected/build.ps1 new file mode 100644 index 000000000..48b220a9a --- /dev/null +++ b/src/AXSharp.compiler/tests/integration/expected/build.ps1 @@ -0,0 +1,14 @@ +cd lib1 +dotnet run --project ..\..\..\src\ixc\AXSharp.ixc.csproj --framework net7.0 +dotnet build ./ix/lib1.csproj +cd .. + +cd lib2 +dotnet run --project ..\..\..\src\ixc\AXSharp.ixc.csproj --framework net7.0 +dotnet build ./ix/lib2.csproj +cd .. + +cd app +dotnet run --project ..\..\..\..\src\ixc\AXSharp.ixc.csproj --framework net7.0 +dotnet build ./ix/app.csproj +cd .. \ No newline at end of file diff --git a/src/AXSharp.compiler/tests/integration/expected/lib1/AXSharp.config.json b/src/AXSharp.compiler/tests/integration/expected/lib1/AXSharp.config.json index 543f25b00..bd2469ecb 100644 --- a/src/AXSharp.compiler/tests/integration/expected/lib1/AXSharp.config.json +++ b/src/AXSharp.compiler/tests/integration/expected/lib1/AXSharp.config.json @@ -1 +1 @@ -{"OutputProjectFolder":"ix"} \ No newline at end of file +{"OutputProjectFolder":"ix","UseBase":false,"NoDependencyUpdate":false,"IgnoreS7Pragmas":false,"SkipDependencyCompilation":false,"ProjectFile":"lib1.csproj"} \ No newline at end of file diff --git a/src/AXSharp.compiler/tests/integration/expected/lib1/axsharp.companion.json b/src/AXSharp.compiler/tests/integration/expected/lib1/axsharp.companion.json new file mode 100644 index 000000000..8f3bf1dde --- /dev/null +++ b/src/AXSharp.compiler/tests/integration/expected/lib1/axsharp.companion.json @@ -0,0 +1 @@ +{"Id":"lib1","Version":"0.0.0"} \ No newline at end of file diff --git a/src/AXSharp.compiler/tests/integration/expected/lib2/AXSharp.config.json b/src/AXSharp.compiler/tests/integration/expected/lib2/AXSharp.config.json index 543f25b00..5572803e9 100644 --- a/src/AXSharp.compiler/tests/integration/expected/lib2/AXSharp.config.json +++ b/src/AXSharp.compiler/tests/integration/expected/lib2/AXSharp.config.json @@ -1 +1 @@ -{"OutputProjectFolder":"ix"} \ No newline at end of file +{"OutputProjectFolder":"ix","UseBase":false,"NoDependencyUpdate":false,"IgnoreS7Pragmas":false,"SkipDependencyCompilation":false,"ProjectFile":"lib2.csproj"} \ No newline at end of file diff --git a/src/AXSharp.compiler/tests/integration/expected/lib2/axsharp.companion.json b/src/AXSharp.compiler/tests/integration/expected/lib2/axsharp.companion.json new file mode 100644 index 000000000..40855e89b --- /dev/null +++ b/src/AXSharp.compiler/tests/integration/expected/lib2/axsharp.companion.json @@ -0,0 +1 @@ +{"Id":"lib2","Version":"0.0.0"} \ No newline at end of file diff --git a/src/AXSharp.connectors/src/AXSharp.Connector.S71500.WebAPI/WebApiConnector.cs b/src/AXSharp.connectors/src/AXSharp.Connector.S71500.WebAPI/WebApiConnector.cs index 54372d45a..af78eceb4 100644 --- a/src/AXSharp.connectors/src/AXSharp.Connector.S71500.WebAPI/WebApiConnector.cs +++ b/src/AXSharp.connectors/src/AXSharp.Connector.S71500.WebAPI/WebApiConnector.cs @@ -293,8 +293,8 @@ internal void HandleCommFailure(Exception exception, string description, ITwi } } - private const int MAX_READ_REQUEST_SEGMENT = (64 * 1024) - 628; - private const int MAX_WRITE_REQUEST_SEGMENT = (64 * 1024) - 628; + private const int MAX_READ_REQUEST_SEGMENT = (128 * 1024) - 628*2; + private const int MAX_WRITE_REQUEST_SEGMENT = (128 * 1024) - 628*2; private System.Diagnostics.Stopwatch stopwatch = new(); diff --git a/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/AXSharp.Connector.S71500.WebAPITests.csproj b/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/AXSharp.Connector.S71500.WebAPITests.csproj index 8ae3ead27..6c8289d25 100644 --- a/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/AXSharp.Connector.S71500.WebAPITests.csproj +++ b/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/AXSharp.Connector.S71500.WebAPITests.csproj @@ -21,8 +21,8 @@ - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all @@ -41,6 +41,7 @@ + @@ -49,4 +50,13 @@ + + + PreserveNewest + + + PreserveNewest + + + diff --git a/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/DisplayNameOrderer.cs b/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/DisplayNameOrderer.cs index c43d6521d..9a5248993 100644 --- a/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/DisplayNameOrderer.cs +++ b/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/DisplayNameOrderer.cs @@ -11,7 +11,7 @@ using Xunit.Abstractions; -[assembly: TestCollectionOrderer("AXSharp.Connector.Sax.WebAPITests.DisplayNameOrderer", "AXSharp.Connector.Sax.WebAPITests")] +[assembly: TestCollectionOrderer("AXSharp.Connector.Sax.WebAPITests.DisplayNameOrderer", "AXSharp.Connector.S71500.WebAPITests")] [assembly: CollectionBehavior(DisableTestParallelization = true)] namespace AXSharp.Connector.Sax.WebAPITests; diff --git a/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/Exploratory.cs b/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/Exploratory.cs index df7266ab3..b7d542edd 100644 --- a/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/Exploratory.cs +++ b/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/Exploratory.cs @@ -36,7 +36,7 @@ public async void should_read_huge() #if RELEASE return; #endif - var connector = new WebApiConnector(TargetIp, "Everybody", Environment.GetEnvironmentVariable("AX_TARGET_PWD"), true); + var connector = TestConnector.TestApiConnector; var myBOOL = new WebApiBool(connector, "", "myBOOL"); @@ -156,7 +156,7 @@ public async Task should_write_huge() #if RELEASE return; #endif - var connector = new WebApiConnector(TargetIp, "Everybody", Environment.GetEnvironmentVariable("AX_TARGET_PWD"), true); + var connector = TestConnector.TestApiConnector; diff --git a/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/TestConnector.cs b/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/TestConnector.cs new file mode 100644 index 000000000..f496ac131 --- /dev/null +++ b/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/TestConnector.cs @@ -0,0 +1,38 @@ +using System; +using System.IO; +using System.Net.Http; +using System.Net.Security; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using AXSharp.Connector.S71500.WebApi; + +namespace AXSharp.Connector.S71500.WebAPITests; + +public static class TestConnector +{ + private static string TargetIp { get; } = Environment.GetEnvironmentVariable("AXTARGET") ?? "10.222.6.1"; + + public static WebApiConnector TestApiConnector { get; } + = new WebApiConnector(TargetIp, Environment.GetEnvironmentVariable("AX_USER_NAME"), Environment.GetEnvironmentVariable("AX_TARGET_PWD"),CertificateValidation, true).BuildAndStart() as WebApiConnector; + + private static string CertificatePath = "certs\\Communication.cer"; + + static string GetCertPath() + { + var fp = new FileInfo(Path.Combine(Assembly.GetExecutingAssembly().Location)); + return Path.Combine(fp.DirectoryName, CertificatePath); + } + + static readonly X509Certificate2 Certificate = new X509Certificate2(GetCertPath()); + + private static bool CertificateValidation(HttpRequestMessage requestMessage, X509Certificate2 certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) + { + return certificate.Thumbprint == Certificate.Thumbprint; + } + + public static ax_test_projectTwinController SecurePlc { get; } + = new(ConnectorAdapterBuilder.Build() + .CreateWebApi(TargetIp, Environment.GetEnvironmentVariable("AX_USER_NAME"), Environment.GetEnvironmentVariable("AX_TARGET_PWD"), CertificateValidation, true)); + + +} \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/WebApiConnector/WebApiConnectorTests.cs b/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/WebApiConnector/WebApiConnectorTests.cs index da4d35545..cb532a60f 100644 --- a/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/WebApiConnector/WebApiConnectorTests.cs +++ b/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/WebApiConnector/WebApiConnectorTests.cs @@ -43,7 +43,7 @@ public WebApiConnectorTests(ITestOutputHelper output) [Fact] public async Task should_write_bool() { - var connector = new WebApiConnector(TargetIp, "Everybody", Environment.GetEnvironmentVariable("AX_TARGET_PWD"), true).BuildAndStart() as WebApiConnector; + var connector = TestConnector.TestApiConnector; //await connector.Authenticate(TargetIp, "Everybody", ""); var myBOOL = new WebApiBool(connector, "", "myBOOL"); var actual = await connector.WriteAsync(myBOOL, true); @@ -54,7 +54,7 @@ public async Task should_write_bool() [Fact] public async Task should_read_bool() { - var connector = new WebApiConnector(TargetIp, "Everybody", Environment.GetEnvironmentVariable("AX_TARGET_PWD"), true); + var connector = TestConnector.TestApiConnector; var myBOOL = new WebApiBool(connector, "", "myBOOL"); await connector.WriteAsync(myBOOL, true); var response = await connector.ReadAsync("myBOOL"); @@ -65,7 +65,7 @@ public async Task should_read_bool() [Fact] public async Task should_write_byte() { - var connector = new WebApiConnector(TargetIp, "Everybody", Environment.GetEnvironmentVariable("AX_TARGET_PWD"), true); + var connector = TestConnector.TestApiConnector; var myBYTE = new WebApiByte(connector, "", "myBYTE"); var actual = await connector.WriteAsync(myBYTE, 155); @@ -75,7 +75,7 @@ public async Task should_write_byte() [Fact] public async Task should_read_byte() { - var connector = new WebApiConnector(TargetIp, "Everybody", Environment.GetEnvironmentVariable("AX_TARGET_PWD"), true); + var connector = TestConnector.TestApiConnector; var myBYTE = new WebApiByte(connector, "", "myBYTE"); await connector.WriteAsync(myBYTE, 158); var response = await connector.ReadAsync("myBYTE"); @@ -86,7 +86,7 @@ public async Task should_read_byte() [Fact] public async Task should_read_lint() { - var connector = new WebApiConnector(TargetIp, "Everybody", Environment.GetEnvironmentVariable("AX_TARGET_PWD"), true); + var connector = TestConnector.TestApiConnector; var myLINT = new WebApiLInt(connector, "", "myLINT"); await connector.WriteAsync(myLINT, 9223372036854775807); @@ -98,7 +98,7 @@ public async Task should_read_lint() [Fact] public async Task should_batch_read_primitives() { - var connector = new WebApiConnector(TargetIp, "Everybody", Environment.GetEnvironmentVariable("AX_TARGET_PWD"), true); + var connector = TestConnector.TestApiConnector; var myBOOL = new WebApiBool(connector, "", "myBOOL"); @@ -181,7 +181,7 @@ public async Task should_batch_read_primitives() [Fact] public async Task should_batch_write_primitives() { - var connector = new WebApiConnector(TargetIp, "Everybody", Environment.GetEnvironmentVariable("AX_TARGET_PWD"), true); + var connector = TestConnector.TestApiConnector; @@ -900,7 +900,7 @@ public async Task should_batch_read_a_lot_of_primitives() #if RELEASE return; #endif - var connector = new WebApiConnector(TargetIp, "Everybody", Environment.GetEnvironmentVariable("AX_TARGET_PWD"), true); + var connector = TestConnector.TestApiConnector; @@ -1772,7 +1772,7 @@ public async Task should_batch_read_a_lot_of_primitives() [Fact] public async Task should_report_failure_when_unable_to_read_single_item() { - var connector = new WebApiConnector(TargetIp, "Everybody", Environment.GetEnvironmentVariable("AX_TARGET_PWD"), true); + var connector = TestConnector.TestApiConnector; connector.ExceptionBehaviour = CommExceptionBehaviour.Ignore; var myBYTE = new WebApiByte(connector, "", "myBYTE_does_not_exist"); var response = await connector.ReadAsync(myBYTE); @@ -1785,7 +1785,7 @@ public async Task should_report_failure_when_unable_to_read_single_item() [Fact] public async Task should_report_failure_when_unable_to_write_single_item() { - var connector = new WebApiConnector(TargetIp, "Everybody", Environment.GetEnvironmentVariable("AX_TARGET_PWD"), true); + var connector = TestConnector.TestApiConnector; connector.ExceptionBehaviour = CommExceptionBehaviour.Ignore; var myBYTE = new WebApiByte(connector, "", "myBYTE_does_not_exist"); var response = await connector.WriteAsync(myBYTE,55); @@ -1800,7 +1800,7 @@ public async Task should_report_failure_when_unable_to_write_single_item() [Fact] public async Task should_report_failure_when_unable_to_bulk_read_items() { - var connector = new WebApiConnector(TargetIp, "Everybody", Environment.GetEnvironmentVariable("AX_TARGET_PWD"), true); + var connector = TestConnector.TestApiConnector; connector.ExceptionBehaviour = CommExceptionBehaviour.Ignore; var myBYTE = new WebApiByte(connector, "", "myBYTE_o"); var myWORD = new WebApiWord(connector, "", "myWORD"); @@ -1823,7 +1823,7 @@ public async Task should_report_failure_when_unable_to_bulk_read_items() [Fact] public async Task should_report_failure_when_unable_to_bulk_write_items() { - var connector = new WebApiConnector(TargetIp, "Everybody", Environment.GetEnvironmentVariable("AX_TARGET_PWD"), true); + var connector = TestConnector.TestApiConnector; connector.ExceptionBehaviour = CommExceptionBehaviour.Ignore; var myBYTE = new WebApiByte(connector, "", "myBYTE_o"); var myWORD = new WebApiWord(connector, "", "myWORD"); @@ -1847,7 +1847,7 @@ public async Task should_report_failure_when_unable_to_bulk_write_items() [Fact] public void should_rethrow_exception_bulk() { - var connector = new WebApiConnector(TargetIp, "Everybody", Environment.GetEnvironmentVariable("AX_TARGET_PWD"), true); + var connector = TestConnector.TestApiConnector; connector.ExceptionBehaviour = CommExceptionBehaviour.ReThrow; var myBYTE = new WebApiByte(connector, "", "myBYTE_o"); var myWORD = new WebApiWord(connector, "", "myWORD"); @@ -1868,7 +1868,7 @@ public void should_rethrow_exception_bulk() [Fact] public void should_rethrow_exception_single() { - var connector = new WebApiConnector(TargetIp, "Everybody", Environment.GetEnvironmentVariable("AX_TARGET_PWD"), true); + var connector = TestConnector.TestApiConnector; connector.ExceptionBehaviour = CommExceptionBehaviour.ReThrow; var myBYTE = new WebApiByte(connector, "", "myBYTE_o"); diff --git a/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/WebApiConnector/WebApiPrimitiveTests.cs b/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/WebApiConnector/WebApiPrimitiveTests.cs index cfcbf2a0e..6d173c572 100644 --- a/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/WebApiConnector/WebApiPrimitiveTests.cs +++ b/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/WebApiConnector/WebApiPrimitiveTests.cs @@ -9,7 +9,10 @@ using AXSharp.Connector.ValueTypes; using System; using System.IO; +using System.Net.Http; +using System.Net.Security; using System.Reflection; +using System.Security.Cryptography.X509Certificates; using System.Threading.Tasks; using Xunit; @@ -17,14 +20,6 @@ namespace AXSharp.Connector.S71500.WebAPITests.Primitives { - - public static class TestConnector - { - private static string TargetIp { get; } = Environment.GetEnvironmentVariable("AX_WEBAPI_TARGET") ?? "10.10.101.1"; - - public static WebApiConnector TestApiConnector { get; } = new WebApiConnector(TargetIp, "Everybody", Environment.GetEnvironmentVariable("AX_TARGET_PWD"), true).BuildAndStart() as WebApiConnector; - } - public abstract class WebApiPrimitiveTests where T : OnlinerBase, new() { diff --git a/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/issues/GH_PTKu_ix_56.cs b/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/issues/GH_PTKu_ix_56.cs index be6014f1e..5b89965fa 100644 --- a/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/issues/GH_PTKu_ix_56.cs +++ b/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/issues/GH_PTKu_ix_56.cs @@ -13,6 +13,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using AXSharp.Connector.S71500.WebAPITests; using AXSharp.Connector.S71500.WebAPITests.Primitives; namespace AXSharp.Connector.S71500.WebApi.Tests.Issues @@ -79,10 +80,12 @@ public async Task reproduction_no_base() [Fact()] public async Task run_on_twin_connector() { - var twin = new ax_test_projectTwinController(ConnectorAdapterBuilder.Build() - .CreateWebApi(Environment.GetEnvironmentVariable("AX_WEBAPI_TARGET"), "Everybody", Environment.GetEnvironmentVariable("AX_TARGET_PWD"), true)); + // var twin = new ax_test_projectTwinController(ConnectorAdapterBuilder.Build() + // .CreateWebApi(Environment.GetEnvironmentVariable("AX_WEBAPI_TARGET"), "Everybody", Environment.GetEnvironmentVariable("AX_TARGET_PWD"), true)); - var primitives = twin.GH_PKTu_ix_56_SecondInheritance.RetrievePrimitives().Select(p => p.Symbol).ToList(); + + + var twin = TestConnector.SecurePlc; await twin.GH_PKTu_ix_56_SecondInheritance.ReadAsync(); } diff --git a/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/issues/GH_PTKu_ix_59_68.cs b/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/issues/GH_PTKu_ix_59_68.cs index fdaa1d923..916791bda 100644 --- a/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/issues/GH_PTKu_ix_59_68.cs +++ b/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/issues/GH_PTKu_ix_59_68.cs @@ -17,6 +17,7 @@ using Xunit.Abstractions; using System.IO; using System.Reflection; +using AXSharp.Connector.S71500.WebAPITests; namespace AXSharp.Connector.S71500.WebApi.Tests.Issues { diff --git a/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/issues/GH_PTKu_ix_xx.cs b/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/issues/GH_PTKu_ix_xx.cs index 1cac42030..ab54f5737 100644 --- a/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/issues/GH_PTKu_ix_xx.cs +++ b/src/AXSharp.connectors/tests/AXSharp.Connector.Sax.WebAPITests/issues/GH_PTKu_ix_xx.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; +using AXSharp.Connector.S71500.WebAPITests; using Xunit; using Xunit.Abstractions; @@ -22,8 +23,7 @@ public class GH_PTKu_ix_xx : IDisposable public GH_PTKu_ix_xx(ITestOutputHelper output) { - Plc = new ax_test_projectTwinController(ConnectorAdapterBuilder.Build() - .CreateWebApi(Environment.GetEnvironmentVariable("AX_WEBAPI_TARGET"), "Everybody", Environment.GetEnvironmentVariable("AX_TARGET_PWD"), true)); + Plc = TestConnector.SecurePlc; Plc.Connector.ReadWriteCycleDelay = 250; Plc.Connector.ExceptionBehaviour = CommExceptionBehaviour.ReThrow; Plc.Connector.SubscriptionMode = ReadSubscriptionMode.Polling; diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/Adapter/OnlineAdapterTests.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/Adapter/OnlineAdapterTests.cs index 508a9fa1a..d3ec465e3 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/Adapter/OnlineAdapterTests.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/Adapter/OnlineAdapterTests.cs @@ -37,7 +37,7 @@ public void Init() [Test] public void GetConnectorTest() { - Assert.IsInstanceOf(typeof(DummyConnector), adapter.GetConnector(new object[] { })); + Assert.That(adapter.GetConnector(new object[] { }), Is.InstanceOf()); } [Test] @@ -48,7 +48,7 @@ public void OnlineAdapterTest() var expected = typeof(OnlineAdapterTestable); //-- Assert - Assert.IsInstanceOf(expected, actual); + Assert.That(actual, Is.InstanceOf(expected)); } [Test] @@ -57,10 +57,10 @@ public void DummyOnlineAdapterBuilderTest() //-- Arrange var actual = ConnectorAdapterBuilder.Build().CreateDummy(); var expected = typeof(ConnectorAdapter); - + //-- Assert - Assert.IsInstanceOf(expected, actual); - Assert.IsInstanceOf(actual.AdapterFactory); + Assert.That(actual, Is.InstanceOf(expected)); + Assert.That(actual.AdapterFactory, Is.InstanceOf()); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/IVortexObjectExtensionsTests.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/IVortexObjectExtensionsTests.cs index 5508630f8..9bd9d0dda 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/IVortexObjectExtensionsTests.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/IVortexObjectExtensionsTests.cs @@ -42,22 +42,22 @@ public void SubscribeEditValueChangeTest() var valueTags = a.RetrievePrimitives(); //-- Assert - Assert.AreEqual(42, valueTags.Count()); + Assert.That(valueTags.Count(), Is.EqualTo(42)); + - //-- Subscribe a.SubscribeEditValueChange(DetectEditValueChange); foreach (var tag in valueTags) { - Assert.IsInstanceOf(typeof(OnlinerBase.ValueChangeDelegate), tag.EditValueChange, tag.Symbol); + Assert.That(tag.EditValueChange, Is.InstanceOf(), tag.Symbol); } //-- Make change a.Bool.Edit = true; a.String.Edit = "hdfahks dhfkahs"; - Assert.AreEqual("+Edit False : True+Edit : hdfahks dhfkahs", EditValueChanges); + Assert.That(EditValueChanges, Is.EqualTo("+Edit False : True+Edit : hdfahks dhfkahs")); } [Test()] @@ -70,7 +70,7 @@ public void SubscribeShadowValueChangeTest() var valueTags = a.RetrievePrimitives(); //-- Assert - Assert.AreEqual(42, valueTags.Count()); + Assert.That(valueTags.Count(), Is.EqualTo(42)); //-- Subscribe @@ -78,14 +78,14 @@ public void SubscribeShadowValueChangeTest() foreach (var tag in valueTags) { - Assert.IsInstanceOf(typeof(OnlinerBase.ValueChangeDelegate), tag.ShadowValueChange, tag.Symbol); + Assert.That(tag.ShadowValueChange, Is.InstanceOf(), tag.Symbol); } //-- Make change a.Bool.Shadow = true; a.String.Shadow = "hdfahks dhfkahs"; - Assert.AreEqual("+Shadow False : True+Shadow : hdfahks dhfkahs", ShadowValueChanges); + Assert.That(ShadowValueChanges, Is.EqualTo("+Shadow False : True+Shadow : hdfahks dhfkahs")); } diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/Identity/TwinIdentityProviderTests.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/Identity/TwinIdentityProviderTests.cs index 41adbc744..2f945b4b9 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/Identity/TwinIdentityProviderTests.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/Identity/TwinIdentityProviderTests.cs @@ -38,8 +38,8 @@ public async Task AddIdentityTest() //-- Assert var actual = identityProvider.GetTwinByIdentity(1000); - Assert.AreEqual("s1000", actual.Symbol); - Assert.AreEqual("n1000", actual.AttributeName); + Assert.That(actual.Symbol, Is.EqualTo("s1000")); + Assert.That(actual.AttributeName, Is.EqualTo("n1000")); } @@ -58,12 +58,12 @@ public async Task GetTwinByIdentityTest() //-- Assert var actual = identityProvider.GetTwinByIdentity(1000); - Assert.AreEqual("s1000", actual.Symbol); - Assert.AreEqual("n1000", actual.AttributeName); + Assert.That(actual.Symbol, Is.EqualTo("s1000")); + Assert.That(actual.AttributeName, Is.EqualTo("n1000")); actual = identityProvider.GetTwinByIdentity(2000); - Assert.AreEqual("s2000", actual.Symbol); - Assert.AreEqual("n2000", actual.AttributeName); + Assert.That(actual.Symbol, Is.EqualTo("s2000")); + Assert.That(actual.AttributeName, Is.EqualTo("n2000")); } [Test()] @@ -84,17 +84,17 @@ public async Task AddIdentityExistingTest() await identityProvider.SortIdentitiesAsync(); //-- Assert - Assert.AreEqual(2, identityProvider.IdentitiesCount); + Assert.That(identityProvider.IdentitiesCount, Is.EqualTo(2)); var actual = identityProvider.GetTwinByIdentity(1000); - Assert.AreEqual("s1000", actual.Symbol); - Assert.AreEqual("n1000", actual.AttributeName); + Assert.That(actual.Symbol, Is.EqualTo("s1000")); + Assert.That(actual.AttributeName, Is.EqualTo("n1000")); actual = identityProvider.GetTwinByIdentity(255854); - Assert.AreEqual(2, identityProvider.IdentitiesCount); - Assert.AreEqual("x1000", actual.Symbol); - Assert.AreEqual("x1000", actual.AttributeName); + Assert.That(identityProvider.IdentitiesCount, Is.EqualTo(2)); + Assert.That(actual.Symbol, Is.EqualTo("x1000")); + Assert.That(actual.AttributeName, Is.EqualTo("x1000")); } } diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/StringInterpolator/StringInterpolatorTests.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/StringInterpolator/StringInterpolatorTests.cs index f3b1091aa..6d0593eeb 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/StringInterpolator/StringInterpolatorTests.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/StringInterpolator/StringInterpolatorTests.cs @@ -31,7 +31,7 @@ public void InterpolateTest() var actual = AXSharp.Connector.StringInterpolator.Interpolate("This is a |[AttributeInterpolated]| string of |[AttributeObjectType]|", interpolatedObject); //-- Assert - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test()] @@ -49,7 +49,7 @@ public void InterpolateNestedMembersTest() Console.WriteLine(actual); //-- Assert - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test()] @@ -67,7 +67,7 @@ public void InterpolateAncestorTest() Console.WriteLine(actual); //-- Assert - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test()] @@ -95,7 +95,7 @@ public void OutOfRangeParentTest() Console.WriteLine(actual); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } } diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerBaseTypeTests.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerBaseTypeTests.cs index 5031c65b0..6e73b1569 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerBaseTypeTests.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerBaseTypeTests.cs @@ -62,13 +62,13 @@ public virtual void SetUpTest() public void GetSymbolTailTest() { - Assert.AreEqual("symbolTail", Onliner.GetSymbolTail()); + Assert.That(Onliner.GetSymbolTail(), Is.EqualTo("symbolTail")); } [Test()] public void GetParentTest() { - Assert.IsInstanceOf(typeof(ITwinObject), Onliner.GetParent()); + Assert.That(Onliner.GetParent(), Is.InstanceOf(typeof(ITwinObject))); } @@ -83,7 +83,7 @@ public void SubscribeWithHandlerTest() Onliner.Subscribe(action); //-- Assert - Assert.AreEqual(1, Onliner.GetValueChangeEventSubscribers().Count()); + Assert.That(Onliner.GetValueChangeEventSubscribers().Count(), Is.EqualTo(1)); } [Test()] @@ -93,7 +93,7 @@ public void SubscribeTest() Onliner.Subscribe(); //-- Assert - Assert.True(Onliner.IsSubscribed); + Assert.That(Onliner.IsSubscribed, Is.True); } [Test()] @@ -109,7 +109,7 @@ public void SubscribeMultipleTest() Onliner.Subscribe(action_b); //-- Assert - Assert.AreEqual(2, Onliner.GetValueChangeEventSubscribers().Count()); + Assert.That(Onliner.GetValueChangeEventSubscribers().Count(), Is.EqualTo(2)); } @@ -127,14 +127,14 @@ public void UnSubscribeTest() Onliner.Subscribe(action_b); //-- Assert - Assert.AreEqual(2, Onliner.GetValueChangeEventSubscribers().Count()); + Assert.That(Onliner.GetValueChangeEventSubscribers().Count(), Is.EqualTo(2)); //-- Act UnSubscribe Onliner.UnSubscribe(action_a); Onliner.UnSubscribe(action_b); //-- Assert - Assert.AreEqual(0, Onliner.GetValueChangeEventSubscribers().Count()); + Assert.That(Onliner.GetValueChangeEventSubscribers().Count(), Is.EqualTo(0)); } [Test] @@ -142,7 +142,7 @@ public virtual void CanSetAsyncTest() { Onliner.SetAsync((dynamic)(1)).Wait(); - Assert.AreEqual("1", Onliner.GetAsync().Result.ToString()); + Assert.That(Onliner.GetAsync().Result.ToString(), Is.EqualTo("1")); } [Test()] @@ -150,21 +150,21 @@ public void HasWriteAccessTestFalse() { //-- Assert - Assert.IsTrue(Onliner.HasWriteAccess()); + Assert.That(Onliner.HasWriteAccess(), Is.True); //-- Arrange Onliner.MakeReadOnly(); // = AccessAttribute.ReadWriteAccess.Read; //-- Assert - Assert.IsFalse(Onliner.HasWriteAccess()); + Assert.That(Onliner.HasWriteAccess(), Is.False); Onliner.GetParent().GetConnector().SuspendWriteProtection("Hoj morho vetvo mojho rodu, kto kramou rukou siahne na tvoju slobodu a co i dusu das v tom boji divokom vol nebyt ako byt otrokom!"); - Assert.IsTrue(Onliner.HasWriteAccess()); + Assert.That(Onliner.HasWriteAccess(), Is.True); Onliner.GetParent().GetConnector().ResumeWriteProtection(); - Assert.IsFalse(Onliner.HasWriteAccess()); + Assert.That(Onliner.HasWriteAccess(), Is.False); } } diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerBoolTest.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerBoolTest.cs index 7f2003239..7358a8caa 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerBoolTest.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerBoolTest.cs @@ -31,8 +31,8 @@ public void ChangeEditedValueTest() Onliner.Edit = true; //-- Assert - Assert.AreEqual(true, Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};False;True", logs); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(true)); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};False;True")); } @@ -43,20 +43,20 @@ public void ChangeShadow() Onliner.Shadow = true; //-- Assert - Assert.AreEqual(true, Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};False;True", logs); + Assert.That(Onliner.Shadow, Is.EqualTo(true)); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};False;True")); } [Test] public override void CanSetAsyncTest() { Onliner.SetAsync(false).Wait(); - Assert.AreEqual(false, Onliner.GetAsync().Result); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(false)); var expected = true; Onliner.SetAsync(expected).Wait(); - Assert.AreEqual(expected, Onliner.GetAsync().Result); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerByteTest.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerByteTest.cs index 3c6d8c19e..e22a8b085 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerByteTest.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerByteTest.cs @@ -33,8 +33,8 @@ public void ChangeEditedValueTest() Onliner.Edit = 150; //-- Assert - Assert.AreEqual(150, Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;150", logs); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(150)); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;150")); } [Test] @@ -46,9 +46,9 @@ public void ChangeValueOverOnlinerInterfaceTest() iShadow.Value = 55; iOnliner.Value = 25; - Assert.AreEqual(25, this.Onliner.Cyclic); - Assert.AreEqual(25, this.Onliner.GetAsync().Result); - Assert.AreEqual(55, this.Onliner.Shadow); + Assert.That(this.Onliner.Cyclic, Is.EqualTo(25) ); + Assert.That(this.Onliner.GetAsync().Result, Is.EqualTo(25)); + Assert.That(this.Onliner.Shadow, Is.EqualTo(55)); } [Test] @@ -60,9 +60,9 @@ public void ChangeValueOverShadowInterfaceTest() iOnliner.Value = 111; iShadow.Value = 158; - Assert.AreEqual(111, this.Onliner.Cyclic); - Assert.AreEqual(111, this.Onliner.GetAsync().Result); - Assert.AreEqual(158, this.Onliner.Shadow); + Assert.That(this.Onliner.Cyclic, Is.EqualTo(111)); + Assert.That(this.Onliner.GetAsync().Result, Is.EqualTo(111)); + Assert.That(this.Onliner.Shadow, Is.EqualTo(158)); } [Test()] @@ -72,8 +72,8 @@ public void ChangeShadow() Onliner.Shadow = 140; //-- Assert - Assert.AreEqual(140, Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;140", logs); + Assert.That(Onliner.Shadow, Is.EqualTo(140)); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;140")); } [Test()] @@ -84,9 +84,9 @@ public void ValidateInBuildRangeTest() var max = OnlinerByte.MaxValue; var mid = (byte)(OnlinerByte.MaxValue / 2); //-- Act - Assert.IsTrue(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsTrue(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsTrue(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); //Assert.IsFalse(Onliner.Validator.Validate((byte)(max), System.Globalization.CultureInfo.InvariantCulture).IsValid); //Assert.IsFalse(Onliner.Validator.Validate((byte)(min), System.Globalization.CultureInfo.InvariantCulture).IsValid); } @@ -102,11 +102,11 @@ public void ValidateInCustomRangeTest() var max = (byte)Onliner.AttributeMaximum; var mid = (byte)(max / 2); //-- Act - Assert.IsTrue(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsTrue(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsTrue(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate((byte)(max + 1), System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate((byte)(min - 1), System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate((byte)(max + 1), System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate((byte)(min - 1), System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } [Test()] @@ -121,8 +121,8 @@ public void ValidateOverShootRangeTest() //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } [Test] @@ -130,7 +130,7 @@ public override void CanSetAsyncTest() { Onliner.SetAsync((byte)(100)).Wait(); - Assert.AreEqual(100, Onliner.GetAsync().Result); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(100)); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerCharTest.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerCharTest.cs index 1c14f1050..d0d20541f 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerCharTest.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerCharTest.cs @@ -33,8 +33,8 @@ public void ChangeEditedValueTest() Onliner.Edit = 'w'; //-- Assert - Assert.AreEqual('w', Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};\0;w", logs); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo('w')); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};\0;w")); } [Test] @@ -46,11 +46,11 @@ public void ChangeValueOverOnlinerInterfaceTest() iShadow.Value = 's'; iOnliner.Value = 'x'; - Assert.AreEqual('x', this.Onliner.Cyclic); - Assert.AreEqual('x', this.Onliner.GetAsync().Result); - Assert.AreEqual('s', this.Onliner.Shadow); + Assert.That(this.Onliner.Cyclic, Is.EqualTo('x')); + Assert.That(this.Onliner.GetAsync().Result, Is.EqualTo('x')); + Assert.That(this.Onliner.Shadow, Is.EqualTo('s')); } - + [Test] public void ChangeValueOverShadowInterfaceTest() { @@ -60,9 +60,9 @@ public void ChangeValueOverShadowInterfaceTest() iOnliner.Value = 'f'; iShadow.Value = 'u'; - Assert.AreEqual('f', this.Onliner.Cyclic); - Assert.AreEqual('f', this.Onliner.GetAsync().Result); - Assert.AreEqual('u', this.Onliner.Shadow); + Assert.That(this.Onliner.Cyclic, Is.EqualTo('f')); + Assert.That(this.Onliner.GetAsync().Result, Is.EqualTo('f')); + Assert.That(this.Onliner.Shadow, Is.EqualTo('u')); } [Test()] @@ -72,8 +72,8 @@ public void ChangeShadow() Onliner.Shadow = 'g'; //-- Assert - Assert.AreEqual('g', Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};\0;g", logs); + Assert.That(Onliner.Shadow, Is.EqualTo('g')); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};\0;g")); } [Test()] @@ -84,9 +84,9 @@ public void ValidateInBuildRangeTest() var max = OnlinerChar.MaxValue; var mid = (char)(OnlinerChar.MaxValue / 2); //-- Act - Assert.IsTrue(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsTrue(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsTrue(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); //Assert.IsFalse(Onliner.Validator.Validate((byte)(max), System.Globalization.CultureInfo.InvariantCulture).IsValid); //Assert.IsFalse(Onliner.Validator.Validate((byte)(min), System.Globalization.CultureInfo.InvariantCulture).IsValid); } @@ -102,11 +102,11 @@ public void ValidateInCustomRangeTest() var max = (char)Onliner.AttributeMaximum; var mid = 'u'; //-- Act - Assert.IsTrue(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsTrue(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsTrue(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate((char)(max + 1), System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate((char)(min - 1), System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate((char)(max + 1), System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate((char)(min - 1), System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } [Test()] @@ -121,8 +121,8 @@ public void ValidateOverShootRangeTest() //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } [Test] @@ -130,7 +130,7 @@ public override void CanSetAsyncTest() { Onliner.SetAsync((char)(100)).Wait(); - Assert.AreEqual(((char)(100)), Onliner.GetAsync().Result); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo((char)(100))); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerDIntTest.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerDIntTest.cs index 20421ca31..c4faaaecc 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerDIntTest.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerDIntTest.cs @@ -17,44 +17,40 @@ public class OnlinerDIntTest : OnlinerBaseTests { protected override OnlinerBase Onliner { get; set; } - public override void Init() { Onliner = new OnlinerDInt(new TestTwinObject(), $"readableTail", "symbolTail"); } - [Test()] + [Test] public void ChangeEditedValueTest() { //-- Arrange - var expected = int.MaxValue; //-- Act Onliner.Edit = expected; //-- Assert - Assert.AreEqual(expected, Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); - + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } - [Test()] + [Test] public void ChangeShadow() { //-- Arrange - var expected = int.MaxValue; //-- Act Onliner.Shadow = expected; //-- Assert - Assert.AreEqual(expected, Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); + Assert.That(Onliner.Shadow, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } - [Test()] + [Test] public void ValidateOverShootRangeTest() { Onliner.AttributeMinimum = OnlinerDInt.MinValue + 1; @@ -64,10 +60,9 @@ public void ValidateOverShootRangeTest() var min = OnlinerDInt.MinValue; var max = OnlinerDInt.MaxValue; - //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerDWordTest.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerDWordTest.cs index 75e266d58..ff909cd6e 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerDWordTest.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerDWordTest.cs @@ -17,44 +17,40 @@ public class OnlinerDWordTest : OnlinerBaseTests { protected override OnlinerBase Onliner { get; set; } - public override void Init() { Onliner = new OnlinerDWord(new TestTwinObject(), $"readableTail", "symbolTail"); } - [Test()] + [Test] public void ChangeEditedValueTest() { //-- Arrange - var expected = uint.MaxValue; //-- Act Onliner.Edit = expected; //-- Assert - Assert.AreEqual(expected, Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); - + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } - [Test()] + [Test] public void ChangeShadow() { //-- Arrange - var expected = uint.MaxValue; //-- Act Onliner.Shadow = expected; //-- Assert - Assert.AreEqual(expected, Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); + Assert.That(Onliner.Shadow, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } - [Test()] + [Test] public void ValidateTightRangeTest() { //-- Arrange @@ -63,25 +59,23 @@ public void ValidateTightRangeTest() var mid = OnlinerDWord.MaxValue / 2; //-- Act - Assert.True(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); } - [Test()] + [Test] public void ValidateOverShootRangePresetTest() { - Onliner.AttributeMinimum = OnlinerDWord.MinValue + 1; Onliner.AttributeMaximum = OnlinerDWord.MaxValue - 1; //-- Arrange var min = OnlinerDWord.MinValue; var max = OnlinerDWord.MaxValue; - //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } [Test] @@ -90,7 +84,7 @@ public override void CanSetAsyncTest() var expected = OnlinerDWord.MaxValue / 2; Onliner.SetAsync(expected).Wait(); - Assert.AreEqual(expected, Onliner.GetAsync().Result); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerDateTest.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerDateTest.cs index 52d6e2d09..5e86f4109 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerDateTest.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerDateTest.cs @@ -17,11 +17,9 @@ public class OnlinerDateTest : OnlinerBaseTests { protected override OnlinerBase Onliner { get; set; } - public override void Init() { Onliner = new OnlinerDate(new TestTwinObject(), $"readableTail", "symbolTail"); - } [Test()] @@ -35,16 +33,14 @@ public void ChangeEditedValueTest() Onliner.Edit = expected; //-- Assert - Assert.AreEqual(expected, Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};{original};{expected}", logs); - + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};{original};{expected}")); } [Test()] public void ChangeShadow() { //-- Arrange - var expected = DateOnly.FromDateTime(DateTime.Now); var original = new DateOnly().ToShortDateString(); @@ -52,8 +48,8 @@ public void ChangeShadow() Onliner.Shadow = expected; //-- Assert - Assert.AreEqual(expected, Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};{original};{expected}", logs); + Assert.That(Onliner.Shadow, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};{original};{expected}")); } [Test()] @@ -64,38 +60,35 @@ public void ValidateRangeTest() var max = OnlinerDate.MaxValue; var mid = DateOnly.FromDateTime(DateTime.Now.Date); //-- Act - Assert.IsTrue(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsTrue(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsTrue(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); } [Test()] public void ValidateOverShootRangeTest() { //-- Arrange - var min = new DateOnly(1969, 12, 31); + var min = new DateOnly(1969, 12, 31); var max = OnlinerDate.MaxValue.AddDays(1); - //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } [Test()] public void ValidateOverShootRangePresetTest() { - Onliner.AttributeMinimum = new DateOnly(1970, 1, 2); Onliner.AttributeMaximum = new DateOnly(2262, 4, 10); //-- Arrange var min = OnlinerDate.MinValue; var max = OnlinerDate.MaxValue; - //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } [Test] @@ -104,7 +97,7 @@ public override void CanSetAsyncTest() var expected = DateOnly.FromDateTime(DateTime.Now.Date); ; Onliner.SetAsync(expected).Wait(); - Assert.AreEqual(expected, Onliner.GetAsync().Result); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerDateTime.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerDateTime.cs index 5b7d1946c..106a4f4fc 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerDateTime.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerDateTime.cs @@ -17,18 +17,15 @@ public class OnlinerDateTimeTest : OnlinerBaseTests { protected override OnlinerBase Onliner { get; set; } - public override void Init() { Onliner = new OnlinerDateTime(new TestTwinObject(), $"readableTail", "symbolTail"); - } - [Test()] + [Test] public void ChangeEditedValueTest() { //-- Arrange - var expected = DateTime.Now; var original = new DateTime().ToString(); @@ -36,16 +33,14 @@ public void ChangeEditedValueTest() Onliner.Edit = expected; //-- Assert - Assert.AreEqual(expected, Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};{original};{expected}", logs); - + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};{original};{expected}")); } - [Test()] + [Test] public void ChangeShadow() { //-- Arrange - var expected = DateTime.Now; var original = new DateTime().ToString(); @@ -53,50 +48,49 @@ public void ChangeShadow() Onliner.Shadow = expected; //-- Assert - Assert.AreEqual(expected, Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};{original};{expected}", logs); + Assert.That(Onliner.Shadow, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};{original};{expected}")); } - [Test()] + [Test] public void ValidateRangeTest() { //-- Arrange var min = OnlinerDateTime.MinValue; var max = OnlinerDateTime.MaxValue; var mid = DateTime.Now.Date; + //-- Act - Assert.IsTrue(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsTrue(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsTrue(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); } - [Test()] + [Test] public void ValidateOverShootRangeTest() { //-- Arrange var min = new DateTime(1969, 12, 31, 23, 59, 59, 100); var max = OnlinerDateTime.MaxValue.AddDays(1); - //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } - [Test()] + [Test] public void ValidateOverShootRangePresetTest() { - Onliner.AttributeMinimum = new DateTime(1970, 1, 2); Onliner.AttributeMaximum = new DateTime(2262, 4, 10); + //-- Arrange var min = OnlinerDateTime.MinValue; var max = OnlinerDateTime.MaxValue; - //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } [Test] @@ -105,7 +99,7 @@ public override void CanSetAsyncTest() var expected = DateTime.Now; Onliner.SetAsync(expected).Wait(); - Assert.AreEqual(expected, Onliner.GetAsync().Result); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerIntTest.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerIntTest.cs index 7308d57ee..cb7297b24 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerIntTest.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerIntTest.cs @@ -17,44 +17,40 @@ public class OnlinerIntTest : OnlinerBaseTests { protected override OnlinerBase Onliner { get; set; } - public override void Init() { Onliner = new OnlinerInt(new TestTwinObject(), $"readableTail", "symbolTail"); } - [Test()] + [Test] public void ChangeEditedValueTest() { //-- Arrange - var expected = short.MaxValue; //-- Act Onliner.Edit = expected; //-- Assert - Assert.AreEqual(expected, Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); - + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } - [Test()] + [Test] public void ChangeShadow() { //-- Arrange - var expected = short.MaxValue; //-- Act Onliner.Shadow = expected; //-- Assert - Assert.AreEqual(expected, Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); + Assert.That(Onliner.Shadow, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } - [Test()] + [Test] public void ValidateTightRangeTest() { //-- Arrange @@ -63,25 +59,23 @@ public void ValidateTightRangeTest() var mid = (short)(OnlinerInt.MaxValue / 2); //-- Act - Assert.True(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); } - [Test()] + [Test] public void ValidateOverShootRangePresetTest() { - Onliner.AttributeMinimum = (short)(OnlinerInt.MinValue + 1); Onliner.AttributeMaximum = (short)(OnlinerInt.MaxValue - 1); //-- Arrange var min = OnlinerInt.MinValue; var max = OnlinerInt.MaxValue; - //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } [Test] @@ -90,7 +84,7 @@ public override void CanSetAsyncTest() var expected = (short)(OnlinerInt.MaxValue / 3); Onliner.SetAsync(expected).Wait(); - Assert.AreEqual(expected, Onliner.GetAsync().Result); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerLDateTime.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerLDateTime.cs index c9bf2ebee..68fa4c117 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerLDateTime.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerLDateTime.cs @@ -36,8 +36,8 @@ public void ChangeEditedValueTest() Onliner.Edit = expected; //-- Assert - Assert.AreEqual(expected, Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};{original};{expected}", logs); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};{original};{expected}")); } @@ -53,8 +53,8 @@ public void ChangeShadow() Onliner.Shadow = expected; //-- Assert - Assert.AreEqual(expected, Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};{original};{expected}", logs); + Assert.That(Onliner.Shadow, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};{original};{expected}")); } [Test()] @@ -65,9 +65,9 @@ public void ValidateRangeTest() var max = OnlinerLDateTime.MaxValue; var mid = DateTime.Now.Date; //-- Act - Assert.IsTrue(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsTrue(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsTrue(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); } [Test()] @@ -77,10 +77,10 @@ public void ValidateOverShootRangeTest() var min = new DateTime(1969, 12, 31, 23, 59, 59, 100); var max = OnlinerLDateTime.MaxValue.AddDays(1); - + //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } [Test()] @@ -95,8 +95,8 @@ public void ValidateOverShootRangePresetTest() //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } [Test] @@ -105,7 +105,7 @@ public override void CanSetAsyncTest() var expected = DateTime.Now; Onliner.SetAsync(expected).Wait(); - Assert.AreEqual(expected, Onliner.GetAsync().Result); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerLIntTest.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerLIntTest.cs index a38cd1e90..a69d86982 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerLIntTest.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerLIntTest.cs @@ -13,11 +13,11 @@ namespace AXSharp.Connector.Onliners.Tests using AXSharp.Connector.Tests; using AXSharp.Connector.ValueTypes; + public class OnlinerLIntTest : OnlinerBaseTests { protected override OnlinerBase Onliner { get; set; } - public override void Init() { Onliner = new OnlinerLInt(new TestTwinObject(), $"readableTail", "symbolTail"); @@ -27,31 +27,28 @@ public override void Init() public void ChangeEditedValueTest() { //-- Arrange - var expected = long.MaxValue; //-- Act Onliner.Edit = expected; //-- Assert - Assert.AreEqual(expected, Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); - + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } [Test()] public void ChangeShadow() { //-- Arrange - var expected = long.MaxValue; //-- Act Onliner.Shadow = expected; //-- Assert - Assert.AreEqual(expected, Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); + Assert.That(Onliner.Shadow, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } [Test()] @@ -63,25 +60,23 @@ public void ValidateTightRangeTest() var mid = (long)(OnlinerLInt.MaxValue / 2); //-- Act - Assert.True(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); } [Test()] public void ValidateOverShootRangePresetTest() { - Onliner.AttributeMinimum = (long)(OnlinerLInt.MinValue + 1); Onliner.AttributeMaximum = (long)(OnlinerLInt.MaxValue - 1); //-- Arrange var min = OnlinerLInt.MinValue; var max = OnlinerLInt.MaxValue; - //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerLRealTest.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerLRealTest.cs index c03bfc3c3..ab7be5944 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerLRealTest.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerLRealTest.cs @@ -17,7 +17,6 @@ public class OnlinerLRealTest : OnlinerBaseTests { protected override OnlinerBase Onliner { get; set; } - public override void Init() { Onliner = new OnlinerLReal(new TestTwinObject(), $"readableTail", "symbolTail"); @@ -27,31 +26,28 @@ public override void Init() public void ChangeEditedValueTest() { //-- Arrange - var expected = double.MaxValue; //-- Act Onliner.Edit = expected; //-- Assert - Assert.AreEqual(expected, Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); - + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } [Test()] public void ChangeShadow() { //-- Arrange - var expected = double.MaxValue; //-- Act Onliner.Shadow = expected; //-- Assert - Assert.AreEqual(expected, Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); + Assert.That(Onliner.Shadow, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } [Test()] @@ -63,9 +59,9 @@ public void ValidateTightRangeTest() var mid = (long)(OnlinerLReal.MaxValue / 2); //-- Act - Assert.True(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); } [Test()] @@ -79,8 +75,8 @@ public void ValidateOverShootRangePresetTest() var max = OnlinerLReal.MaxValue; //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerLTimeOfDayTest.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerLTimeOfDayTest.cs index 6bd3f3c74..d02a4f80d 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerLTimeOfDayTest.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerLTimeOfDayTest.cs @@ -17,7 +17,6 @@ public class OnlinerLTimeOfDayTest : OnlinerBaseTests { protected override OnlinerBase Onliner { get; set; } - public override void Init() { Onliner = new OnlinerLTimeOfDay(new TestTwinObject(), $"readableTail", "symbolTail"); @@ -27,31 +26,28 @@ public override void Init() public void ChangeEditedValueTest() { //-- Arrange - var expected = OnlinerLTimeOfDay.MaxValue; //-- Act Onliner.Edit = expected; //-- Assert - Assert.AreEqual(expected, Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};00:00:00;{expected}", logs); - + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};00:00:00;{expected}")); } [Test()] public void ChangeShadow() { //-- Arrange - var expected = OnlinerLTimeOfDay.MaxValue; //-- Act Onliner.Shadow = expected; //-- Assert - Assert.AreEqual(expected, Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};00:00:00;{expected}", logs); + Assert.That(Onliner.Shadow, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};00:00:00;{expected}")); } [Test()] @@ -63,9 +59,9 @@ public void ValidateTightRangeTest() var mid = (OnlinerLTimeOfDay.MaxValue / 2); //-- Act - Assert.True(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); } [Test()] @@ -79,8 +75,8 @@ public void ValidateOverShootRangePresetTest() var max = OnlinerLTimeOfDay.MaxValue; //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } [Test] @@ -89,7 +85,7 @@ public override void CanSetAsyncTest() var expected = TimeSpan.FromHours(15); Onliner.SetAsync(expected).Wait(); - Assert.AreEqual(expected, Onliner.GetAsync().Result); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerLTimeTest.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerLTimeTest.cs index 01895f620..a8b76dab5 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerLTimeTest.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerLTimeTest.cs @@ -17,7 +17,6 @@ public class OnlinerLTimeTest : OnlinerBaseTests { protected override OnlinerBase Onliner { get; set; } - public override void Init() { Onliner = new OnlinerLTime(new TestTwinObject(), $"readableTail", "symbolTail"); @@ -27,31 +26,28 @@ public override void Init() public void ChangeEditedValueTest() { //-- Arrange - var expected = OnlinerLTime.MaxValue; //-- Act Onliner.Edit = expected; //-- Assert - Assert.AreEqual(expected, Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};00:00:00;{expected}", logs); - + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};00:00:00;{expected}")); } [Test()] public void ChangeShadow() { //-- Arrange - var expected = OnlinerLTime.MaxValue; //-- Act Onliner.Shadow = expected; //-- Assert - Assert.AreEqual(expected, Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};00:00:00;{expected}", logs); + Assert.That(Onliner.Shadow, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};00:00:00;{expected}")); } [Test()] @@ -63,9 +59,9 @@ public void ValidateTightRangeTest() var mid = (OnlinerLTime.MaxValue / 2); //-- Act - Assert.True(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); } [Test()] @@ -79,8 +75,8 @@ public void ValidateOverShootRangePresetTest() var max = OnlinerLTime.MaxValue; //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } [Test] @@ -89,7 +85,7 @@ public override void CanSetAsyncTest() var expected = (OnlinerLTime.MaxValue / 3); Onliner.SetAsync(expected).Wait(); - Assert.AreEqual(expected, Onliner.GetAsync().Result); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerLWordTest.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerLWordTest.cs index 4c2d6c369..124c1a600 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerLWordTest.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerLWordTest.cs @@ -17,7 +17,6 @@ public class OnlinerLWordTest : OnlinerBaseTests { protected override OnlinerBase Onliner { get; set; } - public override void Init() { Onliner = new OnlinerLWord(new TestTwinObject(), $"readableTail", "symbolTail"); @@ -27,31 +26,28 @@ public override void Init() public void ChangeEditedValueTest() { //-- Arrange - var expected = ulong.MaxValue; //-- Act Onliner.Edit = expected; //-- Assert - Assert.AreEqual(expected, Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); - + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } [Test()] public void ChangeShadow() { //-- Arrange - var expected = ulong.MaxValue; //-- Act Onliner.Shadow = expected; //-- Assert - Assert.AreEqual(expected, Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); + Assert.That(Onliner.Shadow, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } [Test()] @@ -63,25 +59,23 @@ public void ValidateTightRangeTest() var mid = (OnlinerLWord.MaxValue / 2); //-- Act - Assert.True(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); } [Test()] public void ValidateOverShootRangePresetTest() { - Onliner.AttributeMinimum = (OnlinerLWord.MinValue + 1); Onliner.AttributeMaximum = (OnlinerLWord.MaxValue - 1); //-- Arrange var min = OnlinerLWord.MinValue; var max = OnlinerLWord.MaxValue; - //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } [Test] @@ -90,7 +84,7 @@ public override void CanSetAsyncTest() var expected = (OnlinerLWord.MaxValue / 4); Onliner.SetAsync(expected).Wait(); - Assert.AreEqual(expected, Onliner.GetAsync().Result); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerRealTest.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerRealTest.cs index 414f6411a..a3c088a46 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerRealTest.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerRealTest.cs @@ -34,9 +34,8 @@ public void ChangeEditedValueTest() Onliner.Edit = expected; //-- Assert - Assert.AreEqual(expected, Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); - + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } [Test()] @@ -50,8 +49,8 @@ public void ChangeShadow() Onliner.Shadow = expected; //-- Assert - Assert.AreEqual(expected, Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); + Assert.That(Onliner.Shadow, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } [Test()] @@ -63,9 +62,9 @@ public void ValidateTightRangeTest() var mid = (OnlinerReal.MaxValue / 2); //-- Act - Assert.True(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); } [Test()] @@ -78,10 +77,9 @@ public void ValidateOverShootRangePresetTest() var min = OnlinerReal.MinValue; var max = OnlinerReal.MaxValue; - //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerSIntTest.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerSIntTest.cs index d3e5b240d..6f823953f 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerSIntTest.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerSIntTest.cs @@ -34,9 +34,8 @@ public void ChangeEditedValueTest() Onliner.Edit = expected; //-- Assert - Assert.AreEqual(expected, Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); - + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } [Test()] @@ -50,8 +49,8 @@ public void ChangeShadow() Onliner.Shadow = expected; //-- Assert - Assert.AreEqual(expected, Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); + Assert.That(Onliner.Shadow, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } [Test()] @@ -63,9 +62,9 @@ public void ValidateTightRangeTest() var mid = (sbyte)(OnlinerSInt.MaxValue / 2); //-- Act - Assert.True(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); } [Test()] @@ -78,10 +77,9 @@ public void ValidateOverShootRangePresetTest() var min = OnlinerSInt.MinValue; var max = OnlinerSInt.MaxValue; - //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } [Test] @@ -90,7 +88,7 @@ public override void CanSetAsyncTest() var expected = (sbyte)(OnlinerSInt.MaxValue / 4); Onliner.SetAsync(expected).Wait(); - Assert.AreEqual(expected, Onliner.GetAsync().Result); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); } } diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerStringTest.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerStringTest.cs index aaf9da54d..c6a39477a 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerStringTest.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerStringTest.cs @@ -17,7 +17,6 @@ public class OnlinerStringTest : OnlinerBaseTests { protected override OnlinerBase Onliner { get; set; } - public override void Init() { Onliner = new OnlinerString(new TestTwinObject(), $"readableTail", "symbolTail"); @@ -27,16 +26,14 @@ public override void Init() public void ChangeEditedValueTest() { //-- Arrange - var expected = "fasdft345tgrsfgsery"; //-- Act Onliner.Edit = expected; //-- Assert - Assert.AreEqual(expected, Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};;{expected}", logs); - + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};;{expected}")); } [Test()] @@ -47,27 +44,25 @@ public void ChangeEditedValueWithInvalidCharactersTest() Onliner.Edit = expected; //-- Act - Onliner.Edit = "43ojtopgwj05tu*SE*DF:5┘>1Ç.ÞYF"; ; + Onliner.Edit = "43ojtopgwj05tu*SE*DF:5┘>1Ç.ÞYF"; //-- Assert - Assert.AreEqual(expected, Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};;{expected}", logs); - + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};;{expected}")); } [Test()] public void ChangeShadow() { //-- Arrange - var expected = "fasdft345tgrsfgsery"; //-- Act Onliner.Shadow = expected; //-- Assert - Assert.AreEqual(expected, Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};;{expected}", logs); + Assert.That(Onliner.Shadow, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};;{expected}")); } [Test] @@ -76,7 +71,7 @@ public override void CanSetAsyncTest() var expected = "some string"; Onliner.SetAsync(expected).Wait(); - Assert.AreEqual(expected, Onliner.GetAsync().Result); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerTimeOfDayTest.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerTimeOfDayTest.cs index 1440bbed8..67e7aa5c5 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerTimeOfDayTest.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerTimeOfDayTest.cs @@ -17,7 +17,6 @@ public class OnlinerTimeOfDayTest : OnlinerBaseTests { protected override OnlinerBase Onliner { get; set; } - public override void Init() { Onliner = new OnlinerTimeOfDay(new TestTwinObject(), $"readableTail", "symbolTail"); @@ -27,31 +26,28 @@ public override void Init() public void ChangeEditedValueTest() { //-- Arrange - var expected = OnlinerTimeOfDay.MaxValue; //-- Act Onliner.Edit = expected; //-- Assert - Assert.AreEqual(expected, Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};00:00:00;{expected}", logs); - + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};00:00:00;{expected}")); } [Test()] public void ChangeShadow() { //-- Arrange - var expected = OnlinerTimeOfDay.MaxValue; //-- Act Onliner.Shadow = expected; //-- Assert - Assert.AreEqual(expected, Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};00:00:00;{expected}", logs); + Assert.That(Onliner.Shadow, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};00:00:00;{expected}")); } [Test()] @@ -63,9 +59,9 @@ public void ValidateTightRangeTest() var mid = (OnlinerTimeOfDay.MaxValue / 2); //-- Act - Assert.True(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); } [Test()] @@ -79,8 +75,8 @@ public void ValidateOverShootRangePresetTest() var max = OnlinerTimeOfDay.MaxValue; //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } [Test] @@ -89,7 +85,7 @@ public override void CanSetAsyncTest() var expected = TimeSpan.FromHours(15); Onliner.SetAsync(expected).Wait(); - Assert.AreEqual(expected, Onliner.GetAsync().Result); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerTimeTest.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerTimeTest.cs index af142df1f..a94edb756 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerTimeTest.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerTimeTest.cs @@ -17,7 +17,6 @@ public class OnlinerTimeTest : OnlinerBaseTests { protected override OnlinerBase Onliner { get; set; } - public override void Init() { Onliner = new OnlinerTime(new TestTwinObject(), $"readableTail", "symbolTail"); @@ -27,31 +26,28 @@ public override void Init() public void ChangeEditedValueTest() { //-- Arrange - var expected = OnlinerTime.MaxValue; //-- Act Onliner.Edit = expected; //-- Assert - Assert.AreEqual(expected, Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};00:00:00;{expected}", logs); - + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};00:00:00;{expected}")); } [Test()] public void ChangeShadow() { //-- Arrange - var expected = OnlinerTime.MaxValue; //-- Act Onliner.Shadow = expected; //-- Assert - Assert.AreEqual(expected, Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};00:00:00;{expected}", logs); + Assert.That(Onliner.Shadow, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};00:00:00;{expected}")); } public void ValidateTightRangeTest() @@ -62,9 +58,9 @@ public void ValidateTightRangeTest() var mid = (OnlinerTime.MaxValue / 2); //-- Act - Assert.True(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); } [Test()] @@ -78,8 +74,8 @@ public void ValidateOverShootRangePresetTest() var max = OnlinerTime.MaxValue; //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } [Test] @@ -88,7 +84,7 @@ public override void CanSetAsyncTest() var expected = TimeSpan.FromHours(44); Onliner.SetAsync(expected).Wait(); - Assert.AreEqual(expected, Onliner.GetAsync().Result); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerUDIntTest.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerUDIntTest.cs index 18851a3af..0394b1d52 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerUDIntTest.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerUDIntTest.cs @@ -34,9 +34,8 @@ public void ChangeEditedValueTest() Onliner.Edit = expected; //-- Assert - Assert.AreEqual(expected, Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); - + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } [Test()] @@ -50,8 +49,8 @@ public void ChangeShadow() Onliner.Shadow = expected; //-- Assert - Assert.AreEqual(expected, Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); + Assert.That(Onliner.Shadow, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } [Test()] @@ -63,9 +62,9 @@ public void ValidateTightRangeTest() var mid = (OnlinerUDInt.MaxValue / 2); //-- Act - Assert.True(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); } [Test()] @@ -78,10 +77,9 @@ public void ValidateOverShootRangePresetTest() var min = OnlinerUDInt.MinValue; var max = OnlinerUDInt.MaxValue; - //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } [Test] @@ -90,7 +88,7 @@ public override void CanSetAsyncTest() var expected = OnlinerUDInt.MaxValue / 12; Onliner.SetAsync(expected).Wait(); - Assert.AreEqual(expected, Onliner.GetAsync().Result); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerUIntTest.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerUIntTest.cs index f9b66829d..f3fdf8d7f 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerUIntTest.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerUIntTest.cs @@ -17,7 +17,6 @@ public class OnlinerUIntTest : OnlinerBaseTests { protected override OnlinerBase Onliner { get; set; } - public override void Init() { Onliner = new OnlinerUInt(new TestTwinObject(), $"readableTail", "symbolTail"); @@ -27,31 +26,28 @@ public override void Init() public void ChangeEditedValueTest() { //-- Arrange - var expected = ushort.MaxValue; //-- Act Onliner.Edit = expected; //-- Assert - Assert.AreEqual(expected, Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); - + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } [Test()] public void ChangeShadow() { //-- Arrange - var expected = ushort.MaxValue; //-- Act Onliner.Shadow = expected; //-- Assert - Assert.AreEqual(expected, Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); + Assert.That(Onliner.Shadow, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } [Test()] @@ -63,25 +59,23 @@ public void ValidateTightRangeTest() var mid = (ushort)(OnlinerUInt.MaxValue / 2); //-- Act - Assert.True(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); } [Test()] public void ValidateOverShootRangePresetTest() { - Onliner.AttributeMinimum = (ushort)(OnlinerUInt.MinValue + 1); Onliner.AttributeMaximum = (ushort)(OnlinerUInt.MaxValue - 1); //-- Arrange var min = OnlinerUInt.MinValue; var max = OnlinerUInt.MaxValue; - //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } [Test] @@ -90,7 +84,7 @@ public override void CanSetAsyncTest() var expected = (ushort)(OnlinerUInt.MaxValue / 12); Onliner.SetAsync(expected).Wait(); - Assert.AreEqual(expected, Onliner.GetAsync().Result); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerULIntTest.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerULIntTest.cs index fa01bc802..3b58c5445 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerULIntTest.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerULIntTest.cs @@ -17,7 +17,6 @@ public class OnlinerULIntTest : OnlinerBaseTests { protected override OnlinerBase Onliner { get; set; } - public override void Init() { Onliner = new OnlinerULInt(new TestTwinObject(), $"readableTail", "symbolTail"); @@ -27,31 +26,28 @@ public override void Init() public void ChangeEditedValueTest() { //-- Arrange - var expected = ulong.MaxValue; //-- Act Onliner.Edit = expected; //-- Assert - Assert.AreEqual(expected, Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); - + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } [Test()] public void ChangeShadow() { //-- Arrange - var expected = ulong.MaxValue; //-- Act Onliner.Shadow = expected; //-- Assert - Assert.AreEqual(expected, Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); + Assert.That(Onliner.Shadow, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } [Test()] @@ -63,25 +59,23 @@ public void ValidateTightRangeTest() var mid = (OnlinerULInt.MaxValue / 2); //-- Act - Assert.True(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); } [Test()] public void ValidateOverShootRangePresetTest() { - Onliner.AttributeMinimum = (OnlinerULInt.MinValue + 1); Onliner.AttributeMaximum = (OnlinerULInt.MaxValue - 1); //-- Arrange var min = OnlinerULInt.MinValue; var max = OnlinerULInt.MaxValue; - //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } [Test] @@ -90,7 +84,7 @@ public override void CanSetAsyncTest() var expected = OnlinerULInt.MaxValue / 12; Onliner.SetAsync(expected).Wait(); - Assert.AreEqual(expected, Onliner.GetAsync().Result); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerUSIntTest.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerUSIntTest.cs index 67729a48c..559e30e37 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerUSIntTest.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerUSIntTest.cs @@ -17,7 +17,6 @@ public class OnlinerUSIntTest : OnlinerBaseTests { protected override OnlinerBase Onliner { get; set; } - public override void Init() { Onliner = new OnlinerUSInt(new TestTwinObject(), $"readableTail", "symbolTail"); @@ -27,31 +26,28 @@ public override void Init() public void ChangeEditedValueTest() { //-- Arrange - var expected = byte.MaxValue; //-- Act Onliner.Edit = expected; //-- Assert - Assert.AreEqual(expected, Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); - + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } [Test()] public void ChangeShadow() { //-- Arrange - var expected = byte.MaxValue; //-- Act Onliner.Shadow = expected; //-- Assert - Assert.AreEqual(expected, Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); + Assert.That(Onliner.Shadow, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } public void ValidateTightRangeTest() @@ -62,9 +58,9 @@ public void ValidateTightRangeTest() var mid = (byte)(OnlinerUSInt.MaxValue / 2); //-- Act - Assert.True(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); } [Test()] @@ -78,8 +74,8 @@ public void ValidateOverShootRangePresetTest() var max = OnlinerUSInt.MaxValue; //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } [Test] @@ -88,7 +84,7 @@ public override void CanSetAsyncTest() var expected = (byte)(OnlinerUSInt.MaxValue / 12); Onliner.SetAsync(expected).Wait(); - Assert.AreEqual(expected, Onliner.GetAsync().Result); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerWCharTest.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerWCharTest.cs index 9b1e7f13d..5790b765d 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerWCharTest.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerWCharTest.cs @@ -33,8 +33,8 @@ public void ChangeEditedValueTest() Onliner.Edit = 'w'; //-- Assert - Assert.AreEqual('w', Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};\0;w", logs); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo('w')); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};\0;w")); } [Test] @@ -46,11 +46,11 @@ public void ChangeValueOverOnlinerInterfaceTest() iShadow.Value = 's'; iOnliner.Value = 'x'; - Assert.AreEqual('x', this.Onliner.Cyclic); - Assert.AreEqual('x', this.Onliner.GetAsync().Result); - Assert.AreEqual('s', this.Onliner.Shadow); + Assert.That(this.Onliner.Cyclic, Is.EqualTo('x')); + Assert.That(this.Onliner.GetAsync().Result, Is.EqualTo('x')); + Assert.That(this.Onliner.Shadow, Is.EqualTo('s')); } - + [Test] public void ChangeValueOverShadowInterfaceTest() { @@ -60,9 +60,9 @@ public void ChangeValueOverShadowInterfaceTest() iOnliner.Value = 'f'; iShadow.Value = 'u'; - Assert.AreEqual('f', this.Onliner.Cyclic); - Assert.AreEqual('f', this.Onliner.GetAsync().Result); - Assert.AreEqual('u', this.Onliner.Shadow); + Assert.That(this.Onliner.Cyclic, Is.EqualTo('f')); + Assert.That(this.Onliner.GetAsync().Result, Is.EqualTo('f')); + Assert.That(this.Onliner.Shadow, Is.EqualTo('u')); } [Test()] @@ -72,8 +72,8 @@ public void ChangeShadow() Onliner.Shadow = 'g'; //-- Assert - Assert.AreEqual('g', Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};\0;g", logs); + Assert.That(Onliner.Shadow, Is.EqualTo('g')); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};\0;g")); } [Test()] @@ -84,11 +84,11 @@ public void ValidateInBuildRangeTest() var max = OnlinerWChar.MaxValue; var mid = (char)(OnlinerWChar.MaxValue / 2); //-- Act - Assert.IsTrue(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsTrue(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsTrue(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); - //Assert.IsFalse(Onliner.Validator.Validate((byte)(max), System.Globalization.CultureInfo.InvariantCulture).IsValid); - //Assert.IsFalse(Onliner.Validator.Validate((byte)(min), System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + //Assert.That(Onliner.Validator.Validate((byte)(max), System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + //Assert.That(Onliner.Validator.Validate((byte)(min), System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } [Test()] @@ -102,11 +102,11 @@ public void ValidateInCustomRangeTest() var max = (char)Onliner.AttributeMaximum; var mid = 'ú'; //-- Act - Assert.IsTrue(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsTrue(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsTrue(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate((char)(max + 1), System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate((char)(min - 1), System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate((char)(max + 1), System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate((char)(min - 1), System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } [Test()] @@ -121,8 +121,8 @@ public void ValidateOverShootRangeTest() //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } [Test] @@ -130,7 +130,7 @@ public override void CanSetAsyncTest() { Onliner.SetAsync((char)(100)).Wait(); - Assert.AreEqual(((char)(100)), Onliner.GetAsync().Result); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo((char)(100))); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerWStringTest.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerWStringTest.cs index 2cf77d393..f5251ba59 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerWStringTest.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerWStringTest.cs @@ -17,7 +17,6 @@ public class OnlinerWStringTest : OnlinerBaseTests { protected override OnlinerBase Onliner { get; set; } - public override void Init() { Onliner = new OnlinerWString(new TestTwinObject(), $"readableTail", "symbolTail"); @@ -34,9 +33,8 @@ public void ChangeEditedValueTest() Onliner.Edit = expected; //-- Assert - Assert.AreEqual(expected, Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};;{expected}", logs); - + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};;{expected}")); } [Test()] @@ -50,8 +48,8 @@ public void ChangeShadow() Onliner.Shadow = expected; //-- Assert - Assert.AreEqual(expected, Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};;{expected}", logs); + Assert.That(Onliner.Shadow, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};;{expected}")); } [Test] @@ -60,7 +58,7 @@ public override void CanSetAsyncTest() var expected = "some wstring"; Onliner.SetAsync(expected).Wait(); - Assert.AreEqual(expected, Onliner.GetAsync().Result); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerWordTest.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerWordTest.cs index 1e460cba0..de8a82d0e 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerWordTest.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerWordTest.cs @@ -17,7 +17,6 @@ public class OnlinerWordTest : OnlinerBaseTests { protected override OnlinerBase Onliner { get; set; } - public override void Init() { Onliner = new OnlinerWord(new TestTwinObject(), $"readableTail", "symbolTail"); @@ -27,31 +26,28 @@ public override void Init() public void ChangeEditedValueTest() { //-- Arrange - var expected = ushort.MaxValue; //-- Act Onliner.Edit = expected; //-- Assert - Assert.AreEqual(expected, Onliner.GetAsync().Result); - Assert.AreEqual($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); - + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Edit of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } [Test()] public void ChangeShadow() { //-- Arrange - var expected = ushort.MaxValue; //-- Act Onliner.Shadow = expected; //-- Assert - Assert.AreEqual(expected, Onliner.Shadow); - Assert.AreEqual($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}", logs); + Assert.That(Onliner.Shadow, Is.EqualTo(expected)); + Assert.That(logs, Is.EqualTo($"Shadow of {Onliner.Symbol};{Onliner.HumanReadable};0;{expected}")); } public void ValidateTightRangeTest() @@ -62,9 +58,9 @@ public void ValidateTightRangeTest() var mid = (ushort)(OnlinerWord.MaxValue / 2); //-- Act - Assert.True(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.True(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(mid, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.True); } [Test()] @@ -78,8 +74,8 @@ public void ValidateOverShootRangePresetTest() var max = OnlinerWord.MaxValue; //-- Act - Assert.IsFalse(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid); - Assert.IsFalse(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid); + Assert.That(Onliner.Validator.Validate(min, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); + Assert.That(Onliner.Validator.Validate(max, System.Globalization.CultureInfo.InvariantCulture).IsValid, Is.False); } [Test] @@ -88,7 +84,7 @@ public override void CanSetAsyncTest() var expected = (ushort)(OnlinerWord.MaxValue / 15); Onliner.SetAsync(expected).Wait(); - Assert.AreEqual(expected, Onliner.GetAsync().Result); + Assert.That(Onliner.GetAsync().Result, Is.EqualTo(expected)); } } } \ No newline at end of file diff --git a/src/AXSharp.connectors/tests/AXSharp.TIA.ConnectorTests/AXSharp.TIA2AXSharpTests_L3.csproj b/src/AXSharp.connectors/tests/AXSharp.TIA.ConnectorTests/AXSharp.TIA2AXSharpTests_L3.csproj index ae16c8c5f..69566c3d6 100644 --- a/src/AXSharp.connectors/tests/AXSharp.TIA.ConnectorTests/AXSharp.TIA2AXSharpTests_L3.csproj +++ b/src/AXSharp.connectors/tests/AXSharp.TIA.ConnectorTests/AXSharp.TIA2AXSharpTests_L3.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/AXSharp.connectors/tests/ax-test-project/apax-lock.json b/src/AXSharp.connectors/tests/ax-test-project/apax-lock.json index 09150896a..a8e79e7df 100644 --- a/src/AXSharp.connectors/tests/ax-test-project/apax-lock.json +++ b/src/AXSharp.connectors/tests/ax-test-project/apax-lock.json @@ -2,228 +2,267 @@ "name": "ax_test_project", "version": "0.0.0", "lockFileVersion": "2", - "installStrategy": "strict", + "installStrategy": "overridable", "root": { "name": "ax_test_project", "version": "0.0.0", "devDependencies": { - "@ax/sdk": "2311.0.1" + "@ax/sdk": "2405.2.0", + "@ax/sld": "^3.0.6-alpha" } }, "packages": { "@ax/sdk": { "name": "@ax/sdk", - "version": "2311.0.1", - "integrity": "sha512-uPAnfHnc9Tl7ugVFjA3Qc7K1CNwEF7CPfMRdZS/hO2aNeMXLlfxOc/Mm1R5hP8pF+XQgjhyvwm/Zy/e1rghKWQ==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/sdk/-/sdk-2311.0.1.tgz", + "version": "2405.2.0", + "integrity": "sha512-JSpi1qbj3sihdr0uKJoxYczqj/E6+gB8x/btVAScgzRkxmrm0yYm6T+0d/AuxZKWGbvhy6xNu+5hiNgRBut8Sw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/sdk/-/sdk-2405.2.0.tgz", "dependencies": { - "@ax/axunitst": "4.1.8", - "@ax/axunitst-ls-contrib": "4.1.8", - "@ax/mod": "1.0.4", - "@ax/mon": "1.0.4", - "@ax/sdb": "1.0.4", - "@ax/sld": "2.0.5", - "@ax/st": "2311.0.1", - "@ax/target-llvm": "6.0.146", - "@ax/target-mc7plus": "6.0.146", - "@ax/simatic-pragma-stc-plugin": "2.0.12", - "@ax/trace": "2.7.0", - "@ax/diagnostic-buffer": "1.2.0", - "@ax/performance-info": "1.1.0", - "@ax/plc-info": "2.3.0", - "@ax/certificate-management": "1.1.0" + "@ax/apax-build": "1.1.0", + "@ax/axunitst": "5.2.6", + "@ax/axunitst-ls-contrib": "5.2.6", + "@ax/certificate-management": "1.1.2", + "@ax/diagnostic-buffer": "1.3.1", + "@ax/hwc": "1.2.136", + "@ax/hwld": "1.0.75", + "@ax/mod": "1.2.2", + "@ax/mon": "1.2.2", + "@ax/performance-info": "1.1.1", + "@ax/plc-info": "2.4.0", + "@ax/sdb": "1.2.2", + "@ax/simatic-pragma-stc-plugin": "4.0.18", + "@ax/sld": "2.5.10", + "@ax/st-ls": "7.1.87", + "@ax/stc": "7.1.87", + "@ax/target-llvm": "7.1.87", + "@ax/target-mc7plus": "7.1.87", + "@ax/trace": "2.8.0" + } + }, + "@ax/sld": { + "name": "@ax/sld", + "version": "3.0.6", + "integrity": "sha512-j90GJh1jMIpvB521EIxvTq6rhr8OO+6qqwsXn2Of7GxQrzwWi+NEXe9ss/ccFAKL0I7aEGD+SIW8jVHUgMAvow==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/sld/-/sld-3.0.6.tgz", + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/apax-build": { + "name": "@ax/apax-build", + "version": "1.1.0", + "integrity": "sha512-QzEMiuu3Z+wX9bBLxGclyVTJRi4tP3lL1dm0h2vV5QTn0NxX4tBlVhZQZu9ovi6ZFbxCuvwhC3aF+WW9tyvi+g==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/apax-build/-/apax-build-1.1.0.tgz", + "dependencies": { + "@ax/simatic-package-tool": "^1.0.3", + "@ax/st-resources.stc-plugin": "^1.0.3" } }, "@ax/axunitst": { "name": "@ax/axunitst", - "version": "4.1.8", - "integrity": "sha512-Ax4b503soS4RrfokQg5NbhqFOSJ7cKIzK8bNwtobWHy9asUPUbuwQhsILGETFh+T7cw8FGzFZ/VzKOL6tkhq8A==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst/-/axunitst-4.1.8.tgz", + "version": "5.2.6", + "integrity": "sha512-j2gfKb3tperrm4aRuFWlh0dvvqBya055+FiIo0PJyIT7bRlNLTgu0OSRulObAUn9rJBZL8OkOmGjz2Wsz9gipA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst/-/axunitst-5.2.6.tgz", "dependencies": { - "@ax/axunitst-library": "4.1.8", - "@ax/axunitst-runner": "4.1.8", - "@ax/axunitst-generator": "4.1.8", - "@ax/axunitst-llvm-runner-gen": "4.1.8", - "@ax/axunitst-docs": "4.1.8", + "@ax/axunitst-library": "5.2.6", + "@ax/axunitst-test-director": "5.2.6", + "@ax/axunitst-docs": "5.2.6", "@ax/build-native": "16.0.3" } }, "@ax/axunitst-ls-contrib": { "name": "@ax/axunitst-ls-contrib", - "version": "4.1.8", - "integrity": "sha512-dCrf/Ou/NT0zFh6wVXSxYphHOjLoUgOBJWDIBVzBpRDbhCebA/BuHLmVVGMllujkMreMlGRITjjquuqILquOAA==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-ls-contrib/-/axunitst-ls-contrib-4.1.8.tgz", + "version": "5.2.6", + "integrity": "sha512-EYUQje4GcJSV3efTe1WqYanxV54dO0kuxrtBLUhpQ20JezqVRYUE4BQF4jpfnhGJVFs4rW5J3BAlYEaBBhW7pg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-ls-contrib/-/axunitst-ls-contrib-5.2.6.tgz", "dependencies": {} }, - "@ax/mod": { - "name": "@ax/mod", - "version": "1.0.4", - "integrity": "sha512-AU/OiEf3J9/wo+kSDYLjIRd19ajOpgASs5J2MHOVlP8eOaupZ1pAkIIUvXBcBuS8M42l5kXEw7G18dTcW9j1ng==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/mod/-/mod-1.0.4.tgz", + "@ax/certificate-management": { + "name": "@ax/certificate-management", + "version": "1.1.2", + "integrity": "sha512-BBEJUjE+WjldDxzeCdVBTXkXtWEO3HK+fdS1frKiIOqmmpeAGfJ01P0qRhNcdzF+ORApQvkBBYorP9Son0nUWA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/certificate-management/-/certificate-management-1.1.2.tgz", "dependencies": { - "@ax/mod-win-x64": "1.0.4", - "@ax/mod-linux-x64": "1.0.4" + "@ax/certificate-management-win-x64": "1.1.2", + "@ax/certificate-management-linux-x64": "1.1.2" } }, - "@ax/mon": { - "name": "@ax/mon", - "version": "1.0.4", - "integrity": "sha512-HBFdgbTqHtXwq/42nyTnEupX3/WT+ltPFlumVhksd7+Oh9oR2HUSWf5t/GkfjR7LY7W32h5Gb7wpnHNU6Qm7cA==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/mon/-/mon-1.0.4.tgz", + "@ax/diagnostic-buffer": { + "name": "@ax/diagnostic-buffer", + "version": "1.3.1", + "integrity": "sha512-BcaeNIDHYaqjLnCqHKa+LrWm/wQf7wt0q7ET7Yxk9sTbePsKF5+1QBm+PjQZCqn/XfqPnDzSj4YKLMNdP7fGgQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/diagnostic-buffer/-/diagnostic-buffer-1.3.1.tgz", "dependencies": { - "@ax/mon-win-x64": "1.0.4", - "@ax/mon-linux-x64": "1.0.4" + "@ax/diagnostic-buffer-win-x64": "1.3.1", + "@ax/diagnostic-buffer-linux-x64": "1.3.1" } }, - "@ax/sdb": { - "name": "@ax/sdb", - "version": "1.0.4", - "integrity": "sha512-9GZRZE5TX7wCJBzabtohFP+L9CzVgn+wIYRJyYhmuX1Y6dMF8+rgChTcc1vjq8bQHFx2ovkt57xvoFoEbs/Wag==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/sdb/-/sdb-1.0.4.tgz", + "@ax/hwc": { + "name": "@ax/hwc", + "version": "1.2.136", + "integrity": "sha512-nEdtkEahm70iwSQtaI1s+M9ArYNIdG6/8uxqkgOj8ZYm/HNqm+yv3Iu9cSJHe6gz5YVreJhfu0LE7wgNRnMkmw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/hwc/-/hwc-1.2.136.tgz", "dependencies": { - "@ax/sdb-win-x64": "1.0.4", - "@ax/sdb-linux-x64": "1.0.4" + "@ax/hwc-win-x64": "1.2.136", + "@ax/hwc-linux-x64": "1.2.136" } }, - "@ax/sld": { - "name": "@ax/sld", - "version": "2.0.5", - "integrity": "sha512-upa0HyRVdYyzNu6j7E+gTAnpzP2mfZxvo+0jbm8H6Ci9ergL56SHaCVBC35PnociMZpdZ5d1/LTy6f8lwpDxXA==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/sld/-/sld-2.0.5.tgz", + "@ax/hwld": { + "name": "@ax/hwld", + "version": "1.0.75", + "integrity": "sha512-hIL04LpIP80oIIK0bTSaGKYItdbGyQR9GXCdo6eeFRgQiN8sLJvG0/If0nmv22QFNYwpjjRbqUF9sVHrMneinA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/hwld/-/hwld-1.0.75.tgz", "cpu": [ "x64" ], "dependencies": {} }, - "@ax/st": { - "name": "@ax/st", - "version": "2311.0.1", - "integrity": "sha512-n4Lqd2Gom1otRVGBu0hpYnT4dIvb0PVdcqo/3qVgMGKNjsMnKJAk9hKfnmcBhpHHt5U2IOIaiPgI3EuOEjL3LA==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/st/-/st-2311.0.1.tgz", + "@ax/mod": { + "name": "@ax/mod", + "version": "1.2.2", + "integrity": "sha512-X5hmfil9iQoe7s+8hxUN90n9+x7RGMaCJ5an2xP6t3Ch1BolhoPe5oZPt79z/4p1kXIef4bO7/7l5cNoVf1INA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/mod/-/mod-1.2.2.tgz", "dependencies": { - "@ax/stc": "6.0.146", - "@ax/apax-build": "0.7.0", - "@ax/st-ls": "3.0.113" + "@ax/mod-win-x64": "1.2.2", + "@ax/mod-linux-x64": "1.2.2" } }, - "@ax/target-llvm": { - "name": "@ax/target-llvm", - "version": "6.0.146", - "integrity": "sha512-HiaiuX/O6nOUOX+xTcaMIHGLdAY4+KQW7Xwj39XCKLC/M54bhqiz2XOpde0g3jeUVuBeimf8UdTD3+MTva6l0A==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-llvm/-/target-llvm-6.0.146.tgz", + "@ax/mon": { + "name": "@ax/mon", + "version": "1.2.2", + "integrity": "sha512-JPI5kMod5iNwVHX7HmW7+VP6CC9MpLH/vSPWBMWOqwO5egl82BJ7bzjBvqs8cxLGUg0DXLph39f5kxLeH+hZLg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/mon/-/mon-1.2.2.tgz", "dependencies": { - "@ax/target-llvm-win-x64": "6.0.146", - "@ax/target-llvm-linux-x64": "6.0.146" + "@ax/mon-win-x64": "1.2.2", + "@ax/mon-linux-x64": "1.2.2" } }, - "@ax/target-mc7plus": { - "name": "@ax/target-mc7plus", - "version": "6.0.146", - "integrity": "sha512-WTktM/4O5XbXU+5rfpee6d02gl6AcRadFCgtkrYYD9rA4MShhPrYRREFn1dC9SfifOmWPqLX6i/qrfGMCG0n2w==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-mc7plus/-/target-mc7plus-6.0.146.tgz", + "@ax/performance-info": { + "name": "@ax/performance-info", + "version": "1.1.1", + "integrity": "sha512-jfegiHImUyE0RH0wMRXLoF72QGoNjLN5DB6pIih+6jj5CxA/5xwfA57j85RUEk8CZMySibvT2nQVzJHOeSWvGw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/performance-info/-/performance-info-1.1.1.tgz", + "dependencies": { + "@ax/performance-info-win-x64": "1.1.1", + "@ax/performance-info-linux-x64": "1.1.1" + } + }, + "@ax/plc-info": { + "name": "@ax/plc-info", + "version": "2.4.0", + "integrity": "sha512-dOdzSN7yGCdLeKv1ET1BWlNqg+mskhNoe4WYmOA25Dq5OWvkgCnnHGjjRgo7bw4ZGWctPzE/vKjlX9diNAa6Og==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/plc-info/-/plc-info-2.4.0.tgz", "dependencies": { - "@ax/target-mc7plus-win-x64": "6.0.146", - "@ax/target-mc7plus-linux-x64": "6.0.146" + "@ax/plc-info-linux-x64": "2.4.0", + "@ax/plc-info-win-x64": "2.4.0" + } + }, + "@ax/sdb": { + "name": "@ax/sdb", + "version": "1.2.2", + "integrity": "sha512-Yi8STvJfVnP2ucIcySe8K0wWhfb0nNCSgDvcHan9Yr6pbYibmfLu0VaaJ/rvxIrP882Ssu2QNoDXdmKfYFmDEA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/sdb/-/sdb-1.2.2.tgz", + "dependencies": { + "@ax/sdb-win-x64": "1.2.2", + "@ax/sdb-linux-x64": "1.2.2" } }, "@ax/simatic-pragma-stc-plugin": { "name": "@ax/simatic-pragma-stc-plugin", - "version": "2.0.12", - "integrity": "sha512-KLo6lEPU5NfahK6Rr9MBlItSMU4VO+vePUGhk5nooM/1TZYtekJnLE4xRoZLeiMk+MA6glodTw6YkPzl7p7z4A==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/simatic-pragma-stc-plugin/-/simatic-pragma-stc-plugin-2.0.12.tgz", + "version": "4.0.18", + "integrity": "sha512-gm+r3VCKHSBrjA7/kTb4IEOj4MgPEeeTfCHjj/RwvyEoUO/ZxvFU0NzkkxYsR9eXnfabRRMpLGC5SvrRWjcZkA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/simatic-pragma-stc-plugin/-/simatic-pragma-stc-plugin-4.0.18.tgz", "dependencies": {} }, - "@ax/trace": { - "name": "@ax/trace", - "version": "2.7.0", - "integrity": "sha512-yUmzjL5IKJ9NX5Q1THHN+LtW6llsZa+tw/jRZYQzKcxXTFJrGcCo5Qy45Dh0loxWGjZKmIe4YVG1ZwP3fdihJQ==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/trace/-/trace-2.7.0.tgz", + "@ax/st-ls": { + "name": "@ax/st-ls", + "version": "7.1.87", + "integrity": "sha512-qfLJod9PDzxOssNc0xdoKJyoaqL+AFYveg5YdELVgRf45QAl5qPoeq3FTsMtab3eXj7VvR8GsOB9ZvAflm3nCg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/st-ls/-/st-ls-7.1.87.tgz", "dependencies": { - "@ax/trace-win-x64": "2.7.0", - "@ax/trace-linux-x64": "2.7.0" + "@ax/st-ls-win-x64": "7.1.87", + "@ax/st-ls-linux-x64": "7.1.87" } }, - "@ax/diagnostic-buffer": { - "name": "@ax/diagnostic-buffer", - "version": "1.2.0", - "integrity": "sha512-Ka0t/mftRpSOMXob9/u9IDY1aSm1DyLe81vwNqJ6RzQY/h6CNpDjnRpx79pGzQiGWozlvtg/Sot0prGYPbthbg==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/diagnostic-buffer/-/diagnostic-buffer-1.2.0.tgz", + "@ax/stc": { + "name": "@ax/stc", + "version": "7.1.87", + "integrity": "sha512-u6vQH5zDdxJMZg6slXUXFjCvympdu0ssBVHt5eeq+683s+eumYoWJHunN40aOtUnsvdEWkYE6/vXT+0xW/l8Og==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/stc/-/stc-7.1.87.tgz", "dependencies": { - "@ax/diagnostic-buffer-win-x64": "1.2.0", - "@ax/diagnostic-buffer-linux-x64": "1.2.0" + "@ax/stc-win-x64": "7.1.87", + "@ax/stc-linux-x64": "7.1.87" } }, - "@ax/performance-info": { - "name": "@ax/performance-info", - "version": "1.1.0", - "integrity": "sha512-vIgAbV63H9rVPYkS/Kz3AF38pMlI55oh3yReOUzEoXg8QmniOw81Ba5z//IeFpoZZyQJJG1lxtbYpVWvhCEqkA==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/performance-info/-/performance-info-1.1.0.tgz", + "@ax/target-llvm": { + "name": "@ax/target-llvm", + "version": "7.1.87", + "integrity": "sha512-JosrRlVCefFdtaD9vmj8eAB6c1mgqXXPXdYPHwRTcVIHxGUqvy0ol6nQCnetvCwioRYIDR1miY3hOu5qIeuVPQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-llvm/-/target-llvm-7.1.87.tgz", "dependencies": { - "@ax/performance-info-win-x64": "1.1.0", - "@ax/performance-info-linux-x64": "1.1.0" + "@ax/target-llvm-win-x64": "7.1.87", + "@ax/target-llvm-linux-x64": "7.1.87" } }, - "@ax/plc-info": { - "name": "@ax/plc-info", - "version": "2.3.0", - "integrity": "sha512-k+iOi1eUpVW5xBXRvdqS6Qj+ju2wQMsZIAZDvz32NDSv6HoAUTwMIEB5BA6xv9plRr1zi3jn99plslUshCEFPQ==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/plc-info/-/plc-info-2.3.0.tgz", + "@ax/target-mc7plus": { + "name": "@ax/target-mc7plus", + "version": "7.1.87", + "integrity": "sha512-LST2JHXSoD0rIM/3fnyeYERio2jsywbqqy4CDhbho52rIUsOFYyqRysANt4yRFuu4fs9ZqLpY0svZ0+m8ATp/g==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-mc7plus/-/target-mc7plus-7.1.87.tgz", "dependencies": { - "@ax/plc-info-linux-x64": "2.3.0", - "@ax/plc-info-win-x64": "2.3.0" + "@ax/target-mc7plus-win-x64": "7.1.87", + "@ax/target-mc7plus-linux-x64": "7.1.87" } }, - "@ax/certificate-management": { - "name": "@ax/certificate-management", - "version": "1.1.0", - "integrity": "sha512-u3S1uF3EC/EsxxxR3aM79QRLoH5UR2iLoGwj7DCN8CMalEalI6zyjyumm09MQ0vQc+Zje/vlyltD7OllsAqOuA==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/certificate-management/-/certificate-management-1.1.0.tgz", + "@ax/trace": { + "name": "@ax/trace", + "version": "2.8.0", + "integrity": "sha512-3s+J4mY2K2DFc6LWvzB8Z2vXoJiYYHAW+Sf7QqrFkyj637FLWlYm8ByB9DCZqGyZxc6g28qrahq71qPV5aZWPg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/trace/-/trace-2.8.0.tgz", "dependencies": { - "@ax/certificate-management-win-x64": "1.1.0", - "@ax/certificate-management-linux-x64": "1.1.0" + "@ax/trace-win-x64": "2.8.0", + "@ax/trace-linux-x64": "2.8.0" } }, + "@ax/simatic-package-tool": { + "name": "@ax/simatic-package-tool", + "version": "1.0.3", + "integrity": "sha512-5f5k9y/fNSK657l/zszQxaj16SR9nYk+k4iskuuoPsScRFWr4joVvDfuCgPQ3EBzdyJDzkbXu2rItkoS2Dy84A==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/simatic-package-tool/-/simatic-package-tool-1.0.3.tgz", + "dependencies": {} + }, + "@ax/st-resources.stc-plugin": { + "name": "@ax/st-resources.stc-plugin", + "version": "1.0.5", + "integrity": "sha512-8qEF0A8qtmDMLpikoj52FcQzsF7gkrZWRFUCUtejNFgaRgAYTNI/VWKic3dWROrL3deflSha80lxzPJAeCQD0A==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/st-resources.stc-plugin/-/st-resources.stc-plugin-1.0.5.tgz", + "dependencies": {} + }, "@ax/axunitst-library": { "name": "@ax/axunitst-library", - "version": "4.1.8", - "integrity": "sha512-ue0V/EFANdrUA3j7BGr9j6TU1OFfKQBe29HN54CAHXvD1fzvr9gd+qoEHRiC41/KYVZarxi0XYcrQg4sbhh7Ew==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-library/-/axunitst-library-4.1.8.tgz", - "dependencies": { - "@ax/system-strings": "6.0.94" - } - }, - "@ax/axunitst-runner": { - "name": "@ax/axunitst-runner", - "version": "4.1.8", - "integrity": "sha512-Z0jnRjEWYVnaBIwXVHUncqp0GvwjTGMHH9avcHP5IisI9ierKrHnaJV/93mgntqgJY7BHLG8hanIoROPGc4ELA==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-runner/-/axunitst-runner-4.1.8.tgz", + "version": "5.2.6", + "integrity": "sha512-j411mz5F1NKscxVXRLD6bDPYfDDPOsmQbneQqXHZVWfyzymoyYDn8biWjWKgmliGdHzgMsg1SxDYb7qcGz99dA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-library/-/axunitst-library-5.2.6.tgz", "dependencies": { - "@ax/axunitst-runner-linux-x64": "4.1.8", - "@ax/axunitst-runner-win-x64": "4.1.8" + "@ax/system-strings": "^7.0.17" } }, - "@ax/axunitst-generator": { - "name": "@ax/axunitst-generator", - "version": "4.1.8", - "integrity": "sha512-AGzftAlftnpyZ52uQOYTK06Yu6ptKh2m1uvGRCRdDz16CCAM1FIKZZsppl6fnMmZkf6MZbkTx3nbZ74Zk5c1rw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-generator/-/axunitst-generator-4.1.8.tgz", + "@ax/axunitst-test-director": { + "name": "@ax/axunitst-test-director", + "version": "5.2.6", + "integrity": "sha512-sVo6jaiyedRul6MOJnjBKAzKwBF/g6y6kFq5l0mQzQtr4ek5d0Wj/E0XcrVIRSfq9/jvCaLFfkNt/ae+5gda9w==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-test-director/-/axunitst-test-director-5.2.6.tgz", "dependencies": { - "@ax/axunitst-generator-linux-x64": "4.1.8", - "@ax/axunitst-generator-win-x64": "4.1.8" + "@ax/axunitst-test-director-linux-x64": "5.2.6", + "@ax/axunitst-test-director-win-x64": "5.2.6" } }, - "@ax/axunitst-llvm-runner-gen": { - "name": "@ax/axunitst-llvm-runner-gen", - "version": "4.1.8", - "integrity": "sha512-XMmU+Qr1ElNFLJAnQ3JKh9QHr3/IPJo+KoR8C8sZqoIy/IzRCKY3IubvJ4KPGnBZzz+DI5UxIuH9bwvq5YWqIw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-llvm-runner-gen/-/axunitst-llvm-runner-gen-4.1.8.tgz", - "dependencies": {} - }, "@ax/axunitst-docs": { "name": "@ax/axunitst-docs", - "version": "4.1.8", - "integrity": "sha512-g4XsjaqZoJvYcz58ghirISMS/SfFl9UGNFJGr0afhLmYkqEyoLi6p9+zuLk4+SWtbMj3FNu/cc1ReSSS/GACEQ==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-docs/-/axunitst-docs-4.1.8.tgz", + "version": "5.2.6", + "integrity": "sha512-G6VNc9uiytIeuu1vG8YzsgYlLG/7BMsjv4CR/SIVFsqRhFMNQO2xTLte2DoZiD2DfhTjYwuExo1hRhCBuLfssQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-docs/-/axunitst-docs-5.2.6.tgz", "dependencies": {} }, "@ax/build-native": { @@ -236,11 +275,11 @@ "@ax/build-native-linux": "16.0.3" } }, - "@ax/mod-win-x64": { - "name": "@ax/mod-win-x64", - "version": "1.0.4", - "integrity": "sha512-AQ9NUSaICMN/qPeX95SzZUj1/m4xULIltZ4V2JcMdi0VW9aoTZVPnVFHdE2gb+HwApyvrq73v9/Vcyq8cBkuKQ==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/mod-win-x64/-/mod-win-x64-1.0.4.tgz", + "@ax/certificate-management-win-x64": { + "name": "@ax/certificate-management-win-x64", + "version": "1.1.2", + "integrity": "sha512-E1esAH64ib93jdIqOJElSRK5jh5zFNRuEfm8ZpwRIhuMe446DyQpjHFH+QrnDYSS9feZtLzJhFxEqhgQb7EP3w==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/certificate-management-win-x64/-/certificate-management-win-x64-1.1.2.tgz", "os": [ "win32" ], @@ -249,11 +288,11 @@ ], "dependencies": {} }, - "@ax/mod-linux-x64": { - "name": "@ax/mod-linux-x64", - "version": "1.0.4", - "integrity": "sha512-Bs+MBPyKpPJiJ3m8PvQ/DgCsH2I2YG4Vcm1Q6DfCzozpSp2RrRO6a+5vxLrpCzgQhzSjS+2PWvgXoikMPV7v1Q==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/mod-linux-x64/-/mod-linux-x64-1.0.4.tgz", + "@ax/certificate-management-linux-x64": { + "name": "@ax/certificate-management-linux-x64", + "version": "1.1.2", + "integrity": "sha512-Z3blxeHA57omgrAogE27FDhOQQk+JhlYyvzDmITUg1vnsxxO9fR936mukqeBOWydlt9N/+hQc2Xt/2NOGrcEKw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/certificate-management-linux-x64/-/certificate-management-linux-x64-1.1.2.tgz", "os": [ "linux" ], @@ -262,11 +301,11 @@ ], "dependencies": {} }, - "@ax/mon-win-x64": { - "name": "@ax/mon-win-x64", - "version": "1.0.4", - "integrity": "sha512-YT5sAL/40uPQV5KXCbddHChKY9obwBlesqWkJJwCQjvY+cSHMLort+VPaKdrNJdb1Z07zH7vnizIkgeYRpu0tw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/mon-win-x64/-/mon-win-x64-1.0.4.tgz", + "@ax/diagnostic-buffer-win-x64": { + "name": "@ax/diagnostic-buffer-win-x64", + "version": "1.3.1", + "integrity": "sha512-KmHQgAUPCm1+dQgThqxZOyjMmeQYhUyJpl+HZk3TWkVu2WqtAT5/In0whcUWfIJhO3i9nL44pu0Yz8uHqqjURw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/diagnostic-buffer-win-x64/-/diagnostic-buffer-win-x64-1.3.1.tgz", "os": [ "win32" ], @@ -275,11 +314,11 @@ ], "dependencies": {} }, - "@ax/mon-linux-x64": { - "name": "@ax/mon-linux-x64", - "version": "1.0.4", - "integrity": "sha512-KHwaqwdFffRF4jK2v3AZJh92Fl6ZKwGdw/wK8Xgy/FzIi/JbRHN7q20gTdafHqBUJa8GPDWMSgMmTXd+S2usyQ==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/mon-linux-x64/-/mon-linux-x64-1.0.4.tgz", + "@ax/diagnostic-buffer-linux-x64": { + "name": "@ax/diagnostic-buffer-linux-x64", + "version": "1.3.1", + "integrity": "sha512-CA3gr8L64up2p0BWo0DEvTbYJPgie23MIix1ShG8UXWtPE+yxvRDYt5BnsDPN9RMZCIp6odl8xYO7E9f/ib3OQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/diagnostic-buffer-linux-x64/-/diagnostic-buffer-linux-x64-1.3.1.tgz", "os": [ "linux" ], @@ -288,11 +327,11 @@ ], "dependencies": {} }, - "@ax/sdb-win-x64": { - "name": "@ax/sdb-win-x64", - "version": "1.0.4", - "integrity": "sha512-w3LFsmmAESRCjphKgjLGT+m4Ac9xWQnXjntM35pbQ0Tof/emgLFpi6LS/UBjexyCkxCts1rOKTMWKM1rXMStwg==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/sdb-win-x64/-/sdb-win-x64-1.0.4.tgz", + "@ax/hwc-win-x64": { + "name": "@ax/hwc-win-x64", + "version": "1.2.136", + "integrity": "sha512-DumJiwSKXQDoi17rbyse28nAsSNoxafTWCRG3Dj3pOvBivUHYUCz1OVzp0cg6Xyi/P2d98PkmOrTKcgl8sYmiQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/hwc-win-x64/-/hwc-win-x64-1.2.136.tgz", "os": [ "win32" ], @@ -301,11 +340,11 @@ ], "dependencies": {} }, - "@ax/sdb-linux-x64": { - "name": "@ax/sdb-linux-x64", - "version": "1.0.4", - "integrity": "sha512-du8fDAPlfMH4bmleJatxusTkMCmWAJh/9hNZUi7XOweWf2v4/aXx0gcddSS9HPnLfpGCgVIP/YYDhcr+j7PqpQ==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/sdb-linux-x64/-/sdb-linux-x64-1.0.4.tgz", + "@ax/hwc-linux-x64": { + "name": "@ax/hwc-linux-x64", + "version": "1.2.136", + "integrity": "sha512-SdRxzO5N5FTAHMWfcUffztVdSEW7j0GxV7Zr9rXszCW1Xm2Lu7PHwZH3k4YCTcGqdQ9BUnL3QI3LAlH8/nB6Sg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/hwc-linux-x64/-/hwc-linux-x64-1.2.136.tgz", "os": [ "linux" ], @@ -314,38 +353,11 @@ ], "dependencies": {} }, - "@ax/stc": { - "name": "@ax/stc", - "version": "6.0.146", - "integrity": "sha512-eYeRbTi6UsM3Np3rWJYfZ4p5m/5Md4AcarrvALXzaG5hP2a/08L306gYQhadsOEOVsBpMHlT9GtvV1vovjjctA==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/stc/-/stc-6.0.146.tgz", - "dependencies": { - "@ax/stc-win-x64": "6.0.146", - "@ax/stc-linux-x64": "6.0.146" - } - }, - "@ax/apax-build": { - "name": "@ax/apax-build", - "version": "0.7.0", - "integrity": "sha512-OkmqLq6SI0gv9x/7FLFmABuJYylHHyOzZ4Kvmfys2RGiP06/WbOpycmuqYBneK1zAe3KoBu8ZmelPdXbxcK4+w==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/apax-build/-/apax-build-0.7.0.tgz", - "dependencies": {} - }, - "@ax/st-ls": { - "name": "@ax/st-ls", - "version": "3.0.113", - "integrity": "sha512-NhPfgwF8MQiUoyAr5rZm6cb5UhAHQ3sVvpFZ3+FdXMAMxxPe9i9/NQijKqSga9JJ4HHpUcizYVoOWc2XXA++zw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/st-ls/-/st-ls-3.0.113.tgz", - "dependencies": { - "@ax/st-ls-win-x64": "3.0.113", - "@ax/st-ls-linux-x64": "3.0.113" - } - }, - "@ax/target-llvm-win-x64": { - "name": "@ax/target-llvm-win-x64", - "version": "6.0.146", - "integrity": "sha512-V6h9Gtricl+K8M+gYF0EtWhBcoMeLgfFqARCO6nATelKkTdnJmvzsrr3CYe6nk6KQSk2r2l2U7yiVwyXHs4mOQ==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-llvm-win-x64/-/target-llvm-win-x64-6.0.146.tgz", + "@ax/mod-win-x64": { + "name": "@ax/mod-win-x64", + "version": "1.2.2", + "integrity": "sha512-WLtXvWWc73YFX4FNnETftcD552pSWqDMLwjo8h3oD8sY8oMvjBd0gcF0x4EjZ+gSYv2XCVGi6O2PyHF1zuvmCQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/mod-win-x64/-/mod-win-x64-1.2.2.tgz", "os": [ "win32" ], @@ -354,11 +366,11 @@ ], "dependencies": {} }, - "@ax/target-llvm-linux-x64": { - "name": "@ax/target-llvm-linux-x64", - "version": "6.0.146", - "integrity": "sha512-8WMgh5PeM+Uof7nXQsqk3JEPdXOlK1ljtyNOcOfxlZAcDlHiKTKADMLzO3VFTJkxp6txsRXnSpLlVLsZxknl9g==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-llvm-linux-x64/-/target-llvm-linux-x64-6.0.146.tgz", + "@ax/mod-linux-x64": { + "name": "@ax/mod-linux-x64", + "version": "1.2.2", + "integrity": "sha512-7I5w57z7mfKen9RpAaIsfw7m+dT5C1ey6lvJxwnRHDaPYWEi7ZBu2KSCvzRA1MD6nxpGpPhv9idb0gMX+yCslA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/mod-linux-x64/-/mod-linux-x64-1.2.2.tgz", "os": [ "linux" ], @@ -367,11 +379,11 @@ ], "dependencies": {} }, - "@ax/target-mc7plus-win-x64": { - "name": "@ax/target-mc7plus-win-x64", - "version": "6.0.146", - "integrity": "sha512-06rOSJS1OI6+ApsFoe3sK0jjq3ZTt96sewg7GvEXztGTE/GTINWbbHqzr4TMCV9Fixk8hYWIiW5OAFG/kKDzfA==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-mc7plus-win-x64/-/target-mc7plus-win-x64-6.0.146.tgz", + "@ax/mon-win-x64": { + "name": "@ax/mon-win-x64", + "version": "1.2.2", + "integrity": "sha512-a9V7Ivb6I9iaP5gyNsVb2FCO7n9uBWNVmXQTqta9OMoDVgR96+7BDNOcKNy/QSCDDEeLBf8e2G/WI5Y/DdsByg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/mon-win-x64/-/mon-win-x64-1.2.2.tgz", "os": [ "win32" ], @@ -380,11 +392,11 @@ ], "dependencies": {} }, - "@ax/target-mc7plus-linux-x64": { - "name": "@ax/target-mc7plus-linux-x64", - "version": "6.0.146", - "integrity": "sha512-CGmwLBrT1ZRw9f6L1FylbVHV7l2BP8drp/NJKRAApNBtYuVE5U4H2kndizUKYLR4wbidt6Amu602ncvcJBUKNw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-mc7plus-linux-x64/-/target-mc7plus-linux-x64-6.0.146.tgz", + "@ax/mon-linux-x64": { + "name": "@ax/mon-linux-x64", + "version": "1.2.2", + "integrity": "sha512-0E72/PJiANdykEwSe+JlKMIG+gVIYdp2FbNCUvrcC0PMzh+B0g6CkAWdicYEFzl99EM9RHjZBBuqk0j8PlKDKg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/mon-linux-x64/-/mon-linux-x64-1.2.2.tgz", "os": [ "linux" ], @@ -393,11 +405,11 @@ ], "dependencies": {} }, - "@ax/trace-win-x64": { - "name": "@ax/trace-win-x64", - "version": "2.7.0", - "integrity": "sha512-hQeCiax20UPrSQIOMqSJg6OWdavunL9h6Irnlrgk4ht4hMZrDEWPnuIBfPNG2tAp3780GtefEl8b8QSk5h7jxQ==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/trace-win-x64/-/trace-win-x64-2.7.0.tgz", + "@ax/performance-info-win-x64": { + "name": "@ax/performance-info-win-x64", + "version": "1.1.1", + "integrity": "sha512-KABLJCTUtv27Esi/xOMW8iFA3kDF5ytv0/++YHdCK8C88wm3Q2lqW/Kahi0CkumncK9bZzsDD8awvLtrjDfC1g==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/performance-info-win-x64/-/performance-info-win-x64-1.1.1.tgz", "os": [ "win32" ], @@ -406,11 +418,11 @@ ], "dependencies": {} }, - "@ax/trace-linux-x64": { - "name": "@ax/trace-linux-x64", - "version": "2.7.0", - "integrity": "sha512-LPfdNIbp9+7BuMFL/TtpQXGHrUx/+C1tTFC3YSWscP7TcHzDLWF3yBjqXHaNN01SmCi44S4AwJ9Q2E66QJ0Rtg==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/trace-linux-x64/-/trace-linux-x64-2.7.0.tgz", + "@ax/performance-info-linux-x64": { + "name": "@ax/performance-info-linux-x64", + "version": "1.1.1", + "integrity": "sha512-Hw7+kegtXUyhbYo5XGESBhYyOmrcHoJHnv8hm+lTL4dITNtnI0wx+NTNTavwHZM2S+N3vro9W8QaatN+9QNuuA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/performance-info-linux-x64/-/performance-info-linux-x64-1.1.1.tgz", "os": [ "linux" ], @@ -419,37 +431,37 @@ ], "dependencies": {} }, - "@ax/diagnostic-buffer-win-x64": { - "name": "@ax/diagnostic-buffer-win-x64", - "version": "1.2.0", - "integrity": "sha512-s5TfWFlmB7ibgm9L5TRN7k1hJCkzCNBlNh08GT3uWtmq8pFg5BrYsYVWZe+GRUT1YEcP+0f9oA8Nnj5n1vM+sg==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/diagnostic-buffer-win-x64/-/diagnostic-buffer-win-x64-1.2.0.tgz", + "@ax/plc-info-linux-x64": { + "name": "@ax/plc-info-linux-x64", + "version": "2.4.0", + "integrity": "sha512-xb1/9gaOZeqJeLil3crkbluj6oHxI895YhgqZljjOlvJ/lYqJd9zkZHUOHb6nK686/pEejbLMfvGRTspGDRlLQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/plc-info-linux-x64/-/plc-info-linux-x64-2.4.0.tgz", "os": [ - "win32" + "linux" ], "cpu": [ "x64" ], "dependencies": {} }, - "@ax/diagnostic-buffer-linux-x64": { - "name": "@ax/diagnostic-buffer-linux-x64", - "version": "1.2.0", - "integrity": "sha512-aRm3Qvy4eBwSFBk5990uBfFRVa9E+fKGDJ69ufPL8U4Vw1/ma/cyFHVc8Zqv4ITO8673IClurfWsVIh6Gk4KCw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/diagnostic-buffer-linux-x64/-/diagnostic-buffer-linux-x64-1.2.0.tgz", + "@ax/plc-info-win-x64": { + "name": "@ax/plc-info-win-x64", + "version": "2.4.0", + "integrity": "sha512-4S4uhfYb+yYVIDuN4Nid9ei0mpsTdSKcCv2ZeVo5mLpYWLCh0KfSk8XIoS6zxjD1TlQYcEc+Cnn1+5rdjhpldQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/plc-info-win-x64/-/plc-info-win-x64-2.4.0.tgz", "os": [ - "linux" + "win32" ], "cpu": [ "x64" ], "dependencies": {} }, - "@ax/performance-info-win-x64": { - "name": "@ax/performance-info-win-x64", - "version": "1.1.0", - "integrity": "sha512-yMfgZm2erMxxU3LJytyJKWWA9PN/vIXhZjXPhEpUXn+M+ojg+pXiRy+oLj5Z0Xo8NYd/bz780m/buAaIPMe2Iw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/performance-info-win-x64/-/performance-info-win-x64-1.1.0.tgz", + "@ax/sdb-win-x64": { + "name": "@ax/sdb-win-x64", + "version": "1.2.2", + "integrity": "sha512-WusrkIHXT0UJWoU+lbiFNYBqMHJcg7EkVLATw9wmwlR3RmvufoZAkH1bGSEBPDjIR9D3rIJn5ZvAPdkNIrao1g==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/sdb-win-x64/-/sdb-win-x64-1.2.2.tgz", "os": [ "win32" ], @@ -458,11 +470,11 @@ ], "dependencies": {} }, - "@ax/performance-info-linux-x64": { - "name": "@ax/performance-info-linux-x64", - "version": "1.1.0", - "integrity": "sha512-5rFgfDdfijFVIFRfoQXv4MS/jgrk3Oe8sKJVRFluTs8hkMLg0AlWvVe171YbFOO1D3VI8O1yG8KFu3AKwF3bjw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/performance-info-linux-x64/-/performance-info-linux-x64-1.1.0.tgz", + "@ax/sdb-linux-x64": { + "name": "@ax/sdb-linux-x64", + "version": "1.2.2", + "integrity": "sha512-ekRXF7Id+4SQeyQKlzqQEJy95r6Srv1Yo6oQaylj3Ebn44K4+R87ZFqHDFCCDwcuHm4qswVHdmd7fEw8r+Z3Dw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/sdb-linux-x64/-/sdb-linux-x64-1.2.2.tgz", "os": [ "linux" ], @@ -471,125 +483,119 @@ ], "dependencies": {} }, - "@ax/plc-info-linux-x64": { - "name": "@ax/plc-info-linux-x64", - "version": "2.3.0", - "integrity": "sha512-EUD170olqPo0aSOx/5auP8inlKNON0bstMSjtQDc/bqjXcKRxL6K6sg/JnierRO7OiJ5iXcTLIGO3cOBeXeAAw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/plc-info-linux-x64/-/plc-info-linux-x64-2.3.0.tgz", + "@ax/st-ls-win-x64": { + "name": "@ax/st-ls-win-x64", + "version": "7.1.87", + "integrity": "sha512-IuWpMnUZSAlAPY4waFBg1fXZ+R076DopuBfFrMO0s7jBSi90pIy++vSErYFsnvjUJUX4m2ZJgDXpEC4v5gnvjw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/st-ls-win-x64/-/st-ls-win-x64-7.1.87.tgz", "os": [ - "linux" + "win32" ], "cpu": [ "x64" ], "dependencies": {} }, - "@ax/plc-info-win-x64": { - "name": "@ax/plc-info-win-x64", - "version": "2.3.0", - "integrity": "sha512-10M6F6HQV/nMk9n9pR17xvkx93O1ALOQTlLl3IMFzH9O/DXPSVzb4r3Q7KuVXd7OBpoWzt8Ab/ZvFzp98VXTGw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/plc-info-win-x64/-/plc-info-win-x64-2.3.0.tgz", + "@ax/st-ls-linux-x64": { + "name": "@ax/st-ls-linux-x64", + "version": "7.1.87", + "integrity": "sha512-MdS0rWxLH//zOiLdxhwGSY2lLhj8/+dv5wBmWvf/XOLbrSfzP2KoxongXbXuh5pGUxDI231qTj9jm2ux8MFNlQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/st-ls-linux-x64/-/st-ls-linux-x64-7.1.87.tgz", "os": [ - "win32" + "linux" ], "cpu": [ "x64" ], "dependencies": {} }, - "@ax/certificate-management-win-x64": { - "name": "@ax/certificate-management-win-x64", - "version": "1.1.0", - "integrity": "sha512-iOQqNG3LHJ2m7WVgxFYhHThFJ5UblUGhcDKKxCJqAuGl9v+BPXq3v/8hWKzTqoeQanHNPCSG3+YCKivPFRDEMA==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/certificate-management-win-x64/-/certificate-management-win-x64-1.1.0.tgz", + "@ax/stc-win-x64": { + "name": "@ax/stc-win-x64", + "version": "7.1.87", + "integrity": "sha512-o/IdHsUD7078xheG1eSI6l7BLRavrsMBvCs2sPSyHxS9e+ZwDGUO66BUK+7zq167L5VgO6K7HPdfKdf3tBvNtQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/stc-win-x64/-/stc-win-x64-7.1.87.tgz", "os": [ "win32" ], "cpu": [ "x64" ], - "dependencies": {} + "dependencies": { + "@ax/st-docs": "7.1.87" + } }, - "@ax/certificate-management-linux-x64": { - "name": "@ax/certificate-management-linux-x64", - "version": "1.1.0", - "integrity": "sha512-U+ZfWotWeBjRRfHab2VgeRWtIvm5uh/IGtAkV1ZBebmjejuwgGwZdlfWa6g0pIccX330V6Jl2y+6jCUHjW1wUQ==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/certificate-management-linux-x64/-/certificate-management-linux-x64-1.1.0.tgz", + "@ax/stc-linux-x64": { + "name": "@ax/stc-linux-x64", + "version": "7.1.87", + "integrity": "sha512-4O5v6S6ygy8/ObsgTADy0J0R+Q8usjYQhdHZgzUirEEb8lmhVPDSekJYSFONB/MbK4DJOq7qOw4X8PdVZWG5jQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/stc-linux-x64/-/stc-linux-x64-7.1.87.tgz", "os": [ "linux" ], "cpu": [ "x64" ], - "dependencies": {} - }, - "@ax/system-strings": { - "name": "@ax/system-strings", - "version": "6.0.94", - "integrity": "sha512-iGh5v//U+az23N1SG+rgPassm7mUV6MSdLnE+6a7g1u7e6lHbrsnAbfKqIk7UNHEFFfp52WK1k5B6Igo0s3/1A==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/system-strings/-/system-strings-6.0.94.tgz", "dependencies": { - "@ax/system-math": "6.0.94", - "@ax/system-datetime": "6.0.94" + "@ax/st-docs": "7.1.87" } }, - "@ax/axunitst-runner-linux-x64": { - "name": "@ax/axunitst-runner-linux-x64", - "version": "4.1.8", - "integrity": "sha512-lGNvjBfJeKxmj+uChBH6W4OMSd5Ek515q0WImnd/qiJ4eAsOUMikynFfq9ToY49upVZGOvrkiGFrT9zBTJA8tQ==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-runner-linux-x64/-/axunitst-runner-linux-x64-4.1.8.tgz", + "@ax/target-llvm-win-x64": { + "name": "@ax/target-llvm-win-x64", + "version": "7.1.87", + "integrity": "sha512-Cflw+jt1sijeDiD5vATqAFNY8bPsmW2I7iLd0OIQElQvKSe/c0pIqqwfCg/cSlFk8M9aTTw4xYO3+EjuJYkzRQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-llvm-win-x64/-/target-llvm-win-x64-7.1.87.tgz", "os": [ - "linux" + "win32" ], "cpu": [ "x64" ], "dependencies": {} }, - "@ax/axunitst-runner-win-x64": { - "name": "@ax/axunitst-runner-win-x64", - "version": "4.1.8", - "integrity": "sha512-W7Q9o75ALr3yXCbzMv89vSxQgo8EVnRO8TsNkCetkcf8op/ib2W+4Xh+m/P5X2JgIyVTDmqOPnYu5kHnAXhCzA==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-runner-win-x64/-/axunitst-runner-win-x64-4.1.8.tgz", + "@ax/target-llvm-linux-x64": { + "name": "@ax/target-llvm-linux-x64", + "version": "7.1.87", + "integrity": "sha512-bPDhdCIAvDQqUdpfg9W655F2rcRPHGKnCUHbAuy0HK//yiN6lc7DYLBzXFMAVU9DNhVl1PanTPzH7mHPGrPEBg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-llvm-linux-x64/-/target-llvm-linux-x64-7.1.87.tgz", "os": [ - "win32" + "linux" ], "cpu": [ "x64" ], "dependencies": {} }, - "@ax/axunitst-generator-linux-x64": { - "name": "@ax/axunitst-generator-linux-x64", - "version": "4.1.8", - "integrity": "sha512-pJyNwfYK1LljgFrXD21iGExOhvp4LkBSPKbakLVQGzZFmHpERNrxe3vcsQRZJQip2gGXNTMdnyWRWLQXJ80c2w==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-generator-linux-x64/-/axunitst-generator-linux-x64-4.1.8.tgz", + "@ax/target-mc7plus-win-x64": { + "name": "@ax/target-mc7plus-win-x64", + "version": "7.1.87", + "integrity": "sha512-zZAMac8wPhZ20+wacIGeUuxQdZA6inyXA8V0meuo40U2CW3N9sjOOndFQlnOCrT+BTPce67keZG4938N0DKdGw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-mc7plus-win-x64/-/target-mc7plus-win-x64-7.1.87.tgz", "os": [ - "linux" + "win32" ], "cpu": [ "x64" ], "dependencies": {} }, - "@ax/axunitst-generator-win-x64": { - "name": "@ax/axunitst-generator-win-x64", - "version": "4.1.8", - "integrity": "sha512-IFDotU7DIugAxkkyQPBK7SJAFGfNMHxXHK7QWIKZ3z4a3qLSVzTBZkOWJqo0xPy/3vaPjh/PjfFJs85M0iqOgg==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-generator-win-x64/-/axunitst-generator-win-x64-4.1.8.tgz", + "@ax/target-mc7plus-linux-x64": { + "name": "@ax/target-mc7plus-linux-x64", + "version": "7.1.87", + "integrity": "sha512-bI2GXYZRqkIuDEPJfLWVcMdml9a2nIpwQRXajR8MBpk1OdYwg1Y26yqO1PMw9WjO4MVliTqo5G5C5c4M2mT2uQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-mc7plus-linux-x64/-/target-mc7plus-linux-x64-7.1.87.tgz", "os": [ - "win32" + "linux" ], "cpu": [ "x64" ], "dependencies": {} }, - "@ax/build-native-winx64": { - "name": "@ax/build-native-winx64", - "version": "16.0.3", - "integrity": "sha512-M1qk2yNNsGzz6NXKB0miyfOO4bpYkVcfnGhkHirXcJSLFnWDSx7hnRi0yhLp6jny99RkXEcRn9Cwx8lqynmUDg==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/build-native-winx64/-/build-native-winx64-16.0.3.tgz", + "@ax/trace-win-x64": { + "name": "@ax/trace-win-x64", + "version": "2.8.0", + "integrity": "sha512-7djrSgFyp3MUAy6GmwuCPHrw2mDmF39oO/Zejf5o2t+q/aaWT5+SBJnA48sFoyC40/iYWINR2TsFerV6Ql/wAw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/trace-win-x64/-/trace-win-x64-2.8.0.tgz", "os": [ "win32" ], @@ -598,11 +604,11 @@ ], "dependencies": {} }, - "@ax/build-native-linux": { - "name": "@ax/build-native-linux", - "version": "16.0.3", - "integrity": "sha512-CfqbzR+wPnocP0+pDpb3cYBxdefkS6WvHbGaDNGAoCkK3Y8WnNfWbxXr37e5XIi7iPMZ8BONWaRFIN5h4RMeOA==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/build-native-linux/-/build-native-linux-16.0.3.tgz", + "@ax/trace-linux-x64": { + "name": "@ax/trace-linux-x64", + "version": "2.8.0", + "integrity": "sha512-T9tpz2rS4BlkLWUhSfqP5x0HWhGRW1e/ebmGGMcpjpcs/sKsAU0ROAdVNHWpJF7EYfMkUE28QuPK5UyWDpFPBQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/trace-linux-x64/-/trace-linux-x64-2.8.0.tgz", "os": [ "linux" ], @@ -611,41 +617,47 @@ ], "dependencies": {} }, - "@ax/stc-win-x64": { - "name": "@ax/stc-win-x64", - "version": "6.0.146", - "integrity": "sha512-4hTgmIG54MaWhgxBV8gygU19yilVLfieizhUb08aRXz2o1+YKqd6ifgz1NBAT9RVOgnMj0IJcUynuLo998i1zg==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/stc-win-x64/-/stc-win-x64-6.0.146.tgz", + "@ax/system-strings": { + "name": "@ax/system-strings", + "version": "7.1.47", + "integrity": "sha512-ERClBkAtu1dabBJFMZvA7RUPNwnaXfQC3B81IbRFtWcBTKso6qIgqGe9uku9TdSBYqfrQgwDkxneJtJNDDm5Kg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/system-strings/-/system-strings-7.1.47.tgz", + "dependencies": { + "@ax/system-math": "^7.1.47", + "@ax/system-datetime": "^7.1.47" + } + }, + "@ax/axunitst-test-director-linux-x64": { + "name": "@ax/axunitst-test-director-linux-x64", + "version": "5.2.6", + "integrity": "sha512-FQo2kcqxf6JoPWVZJbO43E1V2yJWrawWajHR+NKdMaAwXWsraH5AFmYKMmbQqiodCW6jBdQ/5dBOivGa0hmuSw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-test-director-linux-x64/-/axunitst-test-director-linux-x64-5.2.6.tgz", "os": [ - "win32" + "linux" ], "cpu": [ "x64" ], - "dependencies": { - "@ax/st-docs": "6.0.146" - } + "dependencies": {} }, - "@ax/stc-linux-x64": { - "name": "@ax/stc-linux-x64", - "version": "6.0.146", - "integrity": "sha512-Cy8psrCe2TB+bCZrCzU4qtPxf0UWzCpdmxOCBC4fEVKnKW6MaBOBt85PAbz6MtAriH4boJY9gMMuPspWlKavPA==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/stc-linux-x64/-/stc-linux-x64-6.0.146.tgz", + "@ax/axunitst-test-director-win-x64": { + "name": "@ax/axunitst-test-director-win-x64", + "version": "5.2.6", + "integrity": "sha512-9gnw1YUW0Jfdpreha7g1GmgFYjhwufPHcSiDKzI/wpozzJYCqc25W9rmkKK0ROcY2X9hMb56kQE0h4O/+ufOWQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-test-director-win-x64/-/axunitst-test-director-win-x64-5.2.6.tgz", "os": [ - "linux" + "win32" ], "cpu": [ "x64" ], - "dependencies": { - "@ax/st-docs": "6.0.146" - } + "dependencies": {} }, - "@ax/st-ls-win-x64": { - "name": "@ax/st-ls-win-x64", - "version": "3.0.113", - "integrity": "sha512-dPj6b2aRhnelCe0BpIcLMLvHbUj2zhfQOtu4jzdZFDPhKICdB9+fTebuYRmP2vna4ogTke22e6f2buwR6VO1Vw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/st-ls-win-x64/-/st-ls-win-x64-3.0.113.tgz", + "@ax/build-native-winx64": { + "name": "@ax/build-native-winx64", + "version": "16.0.3", + "integrity": "sha512-M1qk2yNNsGzz6NXKB0miyfOO4bpYkVcfnGhkHirXcJSLFnWDSx7hnRi0yhLp6jny99RkXEcRn9Cwx8lqynmUDg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/build-native-winx64/-/build-native-winx64-16.0.3.tgz", "os": [ "win32" ], @@ -654,11 +666,11 @@ ], "dependencies": {} }, - "@ax/st-ls-linux-x64": { - "name": "@ax/st-ls-linux-x64", - "version": "3.0.113", - "integrity": "sha512-/QUsNMJrMPRVcCrCD7gkw/xl0VvZ8YEJXxQMWGwkWol3JgxiPjWW/fb7EqpzDU+ij45xy85rBdx29MMHQ3Of9Q==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/st-ls-linux-x64/-/st-ls-linux-x64-3.0.113.tgz", + "@ax/build-native-linux": { + "name": "@ax/build-native-linux", + "version": "16.0.3", + "integrity": "sha512-CfqbzR+wPnocP0+pDpb3cYBxdefkS6WvHbGaDNGAoCkK3Y8WnNfWbxXr37e5XIi7iPMZ8BONWaRFIN5h4RMeOA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/build-native-linux/-/build-native-linux-16.0.3.tgz", "os": [ "linux" ], @@ -667,25 +679,25 @@ ], "dependencies": {} }, + "@ax/st-docs": { + "name": "@ax/st-docs", + "version": "7.1.87", + "integrity": "sha512-J5BthD1BR0fu1dkqQFyW3yOByC14TxhG+b/NUl2zXkSqjnsAQQbNtdheZquZ225x0qkJAR8wRrBx9Kr3QdYg8w==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/st-docs/-/st-docs-7.1.87.tgz", + "dependencies": {} + }, "@ax/system-math": { "name": "@ax/system-math", - "version": "6.0.94", - "integrity": "sha512-lmkqZnJRT6zjAaVEKgWDwB1J7st+rgj/lfJc+6PZ/zgiRxoJ/s7BSTl/6YQ6k12RskKrA4E5VvLiqJhaNd3ssw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/system-math/-/system-math-6.0.94.tgz", + "version": "7.1.47", + "integrity": "sha512-xU30iSLTLTcSLSRrww4tguGUPr4lyiwHJBexUmsLXEBy/OyJqkwEJbY6gzGCJ6ciGXSQUVEkbfKM/blIztMzAA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/system-math/-/system-math-7.1.47.tgz", "dependencies": {} }, "@ax/system-datetime": { "name": "@ax/system-datetime", - "version": "6.0.94", - "integrity": "sha512-8xn57nA5NfZ6ImTxmFGvzFp7wLL38JdUgjsuEg+xbzs29e8ftvbTCNqaWMVdX05N4QNAqohq2BlEkIyFtDH8Qg==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/system-datetime/-/system-datetime-6.0.94.tgz", - "dependencies": {} - }, - "@ax/st-docs": { - "name": "@ax/st-docs", - "version": "6.0.146", - "integrity": "sha512-KUs6JC/dWedgnaxH7UrqAOuJm6rKS4gzXTLguqXbtWHKdDKOceIw1yODyjty4iuOm6TkDm2UX4ya6QFC84eBHA==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/st-docs/-/st-docs-6.0.146.tgz", + "version": "7.1.47", + "integrity": "sha512-yk8erRctiVKHjpe1nca9WUhatotm6S5lEkye4R2XBl7vU7CaPp84q7MzhkSCgQYn08LJqlFRBbxP+bpERiei8g==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/system-datetime/-/system-datetime-7.1.47.tgz", "dependencies": {} } }, diff --git a/src/AXSharp.connectors/tests/ax-test-project/apax.yml b/src/AXSharp.connectors/tests/ax-test-project/apax.yml index ee264b0f8..8eb1f596a 100644 --- a/src/AXSharp.connectors/tests/ax-test-project/apax.yml +++ b/src/AXSharp.connectors/tests/ax-test-project/apax.yml @@ -4,15 +4,19 @@ type: app targets: - "1500" - llvm - - plcsim - - swcpu +variables: + # AXTARGET: $AXTARGET + # AXTARGETPLATFORMINPUT: $AXTARGETPLATFORMINPUT + # AX_USERNAME: $AX_USERNAME + # AX_TARGET_PWD: $AX_TARGET_PWD + # MY_VERY_STRONG_PASSWORD: $AX_TARGET_PWD + COM_CERT_PATH: .\certs\Communication.cer + devDependencies: - "@ax/sdk": 2311.0.1 - # "@ax/stc": ^5.4.89 - #"@ax/sld": ^2.0.5 + "@ax/sdk": 2405.2.0 + "@ax/sld": ^3.0.6-alpha scripts: - postbuild: dotnet run --project - ..//..//..//AXSharp.compiler//src//ixc//AXSharp.ixc.csproj --framework - net7.0 -installStrategy: strict + postbuild: dotnet run --project ..//..//..//AXSharp.compiler//src//ixc//AXSharp.ixc.csproj --framework net9.0 + download: apax sld load --accept-security-disclaimer -t $AXTARGET -i $AXTARGETPLATFORMINPUT -r -C $COM_CERT_PATH --password $AX_TARGET_PWD --username $AX_USERNAME +installStrategy: overridable apaxVersion: 3.1.0 diff --git a/src/AXSharp.connectors/tests/ax-test-project/certs/Communication.cer b/src/AXSharp.connectors/tests/ax-test-project/certs/Communication.cer new file mode 100644 index 000000000..8841b56ed Binary files /dev/null and b/src/AXSharp.connectors/tests/ax-test-project/certs/Communication.cer differ diff --git a/src/AXSharp.connectors/tests/ax-test-project/certs/S71516-hw.cer b/src/AXSharp.connectors/tests/ax-test-project/certs/S71516-hw.cer new file mode 100644 index 000000000..2315d3ac0 Binary files /dev/null and b/src/AXSharp.connectors/tests/ax-test-project/certs/S71516-hw.cer differ diff --git a/src/AXSharp.connectors/tests/ax-test-project/go.ps1 b/src/AXSharp.connectors/tests/ax-test-project/go.ps1 index 59231866e..b93d82e81 100644 --- a/src/AXSharp.connectors/tests/ax-test-project/go.ps1 +++ b/src/AXSharp.connectors/tests/ax-test-project/go.ps1 @@ -5,4 +5,4 @@ $targetInput apax install apax build #apax sld --accept-security-disclaimer -t $targetIP -i $targetInput -r --default-server-interface -apax sld load -t $targetIP -i $targetInput -r --accept-security-disclaimer \ No newline at end of file +#apax sld load -t $targetIP -i $targetInput -r --accept-security-disclaimer diff --git a/src/AXSharp.tools/src/AXSharp.TIA2AX.TranformerTests/AXSharp.TIA2AX.TransformerTests.csproj b/src/AXSharp.tools/src/AXSharp.TIA2AX.TranformerTests/AXSharp.TIA2AX.TransformerTests.csproj index 288320b4c..2a0ddd7ea 100644 --- a/src/AXSharp.tools/src/AXSharp.TIA2AX.TranformerTests/AXSharp.TIA2AX.TransformerTests.csproj +++ b/src/AXSharp.tools/src/AXSharp.TIA2AX.TranformerTests/AXSharp.TIA2AX.TransformerTests.csproj @@ -13,9 +13,15 @@ - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/AXSharp.tools/src/AXSharp.nuget.update/AXSharp.nuget.update.csproj b/src/AXSharp.tools/src/AXSharp.nuget.update/AXSharp.nuget.update.csproj index 000c34993..c1bdd4dfb 100644 --- a/src/AXSharp.tools/src/AXSharp.nuget.update/AXSharp.nuget.update.csproj +++ b/src/AXSharp.tools/src/AXSharp.nuget.update/AXSharp.nuget.update.csproj @@ -1,14 +1,13 @@  - Exe - net7.0;net6.0 + Exe enable enable - - - + + + diff --git a/src/AXSharp.tools/tests/AXSharp.nuget.update.Tests/AXSharp.nuget.update.Tests.csproj b/src/AXSharp.tools/tests/AXSharp.nuget.update.Tests/AXSharp.nuget.update.Tests.csproj index cad425886..0e4023016 100644 --- a/src/AXSharp.tools/tests/AXSharp.nuget.update.Tests/AXSharp.nuget.update.Tests.csproj +++ b/src/AXSharp.tools/tests/AXSharp.nuget.update.Tests/AXSharp.nuget.update.Tests.csproj @@ -1,7 +1,6 @@  - - net7.0;net6.0 + false false diff --git a/src/global.json b/src/global.json index 062f5fef3..6f0362aa9 100644 --- a/src/global.json +++ b/src/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.100" + "version": "9.0.100" } } \ No newline at end of file diff --git a/src/sanbox/integration/ix-integration-plc/ix/.g/Onliners/configuration.g.cs b/src/sanbox/integration/ix-integration-plc/ix/.g/Onliners/configuration.g.cs index 9ed91b722..9e380b6bc 100644 --- a/src/sanbox/integration/ix-integration-plc/ix/.g/Onliners/configuration.g.cs +++ b/src/sanbox/integration/ix-integration-plc/ix/.g/Onliners/configuration.g.cs @@ -9,17 +9,11 @@ public partial class ix_integration_plcTwinController : ITwinController { public AXSharp.Connector.Connector Connector { get; } - public all_primitives all_primitives { get; } - public weather weather { get; } - public weathers weathers { get; } - public Layouts.Stacked.weather weather_stacked { get; } - public Layouts.Wrapped.weather weather_wrapped { get; } - public Layouts.Tabbed.weather weather_tabbed { get; } [ReadOnce()] @@ -27,13 +21,9 @@ public partial class ix_integration_plcTwinController : ITwinController [ReadOnly()] public Layouts.Stacked.weather weather_readOnly { get; } - public example test_example { get; } - public MeasurementExample.Measurements measurements { get; } - public ixcomponent ixcomponent { get; } - public MonsterData.Monster monster { get; } public ix_integration_plcTwinController(AXSharp.Connector.ConnectorAdapter adapter, object[] parameters) diff --git a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/all_primitives.g.cs b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/all_primitives.g.cs index 582540d76..57f353bb1 100644 --- a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/all_primitives.g.cs +++ b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/all_primitives.g.cs @@ -11,35 +11,20 @@ public all_primitives() } public Boolean myBOOL { get; set; } - public Byte myBYTE { get; set; } - public UInt16 myWORD { get; set; } - public UInt32 myDWORD { get; set; } - public UInt64 myLWORD { get; set; } - public SByte mySINT { get; set; } - public Int16 myINT { get; set; } - public Int32 myDINT { get; set; } - public Int64 myLINT { get; set; } - public Byte myUSINT { get; set; } - public UInt16 myUINT { get; set; } - public UInt32 myUDINT { get; set; } - public UInt64 myULINT { get; set; } - public Single myREAL { get; set; } - 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); diff --git a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/configuration.g.cs b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/configuration.g.cs index c892c64a2..7fd2149b5 100644 --- a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/configuration.g.cs +++ b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/configuration.g.cs @@ -1,30 +1,35 @@ using System; using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -using Pocos.MonsterData; +using MonsterData.Pocos; namespace Pocos { public partial class ix_integration_plcTwinController { - public all_primitives all_primitives { get; set; } = new all_primitives(); - public weather weather { get; set; } = new weather(); - public weathers weathers { get; set; } = new weathers(); + public global::Pocos.all_primitives all_primitives { get; set; } = new global::Pocos.all_primitives(); + public global::Pocos.weather weather { get; set; } = new global::Pocos.weather(); + public global::Pocos.weathers weathers { get; set; } = new global::Pocos.weathers(); + [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "Weather in a stack pannel and grouped in group box")] - public Layouts.Stacked.weather weather_stacked { get; set; } = new Layouts.Stacked.weather(); + public Layouts.Stacked.Pocos.weather weather_stacked { get; set; } = new Layouts.Stacked.Pocos.weather(); + [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "Weather in a wrap pannel and grouped in group box")] - public Layouts.Wrapped.weather weather_wrapped { get; set; } = new Layouts.Wrapped.weather(); + public Layouts.Wrapped.Pocos.weather weather_wrapped { get; set; } = new Layouts.Wrapped.Pocos.weather(); + [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "Weather in a tabs and grouped in group box")] - public Layouts.Tabbed.weather weather_tabbed { get; set; } = new Layouts.Tabbed.weather(); + public Layouts.Tabbed.Pocos.weather weather_tabbed { get; set; } = new Layouts.Tabbed.Pocos.weather(); + [ReadOnce()] [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "Weather structure set to read once")] - public Layouts.Stacked.weather weather_readOnce { get; set; } = new Layouts.Stacked.weather(); + public Layouts.Stacked.Pocos.weather weather_readOnce { get; set; } = new Layouts.Stacked.Pocos.weather(); + [ReadOnly()] [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "Weather structure set to read only")] - public Layouts.Stacked.weather weather_readOnly { get; set; } = new Layouts.Stacked.weather(); - public example test_example { get; set; } = new example(); - public MeasurementExample.Measurements measurements { get; set; } = new MeasurementExample.Measurements(); - public ixcomponent ixcomponent { get; set; } = new ixcomponent(); - public MonsterData.Monster monster { get; set; } = new MonsterData.Monster(); + public Layouts.Stacked.Pocos.weather weather_readOnly { get; set; } = new Layouts.Stacked.Pocos.weather(); + public global::Pocos.example test_example { get; set; } = new global::Pocos.example(); + public MeasurementExample.Pocos.Measurements measurements { get; set; } = new MeasurementExample.Pocos.Measurements(); + public global::Pocos.ixcomponent ixcomponent { get; set; } = new global::Pocos.ixcomponent(); + public MonsterData.Pocos.Monster monster { get; set; } = new MonsterData.Pocos.Monster(); } } \ No newline at end of file diff --git a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/example.g.cs b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/example.g.cs index 82a32939e..46178f896 100644 --- a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/example.g.cs +++ b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/example.g.cs @@ -11,33 +11,43 @@ public example() } [Container(Layout.Stack)] - public test_primitive primitives_stack { get; set; } = new test_primitive(); + public global::Pocos.test_primitive primitives_stack { get; set; } = new global::Pocos.test_primitive(); + [Container(Layout.Wrap)] - public test_primitive primitives_wrap { get; set; } = new test_primitive(); + public global::Pocos.test_primitive primitives_wrap { get; set; } = new global::Pocos.test_primitive(); + [Container(Layout.Tabs)] - public test_primitive primitives_tabs { get; set; } = new test_primitive(); + public global::Pocos.test_primitive primitives_tabs { get; set; } = new global::Pocos.test_primitive(); + [Container(Layout.UniformGrid)] - public test_primitive primitives_uniform { get; set; } = new test_primitive(); + public global::Pocos.test_primitive primitives_uniform { get; set; } = new global::Pocos.test_primitive(); + [Container(Layout.Stack)] [Group(GroupLayout.GroupBox)] - public test_primitive test_groupbox { get; set; } = new test_primitive(); + public global::Pocos.test_primitive test_groupbox { get; set; } = new global::Pocos.test_primitive(); + [Container(Layout.Stack)] [Group(GroupLayout.Border)] - public test_primitive test_border { get; set; } = new test_primitive(); + public global::Pocos.test_primitive test_border { get; set; } = new global::Pocos.test_primitive(); + [Container(Layout.Tabs)] [Group(GroupLayout.GroupBox)] - public groupbox testgroupbox { get; set; } = new groupbox(); - public border testborder { get; set; } = new border(); - public ixcomponent ixcomponent_instance { get; set; } = new ixcomponent(); - public MySecondNamespace.ixcomponent ixcomponent_instance2 { get; set; } = new MySecondNamespace.ixcomponent(); - public ThirdNamespace.ixcomponent ixcomponent_instance3 { get; set; } = new ThirdNamespace.ixcomponent(); + public global::Pocos.groupbox testgroupbox { get; set; } = new global::Pocos.groupbox(); + public global::Pocos.border testborder { get; set; } = new global::Pocos.border(); + public global::Pocos.ixcomponent ixcomponent_instance { get; set; } = new global::Pocos.ixcomponent(); + public MySecondNamespace.Pocos.ixcomponent ixcomponent_instance2 { get; set; } = new MySecondNamespace.Pocos.ixcomponent(); + public ThirdNamespace.Pocos.ixcomponent ixcomponent_instance3 { get; set; } = new ThirdNamespace.Pocos.ixcomponent(); + [Container(Layout.Stack)] - public compositeLayout compositeStack { get; set; } = new compositeLayout(); + public global::Pocos.compositeLayout compositeStack { get; set; } = new global::Pocos.compositeLayout(); + [Container(Layout.Wrap)] - public compositeLayout compositeWrap { get; set; } = new compositeLayout(); + public global::Pocos.compositeLayout compositeWrap { get; set; } = new global::Pocos.compositeLayout(); + [Container(Layout.UniformGrid)] - public compositeLayout compositeUniform { get; set; } = new compositeLayout(); + public global::Pocos.compositeLayout compositeUniform { get; set; } = new global::Pocos.compositeLayout(); + [Container(Layout.Tabs)] - public compositeLayout compositeTabs { get; set; } = new compositeLayout(); + public global::Pocos.compositeLayout compositeTabs { get; set; } = new global::Pocos.compositeLayout(); } } \ No newline at end of file diff --git a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/geolocation.g.cs b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/geolocation.g.cs index a3b524f2a..c9e4405bb 100644 --- a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/geolocation.g.cs +++ b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/geolocation.g.cs @@ -26,6 +26,7 @@ public GeoLocation() [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "Short descriptor")] public string Description { get; set; } = string.Empty; + [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "Long descriptor")] public string LongDescription { get; set; } = string.Empty; } diff --git a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/ixcomponent.g.cs b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/ixcomponent.g.cs index d1e660f4f..e57b1d6b7 100644 --- a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/ixcomponent.g.cs +++ b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/ixcomponent.g.cs @@ -15,11 +15,15 @@ public ixcomponent() [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "My string")] public string my_string { get; set; } = string.Empty; + [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "My bool")] public Boolean my_bool { get; set; } } +} - namespace MySecondNamespace +namespace MySecondNamespace +{ + namespace Pocos { public partial class ixcomponent : AXSharp.Connector.IPlain { @@ -32,12 +36,16 @@ public ixcomponent() [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "My string")] public string my_string { get; set; } = string.Empty; + [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "My bool")] public Boolean my_bool { get; set; } } } +} - namespace ThirdNamespace +namespace ThirdNamespace +{ + namespace Pocos { public partial class ixcomponent : AXSharp.Connector.IPlain { @@ -50,6 +58,7 @@ public ixcomponent() [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "My string")] public string my_string { get; set; } = string.Empty; + [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "My bool")] public Boolean my_bool { get; set; } } diff --git a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/measurement.g.cs b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/measurement.g.cs index 7904dd16d..cb5c3804d 100644 --- a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/measurement.g.cs +++ b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/measurement.g.cs @@ -2,9 +2,9 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace MeasurementExample { - namespace MeasurementExample + namespace Pocos { public partial class Measurement : AXSharp.Connector.IPlain { @@ -25,7 +25,10 @@ public Measurement() [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "Measurement Result")] public Int16 Result { get; set; } } + } + namespace Pocos + { public partial class Measurements : AXSharp.Connector.IPlain { public Measurements() @@ -35,19 +38,22 @@ public Measurements() [Container(Layout.Stack)] [Group(GroupLayout.GroupBox)] [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "Stack panel")] - public MeasurementExample.Measurement measurement_stack { get; set; } = new MeasurementExample.Measurement(); + public MeasurementExample.Pocos.Measurement measurement_stack { get; set; } = new MeasurementExample.Pocos.Measurement(); + [Container(Layout.Wrap)] [Group(GroupLayout.GroupBox)] [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "Wrap panel")] - public MeasurementExample.Measurement measurement_wrap { get; set; } = new MeasurementExample.Measurement(); + public MeasurementExample.Pocos.Measurement measurement_wrap { get; set; } = new MeasurementExample.Pocos.Measurement(); + [Container(Layout.UniformGrid)] [Group(GroupLayout.GroupBox)] [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "Grid")] - public MeasurementExample.Measurement measurement_grid { get; set; } = new MeasurementExample.Measurement(); + public MeasurementExample.Pocos.Measurement measurement_grid { get; set; } = new MeasurementExample.Pocos.Measurement(); + [Container(Layout.Tabs)] [Group(GroupLayout.GroupBox)] [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "Tabs")] - public MeasurementExample.Measurement measurement_tabs { get; set; } = new MeasurementExample.Measurement(); + public MeasurementExample.Pocos.Measurement measurement_tabs { get; set; } = new MeasurementExample.Pocos.Measurement(); } } } \ No newline at end of file diff --git a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/monster.g.cs b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/monster.g.cs index e895f70d1..d898cbee0 100644 --- a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/monster.g.cs +++ b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/monster.g.cs @@ -2,36 +2,42 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace MonsterData { - namespace MonsterData + namespace Pocos { public partial class MonsterBase : AXSharp.Connector.IPlain { public MonsterBase() { #pragma warning disable CS0612 - AXSharp.Connector.BuilderHelpers.Arrays.InstantiateArray(ArrayOfDrives, () => new MonsterData.DriveBase(), new[] { (0, 3) }); + AXSharp.Connector.BuilderHelpers.Arrays.InstantiateArray(ArrayOfDrives, () => new MonsterData.Pocos.DriveBase(), new[] { (0, 3) }); #pragma warning restore CS0612 #pragma warning disable CS0612 - AXSharp.Connector.BuilderHelpers.Arrays.InstantiateArray(ArrayOfIxComponent, () => new ixcomponent(), new[] { (0, 3) }); + AXSharp.Connector.BuilderHelpers.Arrays.InstantiateArray(ArrayOfIxComponent, () => new global::Pocos.ixcomponent(), new[] { (0, 3) }); #pragma warning restore CS0612 } public Byte[] ArrayOfBytes { get; set; } = new Byte[4]; - public MonsterData.DriveBase[] ArrayOfDrives { get; set; } = new MonsterData.DriveBase[4]; - public ixcomponent[] ArrayOfIxComponent { get; set; } = new ixcomponent[4]; + public MonsterData.Pocos.DriveBase[] ArrayOfDrives { get; set; } = new MonsterData.Pocos.DriveBase[4]; + public global::Pocos.ixcomponent[] ArrayOfIxComponent { get; set; } = new global::Pocos.ixcomponent[4]; } + } - public partial class Monster : MonsterData.MonsterBase, AXSharp.Connector.IPlain + namespace Pocos + { + public partial class Monster : MonsterData.Pocos.MonsterBase, AXSharp.Connector.IPlain { public Monster() : base() { } - public MonsterData.DriveBase DriveA { get; set; } = new MonsterData.DriveBase(); + public MonsterData.Pocos.DriveBase DriveA { get; set; } = new MonsterData.Pocos.DriveBase(); } + } + namespace Pocos + { public partial class DriveBase : AXSharp.Connector.IPlain { public DriveBase() @@ -39,11 +45,8 @@ public DriveBase() } public Double Position { get; set; } - public Double Velo { get; set; } - public Double Acc { get; set; } - public Double Dcc { get; set; } } } diff --git a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/program.g.cs b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/program.g.cs index e23d372b9..da1480552 100644 --- a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/program.g.cs +++ b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/program.g.cs @@ -1,7 +1,3 @@ using System; using AXSharp.Abstractions.Presentation; -using AXSharp.Connector; - -namespace Pocos -{ -} \ No newline at end of file +using AXSharp.Connector; \ No newline at end of file diff --git a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/stacked/weather.g.cs b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/stacked/weather.g.cs index 9f5f7a0b6..ceaa0cf9f 100644 --- a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/stacked/weather.g.cs +++ b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/stacked/weather.g.cs @@ -2,11 +2,11 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace Layouts.Stacked { - namespace Layouts.Stacked + namespace Pocos { - public partial class weather : weatherBase, AXSharp.Connector.IPlain + public partial class weather : global::Pocos.weatherBase, AXSharp.Connector.IPlain { public weather() : base() { diff --git a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/tabbed/weather.g.cs b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/tabbed/weather.g.cs index fd02cdd14..4c963ac7e 100644 --- a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/tabbed/weather.g.cs +++ b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/tabbed/weather.g.cs @@ -2,11 +2,11 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace Layouts.Tabbed { - namespace Layouts.Tabbed + namespace Pocos { - public partial class weather : weatherBase, AXSharp.Connector.IPlain + public partial class weather : global::Pocos.weatherBase, AXSharp.Connector.IPlain { public weather() : base() { diff --git a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/test/border.g.cs b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/test/border.g.cs index 57910bd89..d854bc5f9 100644 --- a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/test/border.g.cs +++ b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/test/border.g.cs @@ -18,6 +18,7 @@ public border() [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "<#STRING From PLC#>")] public string testString { get; set; } = string.Empty; + [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "<#WORD From PLC#>")] public UInt16 testWord { get; set; } @@ -35,10 +36,13 @@ public border() [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "<#DATE From PLC#>")] public DateOnly TestDate { get; set; } = default(DateOnly); + [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "<#DATE_AND_TIME From PLC#>")] public DateTime TestDateTime { get; set; } = default(DateTime); + [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "<#TIME_OF_DAY From PLC#>")] public TimeSpan TestTimeOfDay { get; set; } = default(TimeSpan); + [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "<#ENUM Station status#>")] public global::enumStationStatus Status { get; set; } } diff --git a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/test/enumStationStatus.g.cs b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/test/enumStationStatus.g.cs index e23d372b9..da1480552 100644 --- a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/test/enumStationStatus.g.cs +++ b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/test/enumStationStatus.g.cs @@ -1,7 +1,3 @@ using System; using AXSharp.Abstractions.Presentation; -using AXSharp.Connector; - -namespace Pocos -{ -} \ No newline at end of file +using AXSharp.Connector; \ No newline at end of file diff --git a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/test/groupbox.g.cs b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/test/groupbox.g.cs index 2052b51de..9de086dbd 100644 --- a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/test/groupbox.g.cs +++ b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/test/groupbox.g.cs @@ -18,6 +18,7 @@ public groupbox() [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "<#STRING From PLC#>")] public string testString { get; set; } = string.Empty; + [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "<#WORD From PLC#>")] public UInt16 testWord { get; set; } @@ -35,10 +36,13 @@ public groupbox() [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "<#DATE From PLC#>")] public DateOnly TestDate { get; set; } = default(DateOnly); + [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "<#DATE_AND_TIME From PLC#>")] public DateTime TestDateTime { get; set; } = default(DateTime); + [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "<#TIME_OF_DAY From PLC#>")] public TimeSpan TestTimeOfDay { get; set; } = default(TimeSpan); + [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "<#ENUM Station status#>")] public global::enumStationStatus Status { get; set; } } diff --git a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/test/test_primitive.g.cs b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/test/test_primitive.g.cs index 7ce74e85a..8330ff3da 100644 --- a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/test/test_primitive.g.cs +++ b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/test/test_primitive.g.cs @@ -18,6 +18,7 @@ public test_primitive() [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "<#STRING From PLC#>")] public string testString { get; set; } = string.Empty; + [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "<#WORD From PLC#>")] public UInt16 testWord { get; set; } @@ -35,10 +36,13 @@ public test_primitive() [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "<#DATE From PLC#>")] public DateOnly TestDate { get; set; } = default(DateOnly); + [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "<#DATE_AND_TIME From PLC#>")] public DateTime TestDateTime { get; set; } = default(DateTime); + [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "<#TIME_OF_DAY From PLC#>")] public TimeSpan TestTimeOfDay { get; set; } = default(TimeSpan); + [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "<#ENUM Station status#>")] public global::enumStationStatus Status { get; set; } } diff --git a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/weather.g.cs b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/weather.g.cs index 34bdaab5a..8c60358ed 100644 --- a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/weather.g.cs +++ b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/weather.g.cs @@ -10,26 +10,26 @@ public weather() { } - public GeoLocation GeoLocation { get; set; } = new GeoLocation(); + public global::Pocos.GeoLocation GeoLocation { get; set; } = new global::Pocos.GeoLocation(); public Single Temperature { get; set; } - public Single Humidity { get; set; } - public string Location { get; set; } = string.Empty; public Single ChillFactor { get; set; } - public global::Feeling Feeling { get; set; } } +} +namespace Pocos +{ public partial class weathers : AXSharp.Connector.IPlain { public weathers() { #pragma warning disable CS0612 - AXSharp.Connector.BuilderHelpers.Arrays.InstantiateArray(i, () => new weatherBase(), new[] { (0, 50) }); + AXSharp.Connector.BuilderHelpers.Arrays.InstantiateArray(i, () => new global::Pocos.weatherBase(), new[] { (0, 50) }); #pragma warning restore CS0612 } - public weatherBase[] i { get; set; } = new weatherBase[51]; + public global::Pocos.weatherBase[] i { get; set; } = new global::Pocos.weatherBase[51]; } } \ No newline at end of file diff --git a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/weatherBase.g.cs b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/weatherBase.g.cs index 2f8211a49..866acf99c 100644 --- a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/weatherBase.g.cs +++ b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/weatherBase.g.cs @@ -11,14 +11,13 @@ public weatherBase() } public Single Latitude { get; set; } - public Single Longitude { get; set; } - public Single Altitude { get; set; } - public string Description { get; set; } = string.Empty; + [ReadOnly()] public string LongDescription { get; set; } = string.Empty; + [ReadOnce()] [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "this has [ReadOnce()] attribute will be readon only once...")] public Int16 StartCounter { get; set; } @@ -26,15 +25,19 @@ public weatherBase() [RenderIgnore()] [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "[RenderIgnore()] must not be displayed!")] public string RenderIgnoreAllToghether { get; set; } = string.Empty; + [RenderIgnore("Control")] [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "[RenderIgnore(''Control'')]")] public string RenderIgnoreWhenControl { get; set; } = string.Empty; + [RenderIgnore("Display")] [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "[RenderIgnore(''Display'')]")] public string RenderIgnoreWhenDisplay { get; set; } = string.Empty; + [RenderIgnore("Control", "ShadowControl")] [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "[RenderIgnore(''Control'', ''ShadowControl'')]")] public string RenderIgnoreWhenControlAndShadow { get; set; } = string.Empty; + [RenderIgnore("Display", "ShadowDisplay")] [AXSharp.Connector.AddedPropertiesAttribute("AttributeName", "[RenderIgnore(''Display'', ''ShadowDisplay'')]")] public string RenderIgnoreWhenDisplayAndShadow { get; set; } = string.Empty; diff --git a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/wrapped/weather.g.cs b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/wrapped/weather.g.cs index 0236c8dd1..8e5eba84d 100644 --- a/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/wrapped/weather.g.cs +++ b/src/sanbox/integration/ix-integration-plc/ix/.g/POCO/wrapped/weather.g.cs @@ -2,11 +2,11 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace Layouts.Wrapped { - namespace Layouts.Wrapped + namespace Pocos { - public partial class weather : weatherBase, AXSharp.Connector.IPlain + public partial class weather : global::Pocos.weatherBase, AXSharp.Connector.IPlain { public weather() : base() { diff --git a/src/tests.integrations/integrated/src/ax/apax-lock.json b/src/tests.integrations/integrated/src/ax/apax-lock.json index 18e297afa..bc167ce5a 100644 --- a/src/tests.integrations/integrated/src/ax/apax-lock.json +++ b/src/tests.integrations/integrated/src/ax/apax-lock.json @@ -2,228 +2,267 @@ "name": "integrated", "version": "0.0.0", "lockFileVersion": "2", - "installStrategy": "strict", + "installStrategy": "overridable", "root": { "name": "integrated", "version": "0.0.0", "devDependencies": { - "@ax/sdk": "^2311.0.1" + "@ax/sdk": "2405.2.0", + "@ax/sld": "^3.0.6-alpha" } }, "packages": { "@ax/sdk": { "name": "@ax/sdk", - "version": "2311.0.1", - "integrity": "sha512-uPAnfHnc9Tl7ugVFjA3Qc7K1CNwEF7CPfMRdZS/hO2aNeMXLlfxOc/Mm1R5hP8pF+XQgjhyvwm/Zy/e1rghKWQ==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/sdk/-/sdk-2311.0.1.tgz", + "version": "2405.2.0", + "integrity": "sha512-JSpi1qbj3sihdr0uKJoxYczqj/E6+gB8x/btVAScgzRkxmrm0yYm6T+0d/AuxZKWGbvhy6xNu+5hiNgRBut8Sw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/sdk/-/sdk-2405.2.0.tgz", "dependencies": { - "@ax/axunitst": "4.1.8", - "@ax/axunitst-ls-contrib": "4.1.8", - "@ax/mod": "1.0.4", - "@ax/mon": "1.0.4", - "@ax/sdb": "1.0.4", - "@ax/sld": "2.0.5", - "@ax/st": "2311.0.1", - "@ax/target-llvm": "6.0.146", - "@ax/target-mc7plus": "6.0.146", - "@ax/simatic-pragma-stc-plugin": "2.0.12", - "@ax/trace": "2.7.0", - "@ax/diagnostic-buffer": "1.2.0", - "@ax/performance-info": "1.1.0", - "@ax/plc-info": "2.3.0", - "@ax/certificate-management": "1.1.0" + "@ax/apax-build": "1.1.0", + "@ax/axunitst": "5.2.6", + "@ax/axunitst-ls-contrib": "5.2.6", + "@ax/certificate-management": "1.1.2", + "@ax/diagnostic-buffer": "1.3.1", + "@ax/hwc": "1.2.136", + "@ax/hwld": "1.0.75", + "@ax/mod": "1.2.2", + "@ax/mon": "1.2.2", + "@ax/performance-info": "1.1.1", + "@ax/plc-info": "2.4.0", + "@ax/sdb": "1.2.2", + "@ax/simatic-pragma-stc-plugin": "4.0.18", + "@ax/sld": "2.5.10", + "@ax/st-ls": "7.1.87", + "@ax/stc": "7.1.87", + "@ax/target-llvm": "7.1.87", + "@ax/target-mc7plus": "7.1.87", + "@ax/trace": "2.8.0" + } + }, + "@ax/sld": { + "name": "@ax/sld", + "version": "3.0.6", + "integrity": "sha512-j90GJh1jMIpvB521EIxvTq6rhr8OO+6qqwsXn2Of7GxQrzwWi+NEXe9ss/ccFAKL0I7aEGD+SIW8jVHUgMAvow==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/sld/-/sld-3.0.6.tgz", + "cpu": [ + "x64" + ], + "dependencies": {} + }, + "@ax/apax-build": { + "name": "@ax/apax-build", + "version": "1.1.0", + "integrity": "sha512-QzEMiuu3Z+wX9bBLxGclyVTJRi4tP3lL1dm0h2vV5QTn0NxX4tBlVhZQZu9ovi6ZFbxCuvwhC3aF+WW9tyvi+g==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/apax-build/-/apax-build-1.1.0.tgz", + "dependencies": { + "@ax/simatic-package-tool": "^1.0.3", + "@ax/st-resources.stc-plugin": "^1.0.3" } }, "@ax/axunitst": { "name": "@ax/axunitst", - "version": "4.2.4", - "integrity": "sha512-PO3f185FtNodDaOm7hd9CIs1nmyVd+B+JbObY7JFovtc6xvyZh39b5U6VZ9C56nEkAYxPs8hjFadg5n0P7fr7w==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst/-/axunitst-4.2.4.tgz", + "version": "5.2.6", + "integrity": "sha512-j2gfKb3tperrm4aRuFWlh0dvvqBya055+FiIo0PJyIT7bRlNLTgu0OSRulObAUn9rJBZL8OkOmGjz2Wsz9gipA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst/-/axunitst-5.2.6.tgz", "dependencies": { - "@ax/axunitst-library": "4.2.4", - "@ax/axunitst-runner": "4.2.4", - "@ax/axunitst-generator": "4.2.4", - "@ax/axunitst-llvm-runner-gen": "4.2.4", - "@ax/axunitst-docs": "4.2.4", + "@ax/axunitst-library": "5.2.6", + "@ax/axunitst-test-director": "5.2.6", + "@ax/axunitst-docs": "5.2.6", "@ax/build-native": "16.0.3" } }, "@ax/axunitst-ls-contrib": { "name": "@ax/axunitst-ls-contrib", - "version": "4.2.4", - "integrity": "sha512-ehiyIFW55HIN1FM0/ZVwiWXPJlSKHjSfwEEqttaSVoDl7rk/10XWkvTC4Mbw+zFnhlraMyPyARXdx38NXqGA6g==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-ls-contrib/-/axunitst-ls-contrib-4.2.4.tgz", + "version": "5.2.6", + "integrity": "sha512-EYUQje4GcJSV3efTe1WqYanxV54dO0kuxrtBLUhpQ20JezqVRYUE4BQF4jpfnhGJVFs4rW5J3BAlYEaBBhW7pg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-ls-contrib/-/axunitst-ls-contrib-5.2.6.tgz", "dependencies": {} }, - "@ax/mod": { - "name": "@ax/mod", + "@ax/certificate-management": { + "name": "@ax/certificate-management", "version": "1.1.2", - "integrity": "sha512-h1QdEg6UJcKFa6rCr6BgMSliqnlgpJq1uq4f8o05U/aoc0BdO2F93ReqMGGCeR+0nMjxRfmGf9fRrroXAxDH7A==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/mod/-/mod-1.1.2.tgz", + "integrity": "sha512-BBEJUjE+WjldDxzeCdVBTXkXtWEO3HK+fdS1frKiIOqmmpeAGfJ01P0qRhNcdzF+ORApQvkBBYorP9Son0nUWA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/certificate-management/-/certificate-management-1.1.2.tgz", "dependencies": { - "@ax/mod-win-x64": "1.1.2", - "@ax/mod-linux-x64": "1.1.2" + "@ax/certificate-management-win-x64": "1.1.2", + "@ax/certificate-management-linux-x64": "1.1.2" } }, - "@ax/mon": { - "name": "@ax/mon", - "version": "1.1.2", - "integrity": "sha512-KMMxXTmAuwkvqroapb7qisRxnFvARHvZjahbtGMwcYveWa90NNLpatG2FJ03Op9VQk8MXXXV6o2LXQT/rJQFMg==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/mon/-/mon-1.1.2.tgz", + "@ax/diagnostic-buffer": { + "name": "@ax/diagnostic-buffer", + "version": "1.3.1", + "integrity": "sha512-BcaeNIDHYaqjLnCqHKa+LrWm/wQf7wt0q7ET7Yxk9sTbePsKF5+1QBm+PjQZCqn/XfqPnDzSj4YKLMNdP7fGgQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/diagnostic-buffer/-/diagnostic-buffer-1.3.1.tgz", "dependencies": { - "@ax/mon-win-x64": "1.1.2", - "@ax/mon-linux-x64": "1.1.2" + "@ax/diagnostic-buffer-win-x64": "1.3.1", + "@ax/diagnostic-buffer-linux-x64": "1.3.1" } }, - "@ax/sdb": { - "name": "@ax/sdb", - "version": "1.1.2", - "integrity": "sha512-/f2BeQtS7P/oMGnn6uVqWMUXGOJ5qp8ULa3rz6sVCIp4qOwCtZr4p+wBR9+BFpnlzqB/FpXNPnrKbq1cCC+soQ==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/sdb/-/sdb-1.1.2.tgz", + "@ax/hwc": { + "name": "@ax/hwc", + "version": "1.2.136", + "integrity": "sha512-nEdtkEahm70iwSQtaI1s+M9ArYNIdG6/8uxqkgOj8ZYm/HNqm+yv3Iu9cSJHe6gz5YVreJhfu0LE7wgNRnMkmw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/hwc/-/hwc-1.2.136.tgz", "dependencies": { - "@ax/sdb-win-x64": "1.1.2", - "@ax/sdb-linux-x64": "1.1.2" + "@ax/hwc-win-x64": "1.2.136", + "@ax/hwc-linux-x64": "1.2.136" } }, - "@ax/sld": { - "name": "@ax/sld", - "version": "2.0.5", - "integrity": "sha512-upa0HyRVdYyzNu6j7E+gTAnpzP2mfZxvo+0jbm8H6Ci9ergL56SHaCVBC35PnociMZpdZ5d1/LTy6f8lwpDxXA==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/sld/-/sld-2.0.5.tgz", + "@ax/hwld": { + "name": "@ax/hwld", + "version": "1.0.75", + "integrity": "sha512-hIL04LpIP80oIIK0bTSaGKYItdbGyQR9GXCdo6eeFRgQiN8sLJvG0/If0nmv22QFNYwpjjRbqUF9sVHrMneinA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/hwld/-/hwld-1.0.75.tgz", "cpu": [ "x64" ], "dependencies": {} }, - "@ax/st": { - "name": "@ax/st", - "version": "2311.1.2", - "integrity": "sha512-uAj/R9YNHQC+iMg82CF9W6RszIUR4Hb9SeZas+ejBt3yBAMi6QEIL5hf5heIa2iYP685sjS0E2Ky2HB91rXSmw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/st/-/st-2311.1.2.tgz", + "@ax/mod": { + "name": "@ax/mod", + "version": "1.2.2", + "integrity": "sha512-X5hmfil9iQoe7s+8hxUN90n9+x7RGMaCJ5an2xP6t3Ch1BolhoPe5oZPt79z/4p1kXIef4bO7/7l5cNoVf1INA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/mod/-/mod-1.2.2.tgz", "dependencies": { - "@ax/stc": "6.1.59", - "@ax/apax-build": "0.8.0", - "@ax/st-ls": "6.1.59" + "@ax/mod-win-x64": "1.2.2", + "@ax/mod-linux-x64": "1.2.2" } }, - "@ax/target-llvm": { - "name": "@ax/target-llvm", - "version": "6.1.59", - "integrity": "sha512-e8NPNMrdMagJaPisIrdSG16kEHfMqGlO273f0EvBzL9duXIbcvgzKhYvDkAydSywUY0wzTMcvlikU9o6YuMZmw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-llvm/-/target-llvm-6.1.59.tgz", + "@ax/mon": { + "name": "@ax/mon", + "version": "1.2.2", + "integrity": "sha512-JPI5kMod5iNwVHX7HmW7+VP6CC9MpLH/vSPWBMWOqwO5egl82BJ7bzjBvqs8cxLGUg0DXLph39f5kxLeH+hZLg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/mon/-/mon-1.2.2.tgz", "dependencies": { - "@ax/target-llvm-win-x64": "6.1.59", - "@ax/target-llvm-linux-x64": "6.1.59" + "@ax/mon-win-x64": "1.2.2", + "@ax/mon-linux-x64": "1.2.2" } }, - "@ax/target-mc7plus": { - "name": "@ax/target-mc7plus", - "version": "6.1.59", - "integrity": "sha512-O6+IlgLK0QxN9/EOJ4sUat9yZUZjc0ZtK659He3zuOagIA0jaFSUmPv4vUZihZ59+6uYIOTpYkAJdgwkrcg/cQ==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-mc7plus/-/target-mc7plus-6.1.59.tgz", + "@ax/performance-info": { + "name": "@ax/performance-info", + "version": "1.1.1", + "integrity": "sha512-jfegiHImUyE0RH0wMRXLoF72QGoNjLN5DB6pIih+6jj5CxA/5xwfA57j85RUEk8CZMySibvT2nQVzJHOeSWvGw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/performance-info/-/performance-info-1.1.1.tgz", + "dependencies": { + "@ax/performance-info-win-x64": "1.1.1", + "@ax/performance-info-linux-x64": "1.1.1" + } + }, + "@ax/plc-info": { + "name": "@ax/plc-info", + "version": "2.4.0", + "integrity": "sha512-dOdzSN7yGCdLeKv1ET1BWlNqg+mskhNoe4WYmOA25Dq5OWvkgCnnHGjjRgo7bw4ZGWctPzE/vKjlX9diNAa6Og==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/plc-info/-/plc-info-2.4.0.tgz", "dependencies": { - "@ax/target-mc7plus-win-x64": "6.1.59", - "@ax/target-mc7plus-linux-x64": "6.1.59" + "@ax/plc-info-linux-x64": "2.4.0", + "@ax/plc-info-win-x64": "2.4.0" + } + }, + "@ax/sdb": { + "name": "@ax/sdb", + "version": "1.2.2", + "integrity": "sha512-Yi8STvJfVnP2ucIcySe8K0wWhfb0nNCSgDvcHan9Yr6pbYibmfLu0VaaJ/rvxIrP882Ssu2QNoDXdmKfYFmDEA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/sdb/-/sdb-1.2.2.tgz", + "dependencies": { + "@ax/sdb-win-x64": "1.2.2", + "@ax/sdb-linux-x64": "1.2.2" } }, "@ax/simatic-pragma-stc-plugin": { "name": "@ax/simatic-pragma-stc-plugin", - "version": "2.0.12", - "integrity": "sha512-KLo6lEPU5NfahK6Rr9MBlItSMU4VO+vePUGhk5nooM/1TZYtekJnLE4xRoZLeiMk+MA6glodTw6YkPzl7p7z4A==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/simatic-pragma-stc-plugin/-/simatic-pragma-stc-plugin-2.0.12.tgz", + "version": "4.0.18", + "integrity": "sha512-gm+r3VCKHSBrjA7/kTb4IEOj4MgPEeeTfCHjj/RwvyEoUO/ZxvFU0NzkkxYsR9eXnfabRRMpLGC5SvrRWjcZkA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/simatic-pragma-stc-plugin/-/simatic-pragma-stc-plugin-4.0.18.tgz", "dependencies": {} }, - "@ax/trace": { - "name": "@ax/trace", - "version": "2.7.1", - "integrity": "sha512-gkk06H11R2PCclPTF/kikex65vPjGjiHJ7BqlIAnEDM54ETF+UWDkSRvTWrl4PEhoFjqB0mAxm7P1cNg6kFs2g==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/trace/-/trace-2.7.1.tgz", + "@ax/st-ls": { + "name": "@ax/st-ls", + "version": "7.1.87", + "integrity": "sha512-qfLJod9PDzxOssNc0xdoKJyoaqL+AFYveg5YdELVgRf45QAl5qPoeq3FTsMtab3eXj7VvR8GsOB9ZvAflm3nCg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/st-ls/-/st-ls-7.1.87.tgz", "dependencies": { - "@ax/trace-win-x64": "2.7.1", - "@ax/trace-linux-x64": "2.7.1" + "@ax/st-ls-win-x64": "7.1.87", + "@ax/st-ls-linux-x64": "7.1.87" } }, - "@ax/diagnostic-buffer": { - "name": "@ax/diagnostic-buffer", - "version": "1.3.0", - "integrity": "sha512-fcELkyXag5oms3tHxv5LCubysUN9CheCgVBuGhTin/4ETykTSLGiuOeJbYrJ2IWQ5JrHe6f/h85wrXcxixgLWw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/diagnostic-buffer/-/diagnostic-buffer-1.3.0.tgz", + "@ax/stc": { + "name": "@ax/stc", + "version": "7.1.87", + "integrity": "sha512-u6vQH5zDdxJMZg6slXUXFjCvympdu0ssBVHt5eeq+683s+eumYoWJHunN40aOtUnsvdEWkYE6/vXT+0xW/l8Og==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/stc/-/stc-7.1.87.tgz", "dependencies": { - "@ax/diagnostic-buffer-win-x64": "1.3.0", - "@ax/diagnostic-buffer-linux-x64": "1.3.0" + "@ax/stc-win-x64": "7.1.87", + "@ax/stc-linux-x64": "7.1.87" } }, - "@ax/performance-info": { - "name": "@ax/performance-info", - "version": "1.1.0", - "integrity": "sha512-vIgAbV63H9rVPYkS/Kz3AF38pMlI55oh3yReOUzEoXg8QmniOw81Ba5z//IeFpoZZyQJJG1lxtbYpVWvhCEqkA==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/performance-info/-/performance-info-1.1.0.tgz", + "@ax/target-llvm": { + "name": "@ax/target-llvm", + "version": "7.1.87", + "integrity": "sha512-JosrRlVCefFdtaD9vmj8eAB6c1mgqXXPXdYPHwRTcVIHxGUqvy0ol6nQCnetvCwioRYIDR1miY3hOu5qIeuVPQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-llvm/-/target-llvm-7.1.87.tgz", "dependencies": { - "@ax/performance-info-win-x64": "1.1.0", - "@ax/performance-info-linux-x64": "1.1.0" + "@ax/target-llvm-win-x64": "7.1.87", + "@ax/target-llvm-linux-x64": "7.1.87" } }, - "@ax/plc-info": { - "name": "@ax/plc-info", - "version": "2.3.0", - "integrity": "sha512-k+iOi1eUpVW5xBXRvdqS6Qj+ju2wQMsZIAZDvz32NDSv6HoAUTwMIEB5BA6xv9plRr1zi3jn99plslUshCEFPQ==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/plc-info/-/plc-info-2.3.0.tgz", + "@ax/target-mc7plus": { + "name": "@ax/target-mc7plus", + "version": "7.1.87", + "integrity": "sha512-LST2JHXSoD0rIM/3fnyeYERio2jsywbqqy4CDhbho52rIUsOFYyqRysANt4yRFuu4fs9ZqLpY0svZ0+m8ATp/g==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-mc7plus/-/target-mc7plus-7.1.87.tgz", "dependencies": { - "@ax/plc-info-linux-x64": "2.3.0", - "@ax/plc-info-win-x64": "2.3.0" + "@ax/target-mc7plus-win-x64": "7.1.87", + "@ax/target-mc7plus-linux-x64": "7.1.87" } }, - "@ax/certificate-management": { - "name": "@ax/certificate-management", - "version": "1.1.1", - "integrity": "sha512-iGWHocZp+OAdQBQ2XFqJQBpT4v+IpliIVa9nOxm5/6kPaXHYxNTy42Amut2DBi7QfMPnPhiVf6lOK8Doi1E8yQ==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/certificate-management/-/certificate-management-1.1.1.tgz", + "@ax/trace": { + "name": "@ax/trace", + "version": "2.8.0", + "integrity": "sha512-3s+J4mY2K2DFc6LWvzB8Z2vXoJiYYHAW+Sf7QqrFkyj637FLWlYm8ByB9DCZqGyZxc6g28qrahq71qPV5aZWPg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/trace/-/trace-2.8.0.tgz", "dependencies": { - "@ax/certificate-management-win-x64": "1.1.1", - "@ax/certificate-management-linux-x64": "1.1.1" + "@ax/trace-win-x64": "2.8.0", + "@ax/trace-linux-x64": "2.8.0" } }, + "@ax/simatic-package-tool": { + "name": "@ax/simatic-package-tool", + "version": "1.0.3", + "integrity": "sha512-5f5k9y/fNSK657l/zszQxaj16SR9nYk+k4iskuuoPsScRFWr4joVvDfuCgPQ3EBzdyJDzkbXu2rItkoS2Dy84A==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/simatic-package-tool/-/simatic-package-tool-1.0.3.tgz", + "dependencies": {} + }, + "@ax/st-resources.stc-plugin": { + "name": "@ax/st-resources.stc-plugin", + "version": "1.0.5", + "integrity": "sha512-8qEF0A8qtmDMLpikoj52FcQzsF7gkrZWRFUCUtejNFgaRgAYTNI/VWKic3dWROrL3deflSha80lxzPJAeCQD0A==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/st-resources.stc-plugin/-/st-resources.stc-plugin-1.0.5.tgz", + "dependencies": {} + }, "@ax/axunitst-library": { "name": "@ax/axunitst-library", - "version": "4.2.4", - "integrity": "sha512-Jz2kjeRM7j78DL2spA4cX/RSGnS9p7x8N2fTrA9R7Flb2YJmK3E0jsqy1EQ4NX9qX3ZyA1FcHA3Ac5f/iGfKRQ==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-library/-/axunitst-library-4.2.4.tgz", + "version": "5.2.6", + "integrity": "sha512-j411mz5F1NKscxVXRLD6bDPYfDDPOsmQbneQqXHZVWfyzymoyYDn8biWjWKgmliGdHzgMsg1SxDYb7qcGz99dA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-library/-/axunitst-library-5.2.6.tgz", "dependencies": { - "@ax/system-strings": "6.0.94" + "@ax/system-strings": "^7.0.17" } }, - "@ax/axunitst-runner": { - "name": "@ax/axunitst-runner", - "version": "4.2.4", - "integrity": "sha512-n1XikT3NBQpOj0qq9W74BnhRAroDuP7WrIHa8B+HOM9EYWz3mK2KHTM3jyHodLVO/0bkLpfplAaon//ceLIXEw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-runner/-/axunitst-runner-4.2.4.tgz", + "@ax/axunitst-test-director": { + "name": "@ax/axunitst-test-director", + "version": "5.2.6", + "integrity": "sha512-sVo6jaiyedRul6MOJnjBKAzKwBF/g6y6kFq5l0mQzQtr4ek5d0Wj/E0XcrVIRSfq9/jvCaLFfkNt/ae+5gda9w==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-test-director/-/axunitst-test-director-5.2.6.tgz", "dependencies": { - "@ax/axunitst-runner-linux-x64": "4.2.4", - "@ax/axunitst-runner-win-x64": "4.2.4" + "@ax/axunitst-test-director-linux-x64": "5.2.6", + "@ax/axunitst-test-director-win-x64": "5.2.6" } }, - "@ax/axunitst-generator": { - "name": "@ax/axunitst-generator", - "version": "4.2.4", - "integrity": "sha512-dRONC9ZVyFrwU9fvWcbyOgOqGgQyVsbcCceUJ+iDmxiUtBO4ybhtz4YeTTwuQsio+AW1sLXLsA677F6P3REQXA==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-generator/-/axunitst-generator-4.2.4.tgz", - "dependencies": { - "@ax/axunitst-generator-linux-x64": "4.2.4", - "@ax/axunitst-generator-win-x64": "4.2.4" - } - }, - "@ax/axunitst-llvm-runner-gen": { - "name": "@ax/axunitst-llvm-runner-gen", - "version": "4.2.4", - "integrity": "sha512-kRZTlfineat25gq9QpI4YOAh8gG+jOIwllVqC1DeIUqpbqCKPl8EG4/vdIZiq76/kCe1+8W+M9LhzonFxBOa5A==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-llvm-runner-gen/-/axunitst-llvm-runner-gen-4.2.4.tgz", - "dependencies": {} - }, "@ax/axunitst-docs": { "name": "@ax/axunitst-docs", - "version": "4.2.4", - "integrity": "sha512-+ERROnGpRVJri3wm5T5Lqqyl0ut0IJiVqNk3Ha8FZhUxCMg6jS6a744HEA1mYv0MpdUOo+SUEdNCvFX9YX7U8w==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-docs/-/axunitst-docs-4.2.4.tgz", + "version": "5.2.6", + "integrity": "sha512-G6VNc9uiytIeuu1vG8YzsgYlLG/7BMsjv4CR/SIVFsqRhFMNQO2xTLte2DoZiD2DfhTjYwuExo1hRhCBuLfssQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-docs/-/axunitst-docs-5.2.6.tgz", "dependencies": {} }, "@ax/build-native": { @@ -236,11 +275,11 @@ "@ax/build-native-linux": "16.0.3" } }, - "@ax/mod-win-x64": { - "name": "@ax/mod-win-x64", + "@ax/certificate-management-win-x64": { + "name": "@ax/certificate-management-win-x64", "version": "1.1.2", - "integrity": "sha512-q4Z6rxFbgphRZRAXqv91cE9yaduGs0LTGPTa+9m0ATMAKkLq1qm2QdEwpZVLa5Ui+sZBjW9gyOGya93yelWEEw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/mod-win-x64/-/mod-win-x64-1.1.2.tgz", + "integrity": "sha512-E1esAH64ib93jdIqOJElSRK5jh5zFNRuEfm8ZpwRIhuMe446DyQpjHFH+QrnDYSS9feZtLzJhFxEqhgQb7EP3w==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/certificate-management-win-x64/-/certificate-management-win-x64-1.1.2.tgz", "os": [ "win32" ], @@ -249,11 +288,11 @@ ], "dependencies": {} }, - "@ax/mod-linux-x64": { - "name": "@ax/mod-linux-x64", + "@ax/certificate-management-linux-x64": { + "name": "@ax/certificate-management-linux-x64", "version": "1.1.2", - "integrity": "sha512-QCPTnNXlEYt08xRDSoGc12q5cecf3XGIQ8gG66J0zOLB7ZAo4vfTlBe5ObvYkV1taQc8BQ3f09nD576QzEQWuw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/mod-linux-x64/-/mod-linux-x64-1.1.2.tgz", + "integrity": "sha512-Z3blxeHA57omgrAogE27FDhOQQk+JhlYyvzDmITUg1vnsxxO9fR936mukqeBOWydlt9N/+hQc2Xt/2NOGrcEKw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/certificate-management-linux-x64/-/certificate-management-linux-x64-1.1.2.tgz", "os": [ "linux" ], @@ -262,11 +301,11 @@ ], "dependencies": {} }, - "@ax/mon-win-x64": { - "name": "@ax/mon-win-x64", - "version": "1.1.2", - "integrity": "sha512-vtOvaVEMtM2WA3tnvND68K7XEU+XUVTDCTYfx4ecojimnQ4PN8QUtslJNoJjKtSygwLVEAw+Tu7M/t3aI09ulw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/mon-win-x64/-/mon-win-x64-1.1.2.tgz", + "@ax/diagnostic-buffer-win-x64": { + "name": "@ax/diagnostic-buffer-win-x64", + "version": "1.3.1", + "integrity": "sha512-KmHQgAUPCm1+dQgThqxZOyjMmeQYhUyJpl+HZk3TWkVu2WqtAT5/In0whcUWfIJhO3i9nL44pu0Yz8uHqqjURw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/diagnostic-buffer-win-x64/-/diagnostic-buffer-win-x64-1.3.1.tgz", "os": [ "win32" ], @@ -275,11 +314,11 @@ ], "dependencies": {} }, - "@ax/mon-linux-x64": { - "name": "@ax/mon-linux-x64", - "version": "1.1.2", - "integrity": "sha512-ewFDPwavkBqmQfx63ooLpCLOYy0SaY7BsyU8UMuTZo2FJ3VHoJL8Vyl62plMbvZJyTN6FshOD1/dYbvh+tfWnw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/mon-linux-x64/-/mon-linux-x64-1.1.2.tgz", + "@ax/diagnostic-buffer-linux-x64": { + "name": "@ax/diagnostic-buffer-linux-x64", + "version": "1.3.1", + "integrity": "sha512-CA3gr8L64up2p0BWo0DEvTbYJPgie23MIix1ShG8UXWtPE+yxvRDYt5BnsDPN9RMZCIp6odl8xYO7E9f/ib3OQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/diagnostic-buffer-linux-x64/-/diagnostic-buffer-linux-x64-1.3.1.tgz", "os": [ "linux" ], @@ -288,11 +327,11 @@ ], "dependencies": {} }, - "@ax/sdb-win-x64": { - "name": "@ax/sdb-win-x64", - "version": "1.1.2", - "integrity": "sha512-nMRYo45ne5rxnDOvOJgrJnJODuyG+zxgOkrISeO58z3GmRRs2b0ypUhRRxly3dcgBLxB9J2pobnT5Wc+fDXELA==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/sdb-win-x64/-/sdb-win-x64-1.1.2.tgz", + "@ax/hwc-win-x64": { + "name": "@ax/hwc-win-x64", + "version": "1.2.136", + "integrity": "sha512-DumJiwSKXQDoi17rbyse28nAsSNoxafTWCRG3Dj3pOvBivUHYUCz1OVzp0cg6Xyi/P2d98PkmOrTKcgl8sYmiQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/hwc-win-x64/-/hwc-win-x64-1.2.136.tgz", "os": [ "win32" ], @@ -301,11 +340,11 @@ ], "dependencies": {} }, - "@ax/sdb-linux-x64": { - "name": "@ax/sdb-linux-x64", - "version": "1.1.2", - "integrity": "sha512-tSAnR2ntrCcLaDHIOG8HVqXjYNFn9l9ftE0lgxWBTG8doKZ6+gd/3vSmXrX7fWNernaDG+8EaqTFqV5Ft/Joug==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/sdb-linux-x64/-/sdb-linux-x64-1.1.2.tgz", + "@ax/hwc-linux-x64": { + "name": "@ax/hwc-linux-x64", + "version": "1.2.136", + "integrity": "sha512-SdRxzO5N5FTAHMWfcUffztVdSEW7j0GxV7Zr9rXszCW1Xm2Lu7PHwZH3k4YCTcGqdQ9BUnL3QI3LAlH8/nB6Sg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/hwc-linux-x64/-/hwc-linux-x64-1.2.136.tgz", "os": [ "linux" ], @@ -314,38 +353,11 @@ ], "dependencies": {} }, - "@ax/stc": { - "name": "@ax/stc", - "version": "6.1.59", - "integrity": "sha512-9fSnPIR1Le1i5vA0g13ONfvwWXY6MOM/5+8cDeFvWRh0iIZwviYjCXJ5XM5kv7/wKdkJHZTelQWF6GMPnvWORw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/stc/-/stc-6.1.59.tgz", - "dependencies": { - "@ax/stc-win-x64": "6.1.59", - "@ax/stc-linux-x64": "6.1.59" - } - }, - "@ax/apax-build": { - "name": "@ax/apax-build", - "version": "0.8.0", - "integrity": "sha512-FG6ccS18eqTWxyvS2x6alj+BA37S0H4Wuqrk1s+JnvNnLDwfHrfAOK8J4jovg+/ccK+eWJfw23QGpAng8Dk/MA==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/apax-build/-/apax-build-0.8.0.tgz", - "dependencies": {} - }, - "@ax/st-ls": { - "name": "@ax/st-ls", - "version": "6.1.59", - "integrity": "sha512-6/6s6ODh3oVB8GtHkOuJZZz94zJzx8WCc2tsrE1V7D43VWffR7Xzv0618pf6asDAItbtloPLnQyaLXXF5iQ6TQ==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/st-ls/-/st-ls-6.1.59.tgz", - "dependencies": { - "@ax/st-ls-win-x64": "6.1.59", - "@ax/st-ls-linux-x64": "6.1.59" - } - }, - "@ax/target-llvm-win-x64": { - "name": "@ax/target-llvm-win-x64", - "version": "6.1.59", - "integrity": "sha512-Rf4lgMozUcK7ytwcFZai4DTNGmOVStjNOR8jXXOphDwNnsHtI8RUTriVbPEYxZVgdk3lXy5y+hVYfYuBx2VE3A==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-llvm-win-x64/-/target-llvm-win-x64-6.1.59.tgz", + "@ax/mod-win-x64": { + "name": "@ax/mod-win-x64", + "version": "1.2.2", + "integrity": "sha512-WLtXvWWc73YFX4FNnETftcD552pSWqDMLwjo8h3oD8sY8oMvjBd0gcF0x4EjZ+gSYv2XCVGi6O2PyHF1zuvmCQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/mod-win-x64/-/mod-win-x64-1.2.2.tgz", "os": [ "win32" ], @@ -354,11 +366,11 @@ ], "dependencies": {} }, - "@ax/target-llvm-linux-x64": { - "name": "@ax/target-llvm-linux-x64", - "version": "6.1.59", - "integrity": "sha512-lJYJcIxyOkhPykeQkO1nqio6lQRdCMpdXkFALKToLy81xhcUKwNuzR2wZo5RKG3eosJwe6dWkaj48lUGUM7NzA==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-llvm-linux-x64/-/target-llvm-linux-x64-6.1.59.tgz", + "@ax/mod-linux-x64": { + "name": "@ax/mod-linux-x64", + "version": "1.2.2", + "integrity": "sha512-7I5w57z7mfKen9RpAaIsfw7m+dT5C1ey6lvJxwnRHDaPYWEi7ZBu2KSCvzRA1MD6nxpGpPhv9idb0gMX+yCslA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/mod-linux-x64/-/mod-linux-x64-1.2.2.tgz", "os": [ "linux" ], @@ -367,11 +379,11 @@ ], "dependencies": {} }, - "@ax/target-mc7plus-win-x64": { - "name": "@ax/target-mc7plus-win-x64", - "version": "6.1.59", - "integrity": "sha512-aFszJeEXW6Obo/ynBNMdvYfJVYU1ylSbTbT9cFdJRFeLzh86ySv6Yk9Baud11EXvI2w4MamkBqLxmgGZtyppwQ==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-mc7plus-win-x64/-/target-mc7plus-win-x64-6.1.59.tgz", + "@ax/mon-win-x64": { + "name": "@ax/mon-win-x64", + "version": "1.2.2", + "integrity": "sha512-a9V7Ivb6I9iaP5gyNsVb2FCO7n9uBWNVmXQTqta9OMoDVgR96+7BDNOcKNy/QSCDDEeLBf8e2G/WI5Y/DdsByg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/mon-win-x64/-/mon-win-x64-1.2.2.tgz", "os": [ "win32" ], @@ -380,11 +392,11 @@ ], "dependencies": {} }, - "@ax/target-mc7plus-linux-x64": { - "name": "@ax/target-mc7plus-linux-x64", - "version": "6.1.59", - "integrity": "sha512-yjPaaMhYetDG+KAraDbwhiHzIcutavU9hbFHWPHQNgmgU/d9/tptZl/ND0qjOBiLuANtAwU1KKgydLvFwOujYw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-mc7plus-linux-x64/-/target-mc7plus-linux-x64-6.1.59.tgz", + "@ax/mon-linux-x64": { + "name": "@ax/mon-linux-x64", + "version": "1.2.2", + "integrity": "sha512-0E72/PJiANdykEwSe+JlKMIG+gVIYdp2FbNCUvrcC0PMzh+B0g6CkAWdicYEFzl99EM9RHjZBBuqk0j8PlKDKg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/mon-linux-x64/-/mon-linux-x64-1.2.2.tgz", "os": [ "linux" ], @@ -393,11 +405,11 @@ ], "dependencies": {} }, - "@ax/trace-win-x64": { - "name": "@ax/trace-win-x64", - "version": "2.7.1", - "integrity": "sha512-7IauS1rfiHMh8PDbRBSwwHm7KUra3ZVmj2zJTHQuYJE5VOXsgd92FHVB9pPF+IJ2tJRlrgOdjP/yDnajEg6Img==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/trace-win-x64/-/trace-win-x64-2.7.1.tgz", + "@ax/performance-info-win-x64": { + "name": "@ax/performance-info-win-x64", + "version": "1.1.1", + "integrity": "sha512-KABLJCTUtv27Esi/xOMW8iFA3kDF5ytv0/++YHdCK8C88wm3Q2lqW/Kahi0CkumncK9bZzsDD8awvLtrjDfC1g==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/performance-info-win-x64/-/performance-info-win-x64-1.1.1.tgz", "os": [ "win32" ], @@ -406,11 +418,11 @@ ], "dependencies": {} }, - "@ax/trace-linux-x64": { - "name": "@ax/trace-linux-x64", - "version": "2.7.1", - "integrity": "sha512-kQR6Xc13G5RvyQylSizhZo1uiKazDsozn4P7A4E1SCg1bhmRmXETt+CDwYP6rGP/Q0nGOLR/99y8kCXuW2dJ2g==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/trace-linux-x64/-/trace-linux-x64-2.7.1.tgz", + "@ax/performance-info-linux-x64": { + "name": "@ax/performance-info-linux-x64", + "version": "1.1.1", + "integrity": "sha512-Hw7+kegtXUyhbYo5XGESBhYyOmrcHoJHnv8hm+lTL4dITNtnI0wx+NTNTavwHZM2S+N3vro9W8QaatN+9QNuuA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/performance-info-linux-x64/-/performance-info-linux-x64-1.1.1.tgz", "os": [ "linux" ], @@ -419,37 +431,37 @@ ], "dependencies": {} }, - "@ax/diagnostic-buffer-win-x64": { - "name": "@ax/diagnostic-buffer-win-x64", - "version": "1.3.0", - "integrity": "sha512-3ahsL3NMJVOSrL+0pYd+30wI49e3JZBukKuL3Fh1K7unVacJw04XWDiar8QdB8qF37HVuhEZiWjxyVbRe7mE2g==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/diagnostic-buffer-win-x64/-/diagnostic-buffer-win-x64-1.3.0.tgz", + "@ax/plc-info-linux-x64": { + "name": "@ax/plc-info-linux-x64", + "version": "2.4.0", + "integrity": "sha512-xb1/9gaOZeqJeLil3crkbluj6oHxI895YhgqZljjOlvJ/lYqJd9zkZHUOHb6nK686/pEejbLMfvGRTspGDRlLQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/plc-info-linux-x64/-/plc-info-linux-x64-2.4.0.tgz", "os": [ - "win32" + "linux" ], "cpu": [ "x64" ], "dependencies": {} }, - "@ax/diagnostic-buffer-linux-x64": { - "name": "@ax/diagnostic-buffer-linux-x64", - "version": "1.3.0", - "integrity": "sha512-+LMVUGRyFrzklwkR/H6ZvJ8ka0UYG7kGusxQxHP0pRMqP4SzDdM8v6/nK9Nhc7gC0SuEuinPVHOfEnLHNwoNWA==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/diagnostic-buffer-linux-x64/-/diagnostic-buffer-linux-x64-1.3.0.tgz", + "@ax/plc-info-win-x64": { + "name": "@ax/plc-info-win-x64", + "version": "2.4.0", + "integrity": "sha512-4S4uhfYb+yYVIDuN4Nid9ei0mpsTdSKcCv2ZeVo5mLpYWLCh0KfSk8XIoS6zxjD1TlQYcEc+Cnn1+5rdjhpldQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/plc-info-win-x64/-/plc-info-win-x64-2.4.0.tgz", "os": [ - "linux" + "win32" ], "cpu": [ "x64" ], "dependencies": {} }, - "@ax/performance-info-win-x64": { - "name": "@ax/performance-info-win-x64", - "version": "1.1.0", - "integrity": "sha512-yMfgZm2erMxxU3LJytyJKWWA9PN/vIXhZjXPhEpUXn+M+ojg+pXiRy+oLj5Z0Xo8NYd/bz780m/buAaIPMe2Iw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/performance-info-win-x64/-/performance-info-win-x64-1.1.0.tgz", + "@ax/sdb-win-x64": { + "name": "@ax/sdb-win-x64", + "version": "1.2.2", + "integrity": "sha512-WusrkIHXT0UJWoU+lbiFNYBqMHJcg7EkVLATw9wmwlR3RmvufoZAkH1bGSEBPDjIR9D3rIJn5ZvAPdkNIrao1g==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/sdb-win-x64/-/sdb-win-x64-1.2.2.tgz", "os": [ "win32" ], @@ -458,11 +470,11 @@ ], "dependencies": {} }, - "@ax/performance-info-linux-x64": { - "name": "@ax/performance-info-linux-x64", - "version": "1.1.0", - "integrity": "sha512-5rFgfDdfijFVIFRfoQXv4MS/jgrk3Oe8sKJVRFluTs8hkMLg0AlWvVe171YbFOO1D3VI8O1yG8KFu3AKwF3bjw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/performance-info-linux-x64/-/performance-info-linux-x64-1.1.0.tgz", + "@ax/sdb-linux-x64": { + "name": "@ax/sdb-linux-x64", + "version": "1.2.2", + "integrity": "sha512-ekRXF7Id+4SQeyQKlzqQEJy95r6Srv1Yo6oQaylj3Ebn44K4+R87ZFqHDFCCDwcuHm4qswVHdmd7fEw8r+Z3Dw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/sdb-linux-x64/-/sdb-linux-x64-1.2.2.tgz", "os": [ "linux" ], @@ -471,125 +483,119 @@ ], "dependencies": {} }, - "@ax/plc-info-linux-x64": { - "name": "@ax/plc-info-linux-x64", - "version": "2.3.0", - "integrity": "sha512-EUD170olqPo0aSOx/5auP8inlKNON0bstMSjtQDc/bqjXcKRxL6K6sg/JnierRO7OiJ5iXcTLIGO3cOBeXeAAw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/plc-info-linux-x64/-/plc-info-linux-x64-2.3.0.tgz", + "@ax/st-ls-win-x64": { + "name": "@ax/st-ls-win-x64", + "version": "7.1.87", + "integrity": "sha512-IuWpMnUZSAlAPY4waFBg1fXZ+R076DopuBfFrMO0s7jBSi90pIy++vSErYFsnvjUJUX4m2ZJgDXpEC4v5gnvjw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/st-ls-win-x64/-/st-ls-win-x64-7.1.87.tgz", "os": [ - "linux" + "win32" ], "cpu": [ "x64" ], "dependencies": {} }, - "@ax/plc-info-win-x64": { - "name": "@ax/plc-info-win-x64", - "version": "2.3.0", - "integrity": "sha512-10M6F6HQV/nMk9n9pR17xvkx93O1ALOQTlLl3IMFzH9O/DXPSVzb4r3Q7KuVXd7OBpoWzt8Ab/ZvFzp98VXTGw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/plc-info-win-x64/-/plc-info-win-x64-2.3.0.tgz", + "@ax/st-ls-linux-x64": { + "name": "@ax/st-ls-linux-x64", + "version": "7.1.87", + "integrity": "sha512-MdS0rWxLH//zOiLdxhwGSY2lLhj8/+dv5wBmWvf/XOLbrSfzP2KoxongXbXuh5pGUxDI231qTj9jm2ux8MFNlQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/st-ls-linux-x64/-/st-ls-linux-x64-7.1.87.tgz", "os": [ - "win32" + "linux" ], "cpu": [ "x64" ], "dependencies": {} }, - "@ax/certificate-management-win-x64": { - "name": "@ax/certificate-management-win-x64", - "version": "1.1.1", - "integrity": "sha512-1xfLLCXI26tj0Ovcbb9U6IaHV5hleZY06e9nrtbQD/fsmPDquTPOPZFfGj0BviiBAyrvv5gtqukNUbEeFdLGZw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/certificate-management-win-x64/-/certificate-management-win-x64-1.1.1.tgz", + "@ax/stc-win-x64": { + "name": "@ax/stc-win-x64", + "version": "7.1.87", + "integrity": "sha512-o/IdHsUD7078xheG1eSI6l7BLRavrsMBvCs2sPSyHxS9e+ZwDGUO66BUK+7zq167L5VgO6K7HPdfKdf3tBvNtQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/stc-win-x64/-/stc-win-x64-7.1.87.tgz", "os": [ "win32" ], "cpu": [ "x64" ], - "dependencies": {} + "dependencies": { + "@ax/st-docs": "7.1.87" + } }, - "@ax/certificate-management-linux-x64": { - "name": "@ax/certificate-management-linux-x64", - "version": "1.1.1", - "integrity": "sha512-acQTT0273znGzf7RTm+IG0Z5gT4ifu1abprDyuiiWDY3BaN8Hir05RLrLyEPdOAPcC/Vx/PNDK0FSTXO+aseXg==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/certificate-management-linux-x64/-/certificate-management-linux-x64-1.1.1.tgz", + "@ax/stc-linux-x64": { + "name": "@ax/stc-linux-x64", + "version": "7.1.87", + "integrity": "sha512-4O5v6S6ygy8/ObsgTADy0J0R+Q8usjYQhdHZgzUirEEb8lmhVPDSekJYSFONB/MbK4DJOq7qOw4X8PdVZWG5jQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/stc-linux-x64/-/stc-linux-x64-7.1.87.tgz", "os": [ "linux" ], "cpu": [ "x64" ], - "dependencies": {} - }, - "@ax/system-strings": { - "name": "@ax/system-strings", - "version": "6.0.94", - "integrity": "sha512-iGh5v//U+az23N1SG+rgPassm7mUV6MSdLnE+6a7g1u7e6lHbrsnAbfKqIk7UNHEFFfp52WK1k5B6Igo0s3/1A==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/system-strings/-/system-strings-6.0.94.tgz", "dependencies": { - "@ax/system-math": "6.0.94", - "@ax/system-datetime": "6.0.94" + "@ax/st-docs": "7.1.87" } }, - "@ax/axunitst-runner-linux-x64": { - "name": "@ax/axunitst-runner-linux-x64", - "version": "4.2.4", - "integrity": "sha512-SsDOp/1S1jWVdw/wHFog09VREEqMAzV7v0fG/6OQRuTzd62D8DnxiZcrvGQ8Qmbwcj584/Rd3Wc4hO+4mYWX7g==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-runner-linux-x64/-/axunitst-runner-linux-x64-4.2.4.tgz", + "@ax/target-llvm-win-x64": { + "name": "@ax/target-llvm-win-x64", + "version": "7.1.87", + "integrity": "sha512-Cflw+jt1sijeDiD5vATqAFNY8bPsmW2I7iLd0OIQElQvKSe/c0pIqqwfCg/cSlFk8M9aTTw4xYO3+EjuJYkzRQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-llvm-win-x64/-/target-llvm-win-x64-7.1.87.tgz", "os": [ - "linux" + "win32" ], "cpu": [ "x64" ], "dependencies": {} }, - "@ax/axunitst-runner-win-x64": { - "name": "@ax/axunitst-runner-win-x64", - "version": "4.2.4", - "integrity": "sha512-6xUOXAoeE35Uig4TUraNZHzYTZEHebRuNDPDzDd85AvU2OUVQ0L6n2Or0AeTgkP3RMQ4s2qb3ZlFtgN695fqbA==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-runner-win-x64/-/axunitst-runner-win-x64-4.2.4.tgz", + "@ax/target-llvm-linux-x64": { + "name": "@ax/target-llvm-linux-x64", + "version": "7.1.87", + "integrity": "sha512-bPDhdCIAvDQqUdpfg9W655F2rcRPHGKnCUHbAuy0HK//yiN6lc7DYLBzXFMAVU9DNhVl1PanTPzH7mHPGrPEBg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-llvm-linux-x64/-/target-llvm-linux-x64-7.1.87.tgz", "os": [ - "win32" + "linux" ], "cpu": [ "x64" ], "dependencies": {} }, - "@ax/axunitst-generator-linux-x64": { - "name": "@ax/axunitst-generator-linux-x64", - "version": "4.2.4", - "integrity": "sha512-1AhD3+fm8/+glzC8gX4VgBzSQArfYIR0IhtB4Wr0Bv3f76xdyCa3gZLpjYrzpHrQDBwUk51m96MWyNR3n70Ubg==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-generator-linux-x64/-/axunitst-generator-linux-x64-4.2.4.tgz", + "@ax/target-mc7plus-win-x64": { + "name": "@ax/target-mc7plus-win-x64", + "version": "7.1.87", + "integrity": "sha512-zZAMac8wPhZ20+wacIGeUuxQdZA6inyXA8V0meuo40U2CW3N9sjOOndFQlnOCrT+BTPce67keZG4938N0DKdGw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-mc7plus-win-x64/-/target-mc7plus-win-x64-7.1.87.tgz", "os": [ - "linux" + "win32" ], "cpu": [ "x64" ], "dependencies": {} }, - "@ax/axunitst-generator-win-x64": { - "name": "@ax/axunitst-generator-win-x64", - "version": "4.2.4", - "integrity": "sha512-1D5tVzEkmvxCkr3JPHh14pxeTNOV8RNPyBQXmkNlbnW0CfLua2NDx/vEXFfYIbe32gM3irSRLciNXoyS8/841g==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-generator-win-x64/-/axunitst-generator-win-x64-4.2.4.tgz", + "@ax/target-mc7plus-linux-x64": { + "name": "@ax/target-mc7plus-linux-x64", + "version": "7.1.87", + "integrity": "sha512-bI2GXYZRqkIuDEPJfLWVcMdml9a2nIpwQRXajR8MBpk1OdYwg1Y26yqO1PMw9WjO4MVliTqo5G5C5c4M2mT2uQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-mc7plus-linux-x64/-/target-mc7plus-linux-x64-7.1.87.tgz", "os": [ - "win32" + "linux" ], "cpu": [ "x64" ], "dependencies": {} }, - "@ax/build-native-winx64": { - "name": "@ax/build-native-winx64", - "version": "16.0.3", - "integrity": "sha512-M1qk2yNNsGzz6NXKB0miyfOO4bpYkVcfnGhkHirXcJSLFnWDSx7hnRi0yhLp6jny99RkXEcRn9Cwx8lqynmUDg==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/build-native-winx64/-/build-native-winx64-16.0.3.tgz", + "@ax/trace-win-x64": { + "name": "@ax/trace-win-x64", + "version": "2.8.0", + "integrity": "sha512-7djrSgFyp3MUAy6GmwuCPHrw2mDmF39oO/Zejf5o2t+q/aaWT5+SBJnA48sFoyC40/iYWINR2TsFerV6Ql/wAw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/trace-win-x64/-/trace-win-x64-2.8.0.tgz", "os": [ "win32" ], @@ -598,11 +604,11 @@ ], "dependencies": {} }, - "@ax/build-native-linux": { - "name": "@ax/build-native-linux", - "version": "16.0.3", - "integrity": "sha512-CfqbzR+wPnocP0+pDpb3cYBxdefkS6WvHbGaDNGAoCkK3Y8WnNfWbxXr37e5XIi7iPMZ8BONWaRFIN5h4RMeOA==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/build-native-linux/-/build-native-linux-16.0.3.tgz", + "@ax/trace-linux-x64": { + "name": "@ax/trace-linux-x64", + "version": "2.8.0", + "integrity": "sha512-T9tpz2rS4BlkLWUhSfqP5x0HWhGRW1e/ebmGGMcpjpcs/sKsAU0ROAdVNHWpJF7EYfMkUE28QuPK5UyWDpFPBQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/trace-linux-x64/-/trace-linux-x64-2.8.0.tgz", "os": [ "linux" ], @@ -611,41 +617,47 @@ ], "dependencies": {} }, - "@ax/stc-win-x64": { - "name": "@ax/stc-win-x64", - "version": "6.1.59", - "integrity": "sha512-PMI1NqqJlANZyug6ZFsXBP0SFneGKo0nAeUtO7KiKC4LAdmLZ54gOvc6OzxUUhuSrjI1yD1zO9faQP7s/Hu15g==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/stc-win-x64/-/stc-win-x64-6.1.59.tgz", + "@ax/system-strings": { + "name": "@ax/system-strings", + "version": "7.1.47", + "integrity": "sha512-ERClBkAtu1dabBJFMZvA7RUPNwnaXfQC3B81IbRFtWcBTKso6qIgqGe9uku9TdSBYqfrQgwDkxneJtJNDDm5Kg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/system-strings/-/system-strings-7.1.47.tgz", + "dependencies": { + "@ax/system-math": "^7.1.47", + "@ax/system-datetime": "^7.1.47" + } + }, + "@ax/axunitst-test-director-linux-x64": { + "name": "@ax/axunitst-test-director-linux-x64", + "version": "5.2.6", + "integrity": "sha512-FQo2kcqxf6JoPWVZJbO43E1V2yJWrawWajHR+NKdMaAwXWsraH5AFmYKMmbQqiodCW6jBdQ/5dBOivGa0hmuSw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-test-director-linux-x64/-/axunitst-test-director-linux-x64-5.2.6.tgz", "os": [ - "win32" + "linux" ], "cpu": [ "x64" ], - "dependencies": { - "@ax/st-docs": "6.1.59" - } + "dependencies": {} }, - "@ax/stc-linux-x64": { - "name": "@ax/stc-linux-x64", - "version": "6.1.59", - "integrity": "sha512-cggJ3PcIu683s6kTLy0U2bFVOGPvVLjGmWQVp2XB1yC33bZY/HJK28pjJaNUvSOk9AVwgEpDWT15nF99kjN05g==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/stc-linux-x64/-/stc-linux-x64-6.1.59.tgz", + "@ax/axunitst-test-director-win-x64": { + "name": "@ax/axunitst-test-director-win-x64", + "version": "5.2.6", + "integrity": "sha512-9gnw1YUW0Jfdpreha7g1GmgFYjhwufPHcSiDKzI/wpozzJYCqc25W9rmkKK0ROcY2X9hMb56kQE0h4O/+ufOWQ==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-test-director-win-x64/-/axunitst-test-director-win-x64-5.2.6.tgz", "os": [ - "linux" + "win32" ], "cpu": [ "x64" ], - "dependencies": { - "@ax/st-docs": "6.1.59" - } + "dependencies": {} }, - "@ax/st-ls-win-x64": { - "name": "@ax/st-ls-win-x64", - "version": "6.1.59", - "integrity": "sha512-Q2VKGvdozqBzSnHtwnjwFhjbXDyeTpl+1V2+9y3V+AQeD/Dwdk93n8T3ZtdH+KXc8WvG//LIhXyMs4qNQamjhQ==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/st-ls-win-x64/-/st-ls-win-x64-6.1.59.tgz", + "@ax/build-native-winx64": { + "name": "@ax/build-native-winx64", + "version": "16.0.3", + "integrity": "sha512-M1qk2yNNsGzz6NXKB0miyfOO4bpYkVcfnGhkHirXcJSLFnWDSx7hnRi0yhLp6jny99RkXEcRn9Cwx8lqynmUDg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/build-native-winx64/-/build-native-winx64-16.0.3.tgz", "os": [ "win32" ], @@ -654,11 +666,11 @@ ], "dependencies": {} }, - "@ax/st-ls-linux-x64": { - "name": "@ax/st-ls-linux-x64", - "version": "6.1.59", - "integrity": "sha512-I9p2B9ohNnuCG69mY9lZQF4EYW7fsf3hDG7GCXiJZ34tkkbgnG+jsZQUge7X5kY3C/cQDKxSIqGj03d0kb1ikg==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/st-ls-linux-x64/-/st-ls-linux-x64-6.1.59.tgz", + "@ax/build-native-linux": { + "name": "@ax/build-native-linux", + "version": "16.0.3", + "integrity": "sha512-CfqbzR+wPnocP0+pDpb3cYBxdefkS6WvHbGaDNGAoCkK3Y8WnNfWbxXr37e5XIi7iPMZ8BONWaRFIN5h4RMeOA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/build-native-linux/-/build-native-linux-16.0.3.tgz", "os": [ "linux" ], @@ -667,25 +679,25 @@ ], "dependencies": {} }, + "@ax/st-docs": { + "name": "@ax/st-docs", + "version": "7.1.87", + "integrity": "sha512-J5BthD1BR0fu1dkqQFyW3yOByC14TxhG+b/NUl2zXkSqjnsAQQbNtdheZquZ225x0qkJAR8wRrBx9Kr3QdYg8w==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/st-docs/-/st-docs-7.1.87.tgz", + "dependencies": {} + }, "@ax/system-math": { "name": "@ax/system-math", - "version": "6.0.94", - "integrity": "sha512-lmkqZnJRT6zjAaVEKgWDwB1J7st+rgj/lfJc+6PZ/zgiRxoJ/s7BSTl/6YQ6k12RskKrA4E5VvLiqJhaNd3ssw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/system-math/-/system-math-6.0.94.tgz", + "version": "7.1.47", + "integrity": "sha512-xU30iSLTLTcSLSRrww4tguGUPr4lyiwHJBexUmsLXEBy/OyJqkwEJbY6gzGCJ6ciGXSQUVEkbfKM/blIztMzAA==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/system-math/-/system-math-7.1.47.tgz", "dependencies": {} }, "@ax/system-datetime": { "name": "@ax/system-datetime", - "version": "6.0.94", - "integrity": "sha512-8xn57nA5NfZ6ImTxmFGvzFp7wLL38JdUgjsuEg+xbzs29e8ftvbTCNqaWMVdX05N4QNAqohq2BlEkIyFtDH8Qg==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/system-datetime/-/system-datetime-6.0.94.tgz", - "dependencies": {} - }, - "@ax/st-docs": { - "name": "@ax/st-docs", - "version": "6.1.59", - "integrity": "sha512-yKvjrpe7o6MQYeAHNxkSGtHXWn7sMDSLt0HzqxFSNGiw3OFQwYADSRTEpgi7TETA1u4pBbNTOCie4TDtYyYhiw==", - "resolved": "https://registry.simatic-ax.siemens.io/@ax/st-docs/-/st-docs-6.1.59.tgz", + "version": "7.1.47", + "integrity": "sha512-yk8erRctiVKHjpe1nca9WUhatotm6S5lEkye4R2XBl7vU7CaPp84q7MzhkSCgQYn08LJqlFRBbxP+bpERiei8g==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/system-datetime/-/system-datetime-7.1.47.tgz", "dependencies": {} } }, diff --git a/src/tests.integrations/integrated/src/ax/apax.yml b/src/tests.integrations/integrated/src/ax/apax.yml index 4129cb5ef..11613d5b3 100644 --- a/src/tests.integrations/integrated/src/ax/apax.yml +++ b/src/tests.integrations/integrated/src/ax/apax.yml @@ -3,27 +3,21 @@ version: 0.0.0 type: app targets: - "1500" - - llvm - - plcsim - - swcpu devDependencies: - "@ax/sdk": ^2311.0.1 + "@ax/sdk": 2405.2.0 + "@ax/sld": ^3.0.6-alpha variables: APAX_BUILD_ARGS: [ -d ] + # AXTARGET: $AXTARGET + # AXTARGETPLATFORMINPUT: $AXTARGETPLATFORMINPUT + # AX_USERNAME: $AX_USERNAME + # AX_TARGET_PWD: $AX_TARGET_PWD + # MY_VERY_STRONG_PASSWORD: $AX_TARGET_PWD + COM_CERT_PATH: .\certs\Communication.cer scripts: ixc: - - dotnet run --project - ..\\..\\..\\..\\AXSharp.compiler\\src\\ixc\\AXSharp.ixc.csproj --framework - net7.0 - postbuild: dotnet run --project - ..\\..\\..\\..\\AXSharp.compiler\\src\\ixc\\AXSharp.ixc.csproj --framework - net7.0 - download: - - apax install - - apax build - # Here you will need to set the argumen -t to your plc OP and -i to platfrom you are dowloading to - # --default-server-interface is a must if you are using WebAPI - - apax sld load --accept-security-disclaimer -t $AXTARGET -i - $AXTARGETPLATFORMINPUT -r -installStrategy: strict + - dotnet run --project ..\\..\\..\\..\\AXSharp.compiler\\src\\ixc\\AXSharp.ixc.csproj --framework net9.0 + postbuild: dotnet run --project ..\\..\\..\\..\\AXSharp.compiler\\src\\ixc\\AXSharp.ixc.csproj --framework net9.0 + download: apax sld load --accept-security-disclaimer -t $AXTARGET -i $AXTARGETPLATFORMINPUT -r -C $COM_CERT_PATH --password $AX_TARGET_PWD --username $AX_USERNAME +installStrategy: overridable apaxVersion: 3.1.1 diff --git a/src/tests.integrations/integrated/src/ax/certs/Communication.cer b/src/tests.integrations/integrated/src/ax/certs/Communication.cer new file mode 100644 index 000000000..8841b56ed Binary files /dev/null and b/src/tests.integrations/integrated/src/ax/certs/Communication.cer differ diff --git a/src/tests.integrations/integrated/src/ax/certs/S71516-hw.cer b/src/tests.integrations/integrated/src/ax/certs/S71516-hw.cer new file mode 100644 index 000000000..2315d3ac0 Binary files /dev/null and b/src/tests.integrations/integrated/src/ax/certs/S71516-hw.cer differ diff --git a/src/tests.integrations/integrated/src/integrated.app/Pages/OnlineShadowPlain/OnlineShadowPlain.razor b/src/tests.integrations/integrated/src/integrated.app/Pages/OnlineShadowPlain/OnlineShadowPlain.razor index d356cdd28..c61bff939 100644 --- a/src/tests.integrations/integrated/src/integrated.app/Pages/OnlineShadowPlain/OnlineShadowPlain.razor +++ b/src/tests.integrations/integrated/src/integrated.app/Pages/OnlineShadowPlain/OnlineShadowPlain.razor @@ -38,26 +38,26 @@ private void OnlinerToPlain() { - var plain = Entry.Plc.RealMonster.OnlineToPlain(); + var plain = Entry.Plc.RealMonster.OnlineToPlain(); Console.WriteLine(plain); } private void PlainToOnline() { - var plainMonster = new Pocos.RealMonsterData.RealMonster(); + var plainMonster = new RealMonsterData.Pocos.RealMonster(); plainMonster.Description = "This comes from plain to online"; Entry.Plc.RealMonster.PlainToOnline(plainMonster); } private void ShadowToPlain() { - var plain = Entry.Plc.RealMonster.ShadowToPlain(); + var plain = Entry.Plc.RealMonster.ShadowToPlain(); Console.WriteLine(plain); } private void PlainToShadow() { - var plainMonster = new Pocos.RealMonsterData.RealMonster(); + var plainMonster = new RealMonsterData.Pocos.RealMonster(); plainMonster.Description = "This comes from plain to shadow"; Entry.Plc.RealMonster.PlainToShadow(plainMonster); } diff --git a/src/tests.integrations/integrated/src/integrated.app/integrated.hmi.csproj b/src/tests.integrations/integrated/src/integrated.app/integrated.hmi.csproj index 4344f28f4..13c430df7 100644 --- a/src/tests.integrations/integrated/src/integrated.app/integrated.hmi.csproj +++ b/src/tests.integrations/integrated/src/integrated.app/integrated.hmi.csproj @@ -22,10 +22,13 @@ - - - - + + + + diff --git a/src/tests.integrations/integrated/src/integrated.twin/.g/Onliners/configuration.g.cs b/src/tests.integrations/integrated/src/integrated.twin/.g/Onliners/configuration.g.cs index a41e2e506..a79c9e2b7 100644 --- a/src/tests.integrations/integrated/src/integrated.twin/.g/Onliners/configuration.g.cs +++ b/src/tests.integrations/integrated/src/integrated.twin/.g/Onliners/configuration.g.cs @@ -9,71 +9,38 @@ public partial class integratedTwinController : ITwinController { public AXSharp.Connector.Connector Connector { get; } - public MonsterData.Monster Monster { get; } - public MonsterData.Monster OnlineToPlain_should_copy_entire_structure { get; } - public MonsterData.Monster PlainToOnline_should_copy_entire_structure { get; } - public MonsterData.Monster OnlineToShadowAsync_should_copy_entire_structure { get; } - public MonsterData.Monster ShadowToOnlineAsync_should_copy_entire_structure { get; } - public MonsterData.Monster ITwinObjectOnlineToPlain_should_copy_entire_structure { get; } - public MonsterData.Monster ITwinObjectPlainToOnline_should_copy_entire_structure { get; } - public MonsterData.Monster ITwinObjectOnlineToShadowAsync_should_copy_entire_structure { get; } - public MonsterData.Monster ITwinObjectShadowToOnlineAsync_should_copy_entire_structure { get; } - public MonsterData.Monster ShadowToPlainAsync_should_copy_entire_structure { get; } - public MonsterData.Monster PlainToShadowAsync_should_copy_entire_structure { get; } - public MonsterData.Monster ITwinObjectShadowToPlainAsync_should_copy_entire_structure { get; } - public MonsterData.Monster ITwinObjectPlainToShadowAsync_should_copy_entire_structure { get; } - public Pokus Pokus { get; } - public RealMonsterData.RealMonster RealMonster { get; } - public RealMonsterData.RealMonster OnlineToShadow_should_copy { get; } - public RealMonsterData.RealMonster ShadowToOnline_should_copy { get; } - public RealMonsterData.RealMonster OnlineToPlain_should_copy { get; } - public RealMonsterData.RealMonster PlainToOnline_should_copy { get; } - public RealMonsterData.RealMonster ITwinObjectOnlineToShadow_should_copy { get; } - public RealMonsterData.RealMonster ITwinObjectShadowToOnline_should_copy { get; } - public RealMonsterData.RealMonster ITwinObjectOnlineToPlain_should_copy { get; } - public RealMonsterData.RealMonster ITwinObjectPlainToOnline_should_copy { get; } - public all_primitives p_online_shadow { get; } - public all_primitives p_shadow_online { get; } - public all_primitives p_online_plain { get; } - public all_primitives p_plain_online { get; } - public all_primitives p_shadow_plain { get; } - public all_primitives p_plain_shadow { get; } - public RealMonsterData.RealMonster StartPolling_should_update_cyclic_property { get; } - public RealMonsterData.RealMonster StartPolling_ConcurentOverload { get; } - public RealMonsterData.RealMonster ChangeDetections { get; } - public GH_ISSUE_183.GH_ISSUE_183_1 GH_ISSUE_183 { get; } public integratedTwinController(AXSharp.Connector.ConnectorAdapter adapter, object[] parameters) @@ -175,24 +142,24 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.Pokus plain = new Pocos.Pokus(); + global::Pocos.Pokus plain = new global::Pocos.Pokus(); 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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.Pokus plain = new Pocos.Pokus(); + global::Pocos.Pokus plain = new global::Pocos.Pokus(); 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(Pocos.Pokus plain) + protected async Task _OnlineToPlainNoacAsync(global::Pocos.Pokus plain) { return plain; } @@ -202,14 +169,14 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.Pokus plain) + public async Task> PlainToOnlineAsync(global::Pocos.Pokus 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(Pocos.Pokus plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.Pokus plain) { } @@ -218,13 +185,13 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.Pokus plain = new Pocos.Pokus(); + global::Pocos.Pokus plain = new global::Pocos.Pokus(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.Pokus plain) + protected async Task ShadowToPlainAsync(global::Pocos.Pokus plain) { return plain; } @@ -234,7 +201,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.Pokus plain) + public async Task> PlainToShadowAsync(global::Pocos.Pokus plain) { return this.RetrievePrimitives(); } @@ -249,7 +216,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.Pokus plain, Pocos.Pokus latest = null) + public async Task DetectsAnyChangeAsync(global::Pocos.Pokus plain, global::Pocos.Pokus latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -266,24 +233,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.Pokus CreateEmptyPoco() + public global::Pocos.Pokus CreateEmptyPoco() { - return new Pocos.Pokus(); + return new global::Pocos.Pokus(); } 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; @@ -340,9 +310,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::integrated.PlcTranslator.Instance; } @@ -368,24 +336,24 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.Nested plain = new Pocos.Nested(); + global::Pocos.Nested plain = new global::Pocos.Nested(); 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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.Nested plain = new Pocos.Nested(); + global::Pocos.Nested plain = new global::Pocos.Nested(); 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(Pocos.Nested plain) + protected async Task _OnlineToPlainNoacAsync(global::Pocos.Nested plain) { return plain; } @@ -395,14 +363,14 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.Nested plain) + public async Task> PlainToOnlineAsync(global::Pocos.Nested 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(Pocos.Nested plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.Nested plain) { } @@ -411,13 +379,13 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.Nested plain = new Pocos.Nested(); + global::Pocos.Nested plain = new global::Pocos.Nested(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.Nested plain) + protected async Task ShadowToPlainAsync(global::Pocos.Nested plain) { return plain; } @@ -427,7 +395,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.Nested plain) + public async Task> PlainToShadowAsync(global::Pocos.Nested plain) { return this.RetrievePrimitives(); } @@ -442,7 +410,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.Nested plain, Pocos.Nested latest = null) + public async Task DetectsAnyChangeAsync(global::Pocos.Nested plain, global::Pocos.Nested latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -459,24 +427,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.Nested CreateEmptyPoco() + public global::Pocos.Nested CreateEmptyPoco() { - return new Pocos.Nested(); + return new global::Pocos.Nested(); } 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; @@ -533,8 +504,6 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::integrated.PlcTranslator.Instance; } \ No newline at end of file diff --git a/src/tests.integrations/integrated/src/integrated.twin/.g/Onliners/dataswapping/all_primitives.g.cs b/src/tests.integrations/integrated/src/integrated.twin/.g/Onliners/dataswapping/all_primitives.g.cs index 3d7e3cdf8..eb460203a 100644 --- a/src/tests.integrations/integrated/src/integrated.twin/.g/Onliners/dataswapping/all_primitives.g.cs +++ b/src/tests.integrations/integrated/src/integrated.twin/.g/Onliners/dataswapping/all_primitives.g.cs @@ -8,47 +8,26 @@ public partial 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; } [AXSharp.Connector.EnumeratorDiscriminatorAttribute(typeof(myEnum))] @@ -97,9 +76,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.all_primitives plain = new Pocos.all_primitives(); + global::Pocos.all_primitives plain = new global::Pocos.all_primitives(); await this.ReadAsync(); plain.myBOOL = myBOOL.LastValue; plain.myBYTE = myBYTE.LastValue; @@ -129,9 +108,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.all_primitives plain = new Pocos.all_primitives(); + global::Pocos.all_primitives plain = new global::Pocos.all_primitives(); plain.myBOOL = myBOOL.LastValue; plain.myBYTE = myBYTE.LastValue; plain.myWORD = myWORD.LastValue; @@ -160,7 +139,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.all_primitives plain) + protected async Task _OnlineToPlainNoacAsync(global::Pocos.all_primitives plain) { plain.myBOOL = myBOOL.LastValue; plain.myBYTE = myBYTE.LastValue; @@ -193,7 +172,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.all_primitives plain) + public async Task> PlainToOnlineAsync(global::Pocos.all_primitives plain) { #pragma warning disable CS0612 myBOOL.LethargicWrite(plain.myBOOL); @@ -269,7 +248,7 @@ public async Task> PlainToOnlineAsync(Pocos.all_prim [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(Pocos.all_primitives plain) + public async Task _PlainToOnlineNoacAsync(global::Pocos.all_primitives plain) { #pragma warning disable CS0612 myBOOL.LethargicWrite(plain.myBOOL); @@ -347,9 +326,9 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.all_primitives plain = new Pocos.all_primitives(); + global::Pocos.all_primitives plain = new global::Pocos.all_primitives(); plain.myBOOL = myBOOL.Shadow; plain.myBYTE = myBYTE.Shadow; plain.myWORD = myWORD.Shadow; @@ -376,7 +355,7 @@ public async virtual Task ShadowToPlain() return plain; } - protected async Task ShadowToPlainAsync(Pocos.all_primitives plain) + protected async Task ShadowToPlainAsync(global::Pocos.all_primitives plain) { plain.myBOOL = myBOOL.Shadow; plain.myBYTE = myBYTE.Shadow; @@ -409,7 +388,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.all_primitives plain) + public async Task> PlainToShadowAsync(global::Pocos.all_primitives plain) { myBOOL.Shadow = plain.myBOOL; myBYTE.Shadow = plain.myBYTE; @@ -447,7 +426,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.all_primitives plain, Pocos.all_primitives latest = null) + public async Task DetectsAnyChangeAsync(global::Pocos.all_primitives plain, global::Pocos.all_primitives latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -510,24 +489,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.all_primitives CreateEmptyPoco() + public global::Pocos.all_primitives CreateEmptyPoco() { - return new Pocos.all_primitives(); + return new global::Pocos.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; @@ -584,8 +566,6 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::integrated.PlcTranslator.Instance; } \ No newline at end of file diff --git a/src/tests.integrations/integrated/src/integrated.twin/.g/Onliners/dataswapping/moster.g.cs b/src/tests.integrations/integrated/src/integrated.twin/.g/Onliners/dataswapping/moster.g.cs index 1ae348928..7375a042b 100644 --- a/src/tests.integrations/integrated/src/integrated.twin/.g/Onliners/dataswapping/moster.g.cs +++ b/src/tests.integrations/integrated/src/integrated.twin/.g/Onliners/dataswapping/moster.g.cs @@ -10,11 +10,8 @@ namespace MonsterData public partial class MonsterBase : AXSharp.Connector.ITwinObject { public OnlinerString Description { get; } - public OnlinerULInt Id { get; } - public OnlinerByte[] ArrayOfBytes { get; } - public MonsterData.DriveBase[] ArrayOfDrives { get; } [IgnoreOnPocoOperation()] @@ -51,9 +48,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.MonsterData.MonsterBase plain = new Pocos.MonsterData.MonsterBase(); + MonsterData.Pocos.MonsterBase plain = new MonsterData.Pocos.MonsterBase(); await this.ReadAsync(); plain.Description = Description.LastValue; plain.Id = Id.LastValue; @@ -70,9 +67,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.MonsterData.MonsterBase plain = new Pocos.MonsterData.MonsterBase(); + MonsterData.Pocos.MonsterBase plain = new MonsterData.Pocos.MonsterBase(); plain.Description = Description.LastValue; plain.Id = Id.LastValue; plain.ArrayOfBytes = ArrayOfBytes.Select(p => p.LastValue).ToArray(); @@ -88,7 +85,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.MonsterData.MonsterBase plain) + protected async Task _OnlineToPlainNoacAsync(MonsterData.Pocos.MonsterBase plain) { plain.Description = Description.LastValue; plain.Id = Id.LastValue; @@ -108,7 +105,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.MonsterData.MonsterBase plain) + public async Task> PlainToOnlineAsync(MonsterData.Pocos.MonsterBase plain) { #pragma warning disable CS0612 Description.LethargicWrite(plain.Description); @@ -135,7 +132,7 @@ public async Task> PlainToOnlineAsync(Pocos.MonsterD [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(Pocos.MonsterData.MonsterBase plain) + public async Task _PlainToOnlineNoacAsync(MonsterData.Pocos.MonsterBase plain) { #pragma warning disable CS0612 Description.LethargicWrite(plain.Description); @@ -164,9 +161,9 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.MonsterData.MonsterBase plain = new Pocos.MonsterData.MonsterBase(); + MonsterData.Pocos.MonsterBase plain = new MonsterData.Pocos.MonsterBase(); plain.Description = Description.Shadow; plain.Id = Id.Shadow; plain.ArrayOfBytes = ArrayOfBytes.Select(p => p.Shadow).ToArray(); @@ -176,7 +173,7 @@ public async virtual Task ShadowToPlain() return plain; } - protected async Task ShadowToPlainAsync(Pocos.MonsterData.MonsterBase plain) + protected async Task ShadowToPlainAsync(MonsterData.Pocos.MonsterBase plain) { plain.Description = Description.Shadow; plain.Id = Id.Shadow; @@ -192,7 +189,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.MonsterData.MonsterBase plain) + public async Task> PlainToShadowAsync(MonsterData.Pocos.MonsterBase plain) { Description.Shadow = plain.Description; Id.Shadow = plain.Id; @@ -215,7 +212,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.MonsterData.MonsterBase plain, Pocos.MonsterData.MonsterBase latest = null) + public async Task DetectsAnyChangeAsync(MonsterData.Pocos.MonsterBase plain, MonsterData.Pocos.MonsterBase latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -252,24 +249,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.MonsterData.MonsterBase CreateEmptyPoco() + public MonsterData.Pocos.MonsterBase CreateEmptyPoco() { - return new Pocos.MonsterData.MonsterBase(); + return new MonsterData.Pocos.MonsterBase(); } 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; @@ -326,9 +326,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::integrated.PlcTranslator.Instance; } @@ -351,9 +349,9 @@ public async override Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public new async Task OnlineToPlainAsync() + public new async Task OnlineToPlainAsync() { - Pocos.MonsterData.Monster plain = new Pocos.MonsterData.Monster(); + MonsterData.Pocos.Monster plain = new MonsterData.Pocos.Monster(); await this.ReadAsync(); #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); @@ -366,9 +364,9 @@ public async override Task OnlineToPlain() [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() + public new async Task _OnlineToPlainNoacAsync() { - Pocos.MonsterData.Monster plain = new Pocos.MonsterData.Monster(); + MonsterData.Pocos.Monster plain = new MonsterData.Pocos.Monster(); #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); #pragma warning restore CS0612 @@ -380,7 +378,7 @@ public async override Task OnlineToPlain() [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(Pocos.MonsterData.Monster plain) + protected async Task _OnlineToPlainNoacAsync(MonsterData.Pocos.Monster plain) { #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); @@ -396,7 +394,7 @@ public async override Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.MonsterData.Monster plain) + public async Task> PlainToOnlineAsync(MonsterData.Pocos.Monster plain) { await base._PlainToOnlineNoacAsync(plain); #pragma warning disable CS0612 @@ -407,7 +405,7 @@ public async Task> PlainToOnlineAsync(Pocos.MonsterD [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(Pocos.MonsterData.Monster plain) + public async Task _PlainToOnlineNoacAsync(MonsterData.Pocos.Monster plain) { await base._PlainToOnlineNoacAsync(plain); #pragma warning disable CS0612 @@ -420,15 +418,15 @@ public async override Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public new async Task ShadowToPlainAsync() + public new async Task ShadowToPlainAsync() { - Pocos.MonsterData.Monster plain = new Pocos.MonsterData.Monster(); + MonsterData.Pocos.Monster plain = new MonsterData.Pocos.Monster(); await base.ShadowToPlainAsync(plain); plain.DriveA = await DriveA.ShadowToPlainAsync(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.MonsterData.Monster plain) + protected async Task ShadowToPlainAsync(MonsterData.Pocos.Monster plain) { await base.ShadowToPlainAsync(plain); plain.DriveA = await DriveA.ShadowToPlainAsync(); @@ -440,7 +438,7 @@ public async override Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.MonsterData.Monster plain) + public async Task> PlainToShadowAsync(MonsterData.Pocos.Monster plain) { await base.PlainToShadowAsync(plain); await this.DriveA.PlainToShadowAsync(plain.DriveA); @@ -457,7 +455,7 @@ public async override Task AnyChangeAsync(T 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(Pocos.MonsterData.Monster plain, Pocos.MonsterData.Monster latest = null) + public new async Task DetectsAnyChangeAsync(MonsterData.Pocos.Monster plain, MonsterData.Pocos.Monster latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -478,20 +476,17 @@ public async override Task AnyChangeAsync(T plain) this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public new Pocos.MonsterData.Monster CreateEmptyPoco() + public new MonsterData.Pocos.Monster CreateEmptyPoco() { - return new Pocos.MonsterData.Monster(); + return new MonsterData.Pocos.Monster(); } } public partial class DriveBase : AXSharp.Connector.ITwinObject { public OnlinerLReal Position { get; } - public OnlinerLReal Velo { get; } - public OnlinerLReal Acc { get; } - public OnlinerLReal Dcc { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -518,9 +513,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.MonsterData.DriveBase plain = new Pocos.MonsterData.DriveBase(); + MonsterData.Pocos.DriveBase plain = new MonsterData.Pocos.DriveBase(); await this.ReadAsync(); plain.Position = Position.LastValue; plain.Velo = Velo.LastValue; @@ -531,9 +526,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.MonsterData.DriveBase plain = new Pocos.MonsterData.DriveBase(); + MonsterData.Pocos.DriveBase plain = new MonsterData.Pocos.DriveBase(); plain.Position = Position.LastValue; plain.Velo = Velo.LastValue; plain.Acc = Acc.LastValue; @@ -543,7 +538,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.MonsterData.DriveBase plain) + protected async Task _OnlineToPlainNoacAsync(MonsterData.Pocos.DriveBase plain) { plain.Position = Position.LastValue; plain.Velo = Velo.LastValue; @@ -557,7 +552,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.MonsterData.DriveBase plain) + public async Task> PlainToOnlineAsync(MonsterData.Pocos.DriveBase plain) { #pragma warning disable CS0612 Position.LethargicWrite(plain.Position); @@ -576,7 +571,7 @@ public async Task> PlainToOnlineAsync(Pocos.MonsterD [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(Pocos.MonsterData.DriveBase plain) + public async Task _PlainToOnlineNoacAsync(MonsterData.Pocos.DriveBase plain) { #pragma warning disable CS0612 Position.LethargicWrite(plain.Position); @@ -597,9 +592,9 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.MonsterData.DriveBase plain = new Pocos.MonsterData.DriveBase(); + MonsterData.Pocos.DriveBase plain = new MonsterData.Pocos.DriveBase(); plain.Position = Position.Shadow; plain.Velo = Velo.Shadow; plain.Acc = Acc.Shadow; @@ -607,7 +602,7 @@ public async virtual Task ShadowToPlain() return plain; } - protected async Task ShadowToPlainAsync(Pocos.MonsterData.DriveBase plain) + protected async Task ShadowToPlainAsync(MonsterData.Pocos.DriveBase plain) { plain.Position = Position.Shadow; plain.Velo = Velo.Shadow; @@ -621,7 +616,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.MonsterData.DriveBase plain) + public async Task> PlainToShadowAsync(MonsterData.Pocos.DriveBase plain) { Position.Shadow = plain.Position; Velo.Shadow = plain.Velo; @@ -640,7 +635,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.MonsterData.DriveBase plain, Pocos.MonsterData.DriveBase latest = null) + public async Task DetectsAnyChangeAsync(MonsterData.Pocos.DriveBase plain, MonsterData.Pocos.DriveBase latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -665,24 +660,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.MonsterData.DriveBase CreateEmptyPoco() + public MonsterData.Pocos.DriveBase CreateEmptyPoco() { - return new Pocos.MonsterData.DriveBase(); + return new MonsterData.Pocos.DriveBase(); } 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; @@ -739,9 +737,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::integrated.PlcTranslator.Instance; } } \ No newline at end of file diff --git a/src/tests.integrations/integrated/src/integrated.twin/.g/Onliners/dataswapping/realmonster.g.cs b/src/tests.integrations/integrated/src/integrated.twin/.g/Onliners/dataswapping/realmonster.g.cs index 84b21cd96..df5765669 100644 --- a/src/tests.integrations/integrated/src/integrated.twin/.g/Onliners/dataswapping/realmonster.g.cs +++ b/src/tests.integrations/integrated/src/integrated.twin/.g/Onliners/dataswapping/realmonster.g.cs @@ -10,17 +10,11 @@ namespace RealMonsterData public partial class RealMonsterBase : AXSharp.Connector.ITwinObject { public OnlinerString Description { get; } - public OnlinerULInt Id { get; } - public OnlinerDate TestDate { get; } - public OnlinerDateTime TestDateTime { get; } - public OnlinerTimeOfDay TestTimeSpan { get; } - public OnlinerByte[] ArrayOfBytes { get; } - public RealMonsterData.DriveBaseNested[] ArrayOfDrives { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -52,9 +46,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.RealMonsterData.RealMonsterBase plain = new Pocos.RealMonsterData.RealMonsterBase(); + RealMonsterData.Pocos.RealMonsterBase plain = new RealMonsterData.Pocos.RealMonsterBase(); await this.ReadAsync(); plain.Description = Description.LastValue; plain.Id = Id.LastValue; @@ -70,9 +64,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.RealMonsterData.RealMonsterBase plain = new Pocos.RealMonsterData.RealMonsterBase(); + RealMonsterData.Pocos.RealMonsterBase plain = new RealMonsterData.Pocos.RealMonsterBase(); plain.Description = Description.LastValue; plain.Id = Id.LastValue; plain.TestDate = TestDate.LastValue; @@ -87,7 +81,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.RealMonsterData.RealMonsterBase plain) + protected async Task _OnlineToPlainNoacAsync(RealMonsterData.Pocos.RealMonsterBase plain) { plain.Description = Description.LastValue; plain.Id = Id.LastValue; @@ -106,7 +100,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.RealMonsterData.RealMonsterBase plain) + public async Task> PlainToOnlineAsync(RealMonsterData.Pocos.RealMonsterBase plain) { #pragma warning disable CS0612 Description.LethargicWrite(plain.Description); @@ -136,7 +130,7 @@ public async Task> PlainToOnlineAsync(Pocos.RealMons [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(Pocos.RealMonsterData.RealMonsterBase plain) + public async Task _PlainToOnlineNoacAsync(RealMonsterData.Pocos.RealMonsterBase plain) { #pragma warning disable CS0612 Description.LethargicWrite(plain.Description); @@ -168,9 +162,9 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.RealMonsterData.RealMonsterBase plain = new Pocos.RealMonsterData.RealMonsterBase(); + RealMonsterData.Pocos.RealMonsterBase plain = new RealMonsterData.Pocos.RealMonsterBase(); plain.Description = Description.Shadow; plain.Id = Id.Shadow; plain.TestDate = TestDate.Shadow; @@ -181,7 +175,7 @@ public async virtual Task ShadowToPlain() return plain; } - protected async Task ShadowToPlainAsync(Pocos.RealMonsterData.RealMonsterBase plain) + protected async Task ShadowToPlainAsync(RealMonsterData.Pocos.RealMonsterBase plain) { plain.Description = Description.Shadow; plain.Id = Id.Shadow; @@ -198,7 +192,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.RealMonsterData.RealMonsterBase plain) + public async Task> PlainToShadowAsync(RealMonsterData.Pocos.RealMonsterBase plain) { Description.Shadow = plain.Description; Id.Shadow = plain.Id; @@ -222,7 +216,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.RealMonsterData.RealMonsterBase plain, Pocos.RealMonsterData.RealMonsterBase latest = null) + public async Task DetectsAnyChangeAsync(RealMonsterData.Pocos.RealMonsterBase plain, RealMonsterData.Pocos.RealMonsterBase latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -261,24 +255,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.RealMonsterData.RealMonsterBase CreateEmptyPoco() + public RealMonsterData.Pocos.RealMonsterBase CreateEmptyPoco() { - return new Pocos.RealMonsterData.RealMonsterBase(); + return new RealMonsterData.Pocos.RealMonsterBase(); } 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; @@ -335,9 +332,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::integrated.PlcTranslator.Instance; } @@ -360,9 +355,9 @@ public async override Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public new async Task OnlineToPlainAsync() + public new async Task OnlineToPlainAsync() { - Pocos.RealMonsterData.RealMonster plain = new Pocos.RealMonsterData.RealMonster(); + RealMonsterData.Pocos.RealMonster plain = new RealMonsterData.Pocos.RealMonster(); await this.ReadAsync(); #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); @@ -375,9 +370,9 @@ public async override Task OnlineToPlain() [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() + public new async Task _OnlineToPlainNoacAsync() { - Pocos.RealMonsterData.RealMonster plain = new Pocos.RealMonsterData.RealMonster(); + RealMonsterData.Pocos.RealMonster plain = new RealMonsterData.Pocos.RealMonster(); #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); #pragma warning restore CS0612 @@ -389,7 +384,7 @@ public async override Task OnlineToPlain() [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(Pocos.RealMonsterData.RealMonster plain) + protected async Task _OnlineToPlainNoacAsync(RealMonsterData.Pocos.RealMonster plain) { #pragma warning disable CS0612 await base._OnlineToPlainNoacAsync(plain); @@ -405,7 +400,7 @@ public async override Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.RealMonsterData.RealMonster plain) + public async Task> PlainToOnlineAsync(RealMonsterData.Pocos.RealMonster plain) { await base._PlainToOnlineNoacAsync(plain); #pragma warning disable CS0612 @@ -416,7 +411,7 @@ public async Task> PlainToOnlineAsync(Pocos.RealMons [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(Pocos.RealMonsterData.RealMonster plain) + public async Task _PlainToOnlineNoacAsync(RealMonsterData.Pocos.RealMonster plain) { await base._PlainToOnlineNoacAsync(plain); #pragma warning disable CS0612 @@ -429,15 +424,15 @@ public async override Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public new async Task ShadowToPlainAsync() + public new async Task ShadowToPlainAsync() { - Pocos.RealMonsterData.RealMonster plain = new Pocos.RealMonsterData.RealMonster(); + RealMonsterData.Pocos.RealMonster plain = new RealMonsterData.Pocos.RealMonster(); await base.ShadowToPlainAsync(plain); plain.DriveA = await DriveA.ShadowToPlainAsync(); return plain; } - protected async Task ShadowToPlainAsync(Pocos.RealMonsterData.RealMonster plain) + protected async Task ShadowToPlainAsync(RealMonsterData.Pocos.RealMonster plain) { await base.ShadowToPlainAsync(plain); plain.DriveA = await DriveA.ShadowToPlainAsync(); @@ -449,7 +444,7 @@ public async override Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.RealMonsterData.RealMonster plain) + public async Task> PlainToShadowAsync(RealMonsterData.Pocos.RealMonster plain) { await base.PlainToShadowAsync(plain); await this.DriveA.PlainToShadowAsync(plain.DriveA); @@ -466,7 +461,7 @@ public async override Task AnyChangeAsync(T 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(Pocos.RealMonsterData.RealMonster plain, Pocos.RealMonsterData.RealMonster latest = null) + public new async Task DetectsAnyChangeAsync(RealMonsterData.Pocos.RealMonster plain, RealMonsterData.Pocos.RealMonster latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -487,22 +482,18 @@ public async override Task AnyChangeAsync(T plain) this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public new Pocos.RealMonsterData.RealMonster CreateEmptyPoco() + public new RealMonsterData.Pocos.RealMonster CreateEmptyPoco() { - return new Pocos.RealMonsterData.RealMonster(); + return new RealMonsterData.Pocos.RealMonster(); } } public partial class DriveBaseNested : AXSharp.Connector.ITwinObject { public OnlinerLReal Position { get; } - public OnlinerLReal Velo { get; } - public OnlinerLReal Acc { get; } - public OnlinerLReal Dcc { get; } - public RealMonsterData.NestedLevelOne NestedLevelOne { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -530,9 +521,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.RealMonsterData.DriveBaseNested plain = new Pocos.RealMonsterData.DriveBaseNested(); + RealMonsterData.Pocos.DriveBaseNested plain = new RealMonsterData.Pocos.DriveBaseNested(); await this.ReadAsync(); plain.Position = Position.LastValue; plain.Velo = Velo.LastValue; @@ -546,9 +537,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.RealMonsterData.DriveBaseNested plain = new Pocos.RealMonsterData.DriveBaseNested(); + RealMonsterData.Pocos.DriveBaseNested plain = new RealMonsterData.Pocos.DriveBaseNested(); plain.Position = Position.LastValue; plain.Velo = Velo.LastValue; plain.Acc = Acc.LastValue; @@ -561,7 +552,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.RealMonsterData.DriveBaseNested plain) + protected async Task _OnlineToPlainNoacAsync(RealMonsterData.Pocos.DriveBaseNested plain) { plain.Position = Position.LastValue; plain.Velo = Velo.LastValue; @@ -578,7 +569,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.RealMonsterData.DriveBaseNested plain) + public async Task> PlainToOnlineAsync(RealMonsterData.Pocos.DriveBaseNested plain) { #pragma warning disable CS0612 Position.LethargicWrite(plain.Position); @@ -600,7 +591,7 @@ public async Task> PlainToOnlineAsync(Pocos.RealMons [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(Pocos.RealMonsterData.DriveBaseNested plain) + public async Task _PlainToOnlineNoacAsync(RealMonsterData.Pocos.DriveBaseNested plain) { #pragma warning disable CS0612 Position.LethargicWrite(plain.Position); @@ -624,9 +615,9 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.RealMonsterData.DriveBaseNested plain = new Pocos.RealMonsterData.DriveBaseNested(); + RealMonsterData.Pocos.DriveBaseNested plain = new RealMonsterData.Pocos.DriveBaseNested(); plain.Position = Position.Shadow; plain.Velo = Velo.Shadow; plain.Acc = Acc.Shadow; @@ -635,7 +626,7 @@ public async virtual Task ShadowToPlain() return plain; } - protected async Task ShadowToPlainAsync(Pocos.RealMonsterData.DriveBaseNested plain) + protected async Task ShadowToPlainAsync(RealMonsterData.Pocos.DriveBaseNested plain) { plain.Position = Position.Shadow; plain.Velo = Velo.Shadow; @@ -650,7 +641,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.RealMonsterData.DriveBaseNested plain) + public async Task> PlainToShadowAsync(RealMonsterData.Pocos.DriveBaseNested plain) { Position.Shadow = plain.Position; Velo.Shadow = plain.Velo; @@ -670,7 +661,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.RealMonsterData.DriveBaseNested plain, Pocos.RealMonsterData.DriveBaseNested latest = null) + public async Task DetectsAnyChangeAsync(RealMonsterData.Pocos.DriveBaseNested plain, RealMonsterData.Pocos.DriveBaseNested latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -697,24 +688,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.RealMonsterData.DriveBaseNested CreateEmptyPoco() + public RealMonsterData.Pocos.DriveBaseNested CreateEmptyPoco() { - return new Pocos.RealMonsterData.DriveBaseNested(); + return new RealMonsterData.Pocos.DriveBaseNested(); } 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; @@ -771,22 +765,16 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::integrated.PlcTranslator.Instance; } public partial class NestedLevelOne : AXSharp.Connector.ITwinObject { public OnlinerLReal Position { get; } - public OnlinerLReal Velo { get; } - public OnlinerLReal Acc { get; } - public OnlinerLReal Dcc { get; } - public RealMonsterData.NestedLevelTwo NestedLevelTwo { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -814,9 +802,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.RealMonsterData.NestedLevelOne plain = new Pocos.RealMonsterData.NestedLevelOne(); + RealMonsterData.Pocos.NestedLevelOne plain = new RealMonsterData.Pocos.NestedLevelOne(); await this.ReadAsync(); plain.Position = Position.LastValue; plain.Velo = Velo.LastValue; @@ -830,9 +818,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.RealMonsterData.NestedLevelOne plain = new Pocos.RealMonsterData.NestedLevelOne(); + RealMonsterData.Pocos.NestedLevelOne plain = new RealMonsterData.Pocos.NestedLevelOne(); plain.Position = Position.LastValue; plain.Velo = Velo.LastValue; plain.Acc = Acc.LastValue; @@ -845,7 +833,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.RealMonsterData.NestedLevelOne plain) + protected async Task _OnlineToPlainNoacAsync(RealMonsterData.Pocos.NestedLevelOne plain) { plain.Position = Position.LastValue; plain.Velo = Velo.LastValue; @@ -862,7 +850,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.RealMonsterData.NestedLevelOne plain) + public async Task> PlainToOnlineAsync(RealMonsterData.Pocos.NestedLevelOne plain) { #pragma warning disable CS0612 Position.LethargicWrite(plain.Position); @@ -884,7 +872,7 @@ public async Task> PlainToOnlineAsync(Pocos.RealMons [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(Pocos.RealMonsterData.NestedLevelOne plain) + public async Task _PlainToOnlineNoacAsync(RealMonsterData.Pocos.NestedLevelOne plain) { #pragma warning disable CS0612 Position.LethargicWrite(plain.Position); @@ -908,9 +896,9 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.RealMonsterData.NestedLevelOne plain = new Pocos.RealMonsterData.NestedLevelOne(); + RealMonsterData.Pocos.NestedLevelOne plain = new RealMonsterData.Pocos.NestedLevelOne(); plain.Position = Position.Shadow; plain.Velo = Velo.Shadow; plain.Acc = Acc.Shadow; @@ -919,7 +907,7 @@ public async virtual Task ShadowToPlain() return plain; } - protected async Task ShadowToPlainAsync(Pocos.RealMonsterData.NestedLevelOne plain) + protected async Task ShadowToPlainAsync(RealMonsterData.Pocos.NestedLevelOne plain) { plain.Position = Position.Shadow; plain.Velo = Velo.Shadow; @@ -934,7 +922,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.RealMonsterData.NestedLevelOne plain) + public async Task> PlainToShadowAsync(RealMonsterData.Pocos.NestedLevelOne plain) { Position.Shadow = plain.Position; Velo.Shadow = plain.Velo; @@ -954,7 +942,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.RealMonsterData.NestedLevelOne plain, Pocos.RealMonsterData.NestedLevelOne latest = null) + public async Task DetectsAnyChangeAsync(RealMonsterData.Pocos.NestedLevelOne plain, RealMonsterData.Pocos.NestedLevelOne latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -981,24 +969,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.RealMonsterData.NestedLevelOne CreateEmptyPoco() + public RealMonsterData.Pocos.NestedLevelOne CreateEmptyPoco() { - return new Pocos.RealMonsterData.NestedLevelOne(); + return new RealMonsterData.Pocos.NestedLevelOne(); } 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; @@ -1055,22 +1046,16 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::integrated.PlcTranslator.Instance; } public partial class NestedLevelTwo : AXSharp.Connector.ITwinObject { public OnlinerLReal Position { get; } - public OnlinerLReal Velo { get; } - public OnlinerLReal Acc { get; } - public OnlinerLReal Dcc { get; } - public RealMonsterData.NestedLevelThree NestedLevelThree { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -1098,9 +1083,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.RealMonsterData.NestedLevelTwo plain = new Pocos.RealMonsterData.NestedLevelTwo(); + RealMonsterData.Pocos.NestedLevelTwo plain = new RealMonsterData.Pocos.NestedLevelTwo(); await this.ReadAsync(); plain.Position = Position.LastValue; plain.Velo = Velo.LastValue; @@ -1114,9 +1099,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.RealMonsterData.NestedLevelTwo plain = new Pocos.RealMonsterData.NestedLevelTwo(); + RealMonsterData.Pocos.NestedLevelTwo plain = new RealMonsterData.Pocos.NestedLevelTwo(); plain.Position = Position.LastValue; plain.Velo = Velo.LastValue; plain.Acc = Acc.LastValue; @@ -1129,7 +1114,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.RealMonsterData.NestedLevelTwo plain) + protected async Task _OnlineToPlainNoacAsync(RealMonsterData.Pocos.NestedLevelTwo plain) { plain.Position = Position.LastValue; plain.Velo = Velo.LastValue; @@ -1146,7 +1131,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.RealMonsterData.NestedLevelTwo plain) + public async Task> PlainToOnlineAsync(RealMonsterData.Pocos.NestedLevelTwo plain) { #pragma warning disable CS0612 Position.LethargicWrite(plain.Position); @@ -1168,7 +1153,7 @@ public async Task> PlainToOnlineAsync(Pocos.RealMons [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(Pocos.RealMonsterData.NestedLevelTwo plain) + public async Task _PlainToOnlineNoacAsync(RealMonsterData.Pocos.NestedLevelTwo plain) { #pragma warning disable CS0612 Position.LethargicWrite(plain.Position); @@ -1192,9 +1177,9 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.RealMonsterData.NestedLevelTwo plain = new Pocos.RealMonsterData.NestedLevelTwo(); + RealMonsterData.Pocos.NestedLevelTwo plain = new RealMonsterData.Pocos.NestedLevelTwo(); plain.Position = Position.Shadow; plain.Velo = Velo.Shadow; plain.Acc = Acc.Shadow; @@ -1203,7 +1188,7 @@ public async virtual Task ShadowToPlain() return plain; } - protected async Task ShadowToPlainAsync(Pocos.RealMonsterData.NestedLevelTwo plain) + protected async Task ShadowToPlainAsync(RealMonsterData.Pocos.NestedLevelTwo plain) { plain.Position = Position.Shadow; plain.Velo = Velo.Shadow; @@ -1218,7 +1203,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.RealMonsterData.NestedLevelTwo plain) + public async Task> PlainToShadowAsync(RealMonsterData.Pocos.NestedLevelTwo plain) { Position.Shadow = plain.Position; Velo.Shadow = plain.Velo; @@ -1238,7 +1223,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.RealMonsterData.NestedLevelTwo plain, Pocos.RealMonsterData.NestedLevelTwo latest = null) + public async Task DetectsAnyChangeAsync(RealMonsterData.Pocos.NestedLevelTwo plain, RealMonsterData.Pocos.NestedLevelTwo latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -1265,24 +1250,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.RealMonsterData.NestedLevelTwo CreateEmptyPoco() + public RealMonsterData.Pocos.NestedLevelTwo CreateEmptyPoco() { - return new Pocos.RealMonsterData.NestedLevelTwo(); + return new RealMonsterData.Pocos.NestedLevelTwo(); } 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; @@ -1339,20 +1327,15 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::integrated.PlcTranslator.Instance; } public partial class NestedLevelThree : AXSharp.Connector.ITwinObject { public OnlinerLReal Position { get; } - public OnlinerLReal Velo { get; } - public OnlinerLReal Acc { get; } - public OnlinerLReal Dcc { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -1379,9 +1362,9 @@ public async virtual Task OnlineToPlain() return await (dynamic)this.OnlineToPlainAsync(); } - public async Task OnlineToPlainAsync() + public async Task OnlineToPlainAsync() { - Pocos.RealMonsterData.NestedLevelThree plain = new Pocos.RealMonsterData.NestedLevelThree(); + RealMonsterData.Pocos.NestedLevelThree plain = new RealMonsterData.Pocos.NestedLevelThree(); await this.ReadAsync(); plain.Position = Position.LastValue; plain.Velo = Velo.LastValue; @@ -1392,9 +1375,9 @@ public async virtual Task OnlineToPlain() [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() + public async Task _OnlineToPlainNoacAsync() { - Pocos.RealMonsterData.NestedLevelThree plain = new Pocos.RealMonsterData.NestedLevelThree(); + RealMonsterData.Pocos.NestedLevelThree plain = new RealMonsterData.Pocos.NestedLevelThree(); plain.Position = Position.LastValue; plain.Velo = Velo.LastValue; plain.Acc = Acc.LastValue; @@ -1404,7 +1387,7 @@ public async virtual Task OnlineToPlain() [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(Pocos.RealMonsterData.NestedLevelThree plain) + protected async Task _OnlineToPlainNoacAsync(RealMonsterData.Pocos.NestedLevelThree plain) { plain.Position = Position.LastValue; plain.Velo = Velo.LastValue; @@ -1418,7 +1401,7 @@ public async virtual Task PlainToOnline(T plain) await this.PlainToOnlineAsync((dynamic)plain); } - public async Task> PlainToOnlineAsync(Pocos.RealMonsterData.NestedLevelThree plain) + public async Task> PlainToOnlineAsync(RealMonsterData.Pocos.NestedLevelThree plain) { #pragma warning disable CS0612 Position.LethargicWrite(plain.Position); @@ -1437,7 +1420,7 @@ public async Task> PlainToOnlineAsync(Pocos.RealMons [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(Pocos.RealMonsterData.NestedLevelThree plain) + public async Task _PlainToOnlineNoacAsync(RealMonsterData.Pocos.NestedLevelThree plain) { #pragma warning disable CS0612 Position.LethargicWrite(plain.Position); @@ -1458,9 +1441,9 @@ public async virtual Task ShadowToPlain() return await (dynamic)this.ShadowToPlainAsync(); } - public async Task ShadowToPlainAsync() + public async Task ShadowToPlainAsync() { - Pocos.RealMonsterData.NestedLevelThree plain = new Pocos.RealMonsterData.NestedLevelThree(); + RealMonsterData.Pocos.NestedLevelThree plain = new RealMonsterData.Pocos.NestedLevelThree(); plain.Position = Position.Shadow; plain.Velo = Velo.Shadow; plain.Acc = Acc.Shadow; @@ -1468,7 +1451,7 @@ public async virtual Task ShadowToPlain() return plain; } - protected async Task ShadowToPlainAsync(Pocos.RealMonsterData.NestedLevelThree plain) + protected async Task ShadowToPlainAsync(RealMonsterData.Pocos.NestedLevelThree plain) { plain.Position = Position.Shadow; plain.Velo = Velo.Shadow; @@ -1482,7 +1465,7 @@ public async virtual Task PlainToShadow(T plain) await this.PlainToShadowAsync((dynamic)plain); } - public async Task> PlainToShadowAsync(Pocos.RealMonsterData.NestedLevelThree plain) + public async Task> PlainToShadowAsync(RealMonsterData.Pocos.NestedLevelThree plain) { Position.Shadow = plain.Position; Velo.Shadow = plain.Velo; @@ -1501,7 +1484,7 @@ public async virtual Task AnyChangeAsync(T 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(Pocos.RealMonsterData.NestedLevelThree plain, Pocos.RealMonsterData.NestedLevelThree latest = null) + public async Task DetectsAnyChangeAsync(RealMonsterData.Pocos.NestedLevelThree plain, RealMonsterData.Pocos.NestedLevelThree latest = null) { if (latest == null) latest = await this._OnlineToPlainNoacAsync(); @@ -1526,24 +1509,27 @@ public void Poll() this.RetrievePrimitives().ToList().ForEach(x => x.Poll()); } - public Pocos.RealMonsterData.NestedLevelThree CreateEmptyPoco() + public RealMonsterData.Pocos.NestedLevelThree CreateEmptyPoco() { - return new Pocos.RealMonsterData.NestedLevelThree(); + return new RealMonsterData.Pocos.NestedLevelThree(); } 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; @@ -1600,9 +1586,7 @@ public System.String GetHumanReadable(System.Globalization.CultureInfo culture) } protected System.String @SymbolTail { get; set; } - protected AXSharp.Connector.ITwinObject @Parent { get; set; } - public AXSharp.Connector.Localizations.Translator Interpreter => global::integrated.PlcTranslator.Instance; } } \ No newline at end of file diff --git a/src/tests.integrations/integrated/src/integrated.twin/.g/POCO/configuration.g.cs b/src/tests.integrations/integrated/src/integrated.twin/.g/POCO/configuration.g.cs index b3d4996be..c4acf59d3 100644 --- a/src/tests.integrations/integrated/src/integrated.twin/.g/POCO/configuration.g.cs +++ b/src/tests.integrations/integrated/src/integrated.twin/.g/POCO/configuration.g.cs @@ -1,54 +1,60 @@ using System; using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -using Pocos.RealMonsterData; +using RealMonsterData.Pocos; namespace Pocos { public partial class integratedTwinController { - public MonsterData.Monster Monster { get; set; } = new MonsterData.Monster(); - public MonsterData.Monster OnlineToPlain_should_copy_entire_structure { get; set; } = new MonsterData.Monster(); - public MonsterData.Monster PlainToOnline_should_copy_entire_structure { get; set; } = new MonsterData.Monster(); - public MonsterData.Monster OnlineToShadowAsync_should_copy_entire_structure { get; set; } = new MonsterData.Monster(); - public MonsterData.Monster ShadowToOnlineAsync_should_copy_entire_structure { get; set; } = new MonsterData.Monster(); - public MonsterData.Monster ITwinObjectOnlineToPlain_should_copy_entire_structure { get; set; } = new MonsterData.Monster(); - public MonsterData.Monster ITwinObjectPlainToOnline_should_copy_entire_structure { get; set; } = new MonsterData.Monster(); - public MonsterData.Monster ITwinObjectOnlineToShadowAsync_should_copy_entire_structure { get; set; } = new MonsterData.Monster(); - public MonsterData.Monster ITwinObjectShadowToOnlineAsync_should_copy_entire_structure { get; set; } = new MonsterData.Monster(); - public MonsterData.Monster ShadowToPlainAsync_should_copy_entire_structure { get; set; } = new MonsterData.Monster(); - public MonsterData.Monster PlainToShadowAsync_should_copy_entire_structure { get; set; } = new MonsterData.Monster(); - public MonsterData.Monster ITwinObjectShadowToPlainAsync_should_copy_entire_structure { get; set; } = new MonsterData.Monster(); - public MonsterData.Monster ITwinObjectPlainToShadowAsync_should_copy_entire_structure { get; set; } = new MonsterData.Monster(); - public Pokus Pokus { get; set; } = new Pokus(); - public RealMonsterData.RealMonster RealMonster { get; set; } = new RealMonsterData.RealMonster(); - public RealMonsterData.RealMonster OnlineToShadow_should_copy { get; set; } = new RealMonsterData.RealMonster(); - public RealMonsterData.RealMonster ShadowToOnline_should_copy { get; set; } = new RealMonsterData.RealMonster(); - public RealMonsterData.RealMonster OnlineToPlain_should_copy { get; set; } = new RealMonsterData.RealMonster(); - public RealMonsterData.RealMonster PlainToOnline_should_copy { get; set; } = new RealMonsterData.RealMonster(); - public RealMonsterData.RealMonster ITwinObjectOnlineToShadow_should_copy { get; set; } = new RealMonsterData.RealMonster(); - public RealMonsterData.RealMonster ITwinObjectShadowToOnline_should_copy { get; set; } = new RealMonsterData.RealMonster(); - public RealMonsterData.RealMonster ITwinObjectOnlineToPlain_should_copy { get; set; } = new RealMonsterData.RealMonster(); - public RealMonsterData.RealMonster ITwinObjectPlainToOnline_should_copy { get; set; } = new RealMonsterData.RealMonster(); - public all_primitives p_online_shadow { get; set; } = new all_primitives(); - public all_primitives p_shadow_online { get; set; } = new all_primitives(); - public all_primitives p_online_plain { get; set; } = new all_primitives(); - public all_primitives p_plain_online { get; set; } = new all_primitives(); - public all_primitives p_shadow_plain { get; set; } = new all_primitives(); - public all_primitives p_plain_shadow { get; set; } = new all_primitives(); - public RealMonsterData.RealMonster StartPolling_should_update_cyclic_property { get; set; } = new RealMonsterData.RealMonster(); - public RealMonsterData.RealMonster StartPolling_ConcurentOverload { get; set; } = new RealMonsterData.RealMonster(); - public RealMonsterData.RealMonster ChangeDetections { get; set; } = new RealMonsterData.RealMonster(); - public GH_ISSUE_183.GH_ISSUE_183_1 GH_ISSUE_183 { get; set; } = new GH_ISSUE_183.GH_ISSUE_183_1(); + public MonsterData.Pocos.Monster Monster { get; set; } = new MonsterData.Pocos.Monster(); + public MonsterData.Pocos.Monster OnlineToPlain_should_copy_entire_structure { get; set; } = new MonsterData.Pocos.Monster(); + public MonsterData.Pocos.Monster PlainToOnline_should_copy_entire_structure { get; set; } = new MonsterData.Pocos.Monster(); + public MonsterData.Pocos.Monster OnlineToShadowAsync_should_copy_entire_structure { get; set; } = new MonsterData.Pocos.Monster(); + public MonsterData.Pocos.Monster ShadowToOnlineAsync_should_copy_entire_structure { get; set; } = new MonsterData.Pocos.Monster(); + public MonsterData.Pocos.Monster ITwinObjectOnlineToPlain_should_copy_entire_structure { get; set; } = new MonsterData.Pocos.Monster(); + public MonsterData.Pocos.Monster ITwinObjectPlainToOnline_should_copy_entire_structure { get; set; } = new MonsterData.Pocos.Monster(); + public MonsterData.Pocos.Monster ITwinObjectOnlineToShadowAsync_should_copy_entire_structure { get; set; } = new MonsterData.Pocos.Monster(); + public MonsterData.Pocos.Monster ITwinObjectShadowToOnlineAsync_should_copy_entire_structure { get; set; } = new MonsterData.Pocos.Monster(); + public MonsterData.Pocos.Monster ShadowToPlainAsync_should_copy_entire_structure { get; set; } = new MonsterData.Pocos.Monster(); + public MonsterData.Pocos.Monster PlainToShadowAsync_should_copy_entire_structure { get; set; } = new MonsterData.Pocos.Monster(); + public MonsterData.Pocos.Monster ITwinObjectShadowToPlainAsync_should_copy_entire_structure { get; set; } = new MonsterData.Pocos.Monster(); + public MonsterData.Pocos.Monster ITwinObjectPlainToShadowAsync_should_copy_entire_structure { get; set; } = new MonsterData.Pocos.Monster(); + public global::Pocos.Pokus Pokus { get; set; } = new global::Pocos.Pokus(); + public RealMonsterData.Pocos.RealMonster RealMonster { get; set; } = new RealMonsterData.Pocos.RealMonster(); + public RealMonsterData.Pocos.RealMonster OnlineToShadow_should_copy { get; set; } = new RealMonsterData.Pocos.RealMonster(); + public RealMonsterData.Pocos.RealMonster ShadowToOnline_should_copy { get; set; } = new RealMonsterData.Pocos.RealMonster(); + public RealMonsterData.Pocos.RealMonster OnlineToPlain_should_copy { get; set; } = new RealMonsterData.Pocos.RealMonster(); + public RealMonsterData.Pocos.RealMonster PlainToOnline_should_copy { get; set; } = new RealMonsterData.Pocos.RealMonster(); + public RealMonsterData.Pocos.RealMonster ITwinObjectOnlineToShadow_should_copy { get; set; } = new RealMonsterData.Pocos.RealMonster(); + public RealMonsterData.Pocos.RealMonster ITwinObjectShadowToOnline_should_copy { get; set; } = new RealMonsterData.Pocos.RealMonster(); + public RealMonsterData.Pocos.RealMonster ITwinObjectOnlineToPlain_should_copy { get; set; } = new RealMonsterData.Pocos.RealMonster(); + public RealMonsterData.Pocos.RealMonster ITwinObjectPlainToOnline_should_copy { get; set; } = new RealMonsterData.Pocos.RealMonster(); + public global::Pocos.all_primitives p_online_shadow { get; set; } = new global::Pocos.all_primitives(); + public global::Pocos.all_primitives p_shadow_online { get; set; } = new global::Pocos.all_primitives(); + public global::Pocos.all_primitives p_online_plain { get; set; } = new global::Pocos.all_primitives(); + public global::Pocos.all_primitives p_plain_online { get; set; } = new global::Pocos.all_primitives(); + public global::Pocos.all_primitives p_shadow_plain { get; set; } = new global::Pocos.all_primitives(); + public global::Pocos.all_primitives p_plain_shadow { get; set; } = new global::Pocos.all_primitives(); + public RealMonsterData.Pocos.RealMonster StartPolling_should_update_cyclic_property { get; set; } = new RealMonsterData.Pocos.RealMonster(); + public RealMonsterData.Pocos.RealMonster StartPolling_ConcurentOverload { get; set; } = new RealMonsterData.Pocos.RealMonster(); + public RealMonsterData.Pocos.RealMonster ChangeDetections { get; set; } = new RealMonsterData.Pocos.RealMonster(); + public GH_ISSUE_183.Pocos.GH_ISSUE_183_1 GH_ISSUE_183 { get; set; } = new GH_ISSUE_183.Pocos.GH_ISSUE_183_1(); } +} +namespace Pocos +{ public partial class Pokus : AXSharp.Connector.IPlain { public Pokus() { } } +} +namespace Pocos +{ public partial class Nested : AXSharp.Connector.IPlain { public Nested() diff --git a/src/tests.integrations/integrated/src/integrated.twin/.g/POCO/dataswapping/all_primitives.g.cs b/src/tests.integrations/integrated/src/integrated.twin/.g/POCO/dataswapping/all_primitives.g.cs index 5e0cad613..7b0058b73 100644 --- a/src/tests.integrations/integrated/src/integrated.twin/.g/POCO/dataswapping/all_primitives.g.cs +++ b/src/tests.integrations/integrated/src/integrated.twin/.g/POCO/dataswapping/all_primitives.g.cs @@ -11,35 +11,20 @@ public all_primitives() } public Boolean myBOOL { get; set; } - public Byte myBYTE { get; set; } - public UInt16 myWORD { get; set; } - public UInt32 myDWORD { get; set; } - public UInt64 myLWORD { get; set; } - public SByte mySINT { get; set; } - public Int16 myINT { get; set; } - public Int32 myDINT { get; set; } - public Int64 myLINT { get; set; } - public Byte myUSINT { get; set; } - public UInt16 myUINT { get; set; } - public UInt32 myUDINT { get; set; } - public UInt64 myULINT { get; set; } - public Single myREAL { get; set; } - 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); diff --git a/src/tests.integrations/integrated/src/integrated.twin/.g/POCO/dataswapping/moster.g.cs b/src/tests.integrations/integrated/src/integrated.twin/.g/POCO/dataswapping/moster.g.cs index f1f264d58..9a7007ec2 100644 --- a/src/tests.integrations/integrated/src/integrated.twin/.g/POCO/dataswapping/moster.g.cs +++ b/src/tests.integrations/integrated/src/integrated.twin/.g/POCO/dataswapping/moster.g.cs @@ -2,39 +2,46 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace MonsterData { - namespace MonsterData + namespace Pocos { public partial class MonsterBase : AXSharp.Connector.IPlain { public MonsterBase() { #pragma warning disable CS0612 - AXSharp.Connector.BuilderHelpers.Arrays.InstantiateArray(ArrayOfDrives, () => new MonsterData.DriveBase(), new[] { (0, 3) }); + AXSharp.Connector.BuilderHelpers.Arrays.InstantiateArray(ArrayOfDrives, () => new MonsterData.Pocos.DriveBase(), new[] { (0, 3) }); #pragma warning restore CS0612 } public string Description { get; set; } = string.Empty; public UInt64 Id { get; set; } - public Byte[] ArrayOfBytes { get; set; } = new Byte[4]; - public MonsterData.DriveBase[] ArrayOfDrives { get; set; } = new MonsterData.DriveBase[4]; + public MonsterData.Pocos.DriveBase[] ArrayOfDrives { get; set; } = new MonsterData.Pocos.DriveBase[4]; + [IgnoreOnPocoOperation()] - public MonsterData.DriveBase DriveBase_tobeignoredbypocooperations { get; set; } = new MonsterData.DriveBase(); + public MonsterData.Pocos.DriveBase DriveBase_tobeignoredbypocooperations { get; set; } = new MonsterData.Pocos.DriveBase(); + [IgnoreOnPocoOperation()] public string Description_tobeignoredbypocooperations { get; set; } = string.Empty; } + } - public partial class Monster : MonsterData.MonsterBase, AXSharp.Connector.IPlain + namespace Pocos + { + public partial class Monster : MonsterData.Pocos.MonsterBase, AXSharp.Connector.IPlain { public Monster() : base() { } - public MonsterData.DriveBase DriveA { get; set; } = new MonsterData.DriveBase(); + public MonsterData.Pocos.DriveBase DriveA { get; set; } = new MonsterData.Pocos.DriveBase(); } + } + namespace Pocos + { public partial class DriveBase : AXSharp.Connector.IPlain { public DriveBase() @@ -42,11 +49,8 @@ public DriveBase() } public Double Position { get; set; } - public Double Velo { get; set; } - public Double Acc { get; set; } - public Double Dcc { get; set; } } } diff --git a/src/tests.integrations/integrated/src/integrated.twin/.g/POCO/dataswapping/myEnum.g.cs b/src/tests.integrations/integrated/src/integrated.twin/.g/POCO/dataswapping/myEnum.g.cs index e23d372b9..da1480552 100644 --- a/src/tests.integrations/integrated/src/integrated.twin/.g/POCO/dataswapping/myEnum.g.cs +++ b/src/tests.integrations/integrated/src/integrated.twin/.g/POCO/dataswapping/myEnum.g.cs @@ -1,7 +1,3 @@ using System; using AXSharp.Abstractions.Presentation; -using AXSharp.Connector; - -namespace Pocos -{ -} \ No newline at end of file +using AXSharp.Connector; \ No newline at end of file diff --git a/src/tests.integrations/integrated/src/integrated.twin/.g/POCO/dataswapping/realmonster.g.cs b/src/tests.integrations/integrated/src/integrated.twin/.g/POCO/dataswapping/realmonster.g.cs index 4796ea11a..26c716514 100644 --- a/src/tests.integrations/integrated/src/integrated.twin/.g/POCO/dataswapping/realmonster.g.cs +++ b/src/tests.integrations/integrated/src/integrated.twin/.g/POCO/dataswapping/realmonster.g.cs @@ -2,38 +2,43 @@ using AXSharp.Abstractions.Presentation; using AXSharp.Connector; -namespace Pocos +namespace RealMonsterData { - namespace RealMonsterData + namespace Pocos { public partial class RealMonsterBase : AXSharp.Connector.IPlain { public RealMonsterBase() { #pragma warning disable CS0612 - AXSharp.Connector.BuilderHelpers.Arrays.InstantiateArray(ArrayOfDrives, () => new RealMonsterData.DriveBaseNested(), new[] { (0, 3) }); + AXSharp.Connector.BuilderHelpers.Arrays.InstantiateArray(ArrayOfDrives, () => new RealMonsterData.Pocos.DriveBaseNested(), new[] { (0, 3) }); #pragma warning restore CS0612 } public string Description { get; set; } = string.Empty; public UInt64 Id { get; set; } - public DateOnly TestDate { get; set; } = default(DateOnly); public DateTime TestDateTime { get; set; } = default(DateTime); public TimeSpan TestTimeSpan { get; set; } = default(TimeSpan); public Byte[] ArrayOfBytes { get; set; } = new Byte[4]; - public RealMonsterData.DriveBaseNested[] ArrayOfDrives { get; set; } = new RealMonsterData.DriveBaseNested[4]; + public RealMonsterData.Pocos.DriveBaseNested[] ArrayOfDrives { get; set; } = new RealMonsterData.Pocos.DriveBaseNested[4]; } + } - public partial class RealMonster : RealMonsterData.RealMonsterBase, AXSharp.Connector.IPlain + namespace Pocos + { + public partial class RealMonster : RealMonsterData.Pocos.RealMonsterBase, AXSharp.Connector.IPlain { public RealMonster() : base() { } - public RealMonsterData.DriveBaseNested DriveA { get; set; } = new RealMonsterData.DriveBaseNested(); + public RealMonsterData.Pocos.DriveBaseNested DriveA { get; set; } = new RealMonsterData.Pocos.DriveBaseNested(); } + } + namespace Pocos + { public partial class DriveBaseNested : AXSharp.Connector.IPlain { public DriveBaseNested() @@ -41,16 +46,15 @@ public DriveBaseNested() } public Double Position { get; set; } - public Double Velo { get; set; } - public Double Acc { get; set; } - public Double Dcc { get; set; } - - public RealMonsterData.NestedLevelOne NestedLevelOne { get; set; } = new RealMonsterData.NestedLevelOne(); + public RealMonsterData.Pocos.NestedLevelOne NestedLevelOne { get; set; } = new RealMonsterData.Pocos.NestedLevelOne(); } + } + namespace Pocos + { public partial class NestedLevelOne : AXSharp.Connector.IPlain { public NestedLevelOne() @@ -58,16 +62,15 @@ public NestedLevelOne() } public Double Position { get; set; } - public Double Velo { get; set; } - public Double Acc { get; set; } - public Double Dcc { get; set; } - - public RealMonsterData.NestedLevelTwo NestedLevelTwo { get; set; } = new RealMonsterData.NestedLevelTwo(); + public RealMonsterData.Pocos.NestedLevelTwo NestedLevelTwo { get; set; } = new RealMonsterData.Pocos.NestedLevelTwo(); } + } + namespace Pocos + { public partial class NestedLevelTwo : AXSharp.Connector.IPlain { public NestedLevelTwo() @@ -75,16 +78,15 @@ public NestedLevelTwo() } public Double Position { get; set; } - public Double Velo { get; set; } - public Double Acc { get; set; } - public Double Dcc { get; set; } - - public RealMonsterData.NestedLevelThree NestedLevelThree { get; set; } = new RealMonsterData.NestedLevelThree(); + public RealMonsterData.Pocos.NestedLevelThree NestedLevelThree { get; set; } = new RealMonsterData.Pocos.NestedLevelThree(); } + } + namespace Pocos + { public partial class NestedLevelThree : AXSharp.Connector.IPlain { public NestedLevelThree() @@ -92,11 +94,8 @@ public NestedLevelThree() } public Double Position { get; set; } - public Double Velo { get; set; } - public Double Acc { get; set; } - public Double Dcc { get; set; } } } diff --git a/src/tests.integrations/integrated/src/integrated.twin/.g/POCO/program.g.cs b/src/tests.integrations/integrated/src/integrated.twin/.g/POCO/program.g.cs index e23d372b9..da1480552 100644 --- a/src/tests.integrations/integrated/src/integrated.twin/.g/POCO/program.g.cs +++ b/src/tests.integrations/integrated/src/integrated.twin/.g/POCO/program.g.cs @@ -1,7 +1,3 @@ using System; using AXSharp.Abstractions.Presentation; -using AXSharp.Connector; - -namespace Pocos -{ -} \ No newline at end of file +using AXSharp.Connector; \ No newline at end of file diff --git a/src/tests.integrations/integrated/src/integrated.twin/Entry.cs b/src/tests.integrations/integrated/src/integrated.twin/Entry.cs index 26645faa1..b37d244f9 100644 --- a/src/tests.integrations/integrated/src/integrated.twin/Entry.cs +++ b/src/tests.integrations/integrated/src/integrated.twin/Entry.cs @@ -8,7 +8,12 @@ using AXSharp.Connector; using System; using System.Collections.Generic; +using System.IO; using System.Linq; +using System.Net.Http; +using System.Net.Security; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; using System.Text; using System.Threading.Tasks; using AXSharp.Connector.S71500.WebApi; @@ -17,13 +22,25 @@ namespace integrated { public static class Entry { - private static string TargetIp = Environment.GetEnvironmentVariable("AXTARGET"); // <- replace by your IP - private const string UserName = "Anonymous"; //<- replace by user name you have set up in your WebAPI settings - private static string Pass = ""; //Environment.GetEnvironmentVariable("AX_TARGET_PWD"); // <- Pass in the password that you have set up for the user. NOT AS PLAIN TEXT! Use user secrets instead. - private const bool IgnoreSslErrors = true; // <- When you have your certificates in order set this to false. + private static string TargetIp { get; } = Environment.GetEnvironmentVariable("AXTARGET") ?? "10.222.6.1"; + + private static string CertificatePath = "certs\\Communication.cer"; + + static string GetCertPath() + { + var fp = new FileInfo(Path.Combine(Assembly.GetExecutingAssembly().Location)); + return Path.Combine(fp.DirectoryName, CertificatePath); + } - public static integratedTwinController Plc { get; } - = new (ConnectorAdapterBuilder.Build() - .CreateWebApi(TargetIp, UserName, Pass, IgnoreSslErrors)); + static readonly X509Certificate2 Certificate = new X509Certificate2(GetCertPath()); + + private static bool CertificateValidation(HttpRequestMessage requestMessage, X509Certificate2 certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) + { + return certificate.Thumbprint == Certificate.Thumbprint; + } + + public static integratedTwinController Plc { get; } + = new(ConnectorAdapterBuilder.Build() + .CreateWebApi(TargetIp, Environment.GetEnvironmentVariable("AX_USER_NAME"), Environment.GetEnvironmentVariable("AX_TARGET_PWD"), CertificateValidation, true)); } } \ No newline at end of file diff --git a/src/tests.integrations/integrated/src/integrated.twin/integrated.csproj b/src/tests.integrations/integrated/src/integrated.twin/integrated.csproj index f0cae0487..4b2529b0d 100644 --- a/src/tests.integrations/integrated/src/integrated.twin/integrated.csproj +++ b/src/tests.integrations/integrated/src/integrated.twin/integrated.csproj @@ -26,5 +26,14 @@ + + + + + PreserveNewest + + + PreserveNewest + \ No newline at end of file diff --git a/src/tests.integrations/integrated/tests/integrated.tests/PlainersSwappingTests.cs b/src/tests.integrations/integrated/tests/integrated.tests/PlainersSwappingTests.cs index 519570d7b..d8a0b181f 100644 --- a/src/tests.integrations/integrated/tests/integrated.tests/PlainersSwappingTests.cs +++ b/src/tests.integrations/integrated/tests/integrated.tests/PlainersSwappingTests.cs @@ -6,17 +6,7 @@ public class PlainersSwappingTests public PlainersSwappingTests() { -#if NET6_0 - Task.Delay(250).Wait(); -#endif - -#if NET7_0 - Task.Delay(500).Wait(); -#endif - -#if NET8_0 Task.Delay(750).Wait(); -#endif } [Fact] @@ -173,7 +163,7 @@ public async Task ITwinObject_OnlineToPlain_should_copy_entire_structure() await monster.WriteAsync(); - var p = await ((ITwinObject)monster).OnlineToPlain(); + var p = await ((ITwinObject)monster).OnlineToPlain(); Assert.Equal(monster.Description.Cyclic, p.Description); Assert.Equal(monster.Id.Cyclic, p.Id); @@ -199,7 +189,7 @@ public async Task PlainToOnline_should_copy_entire_structure() { var monster = Entry.Plc.PlainToOnline_should_copy_entire_structure; - var p = new Pocos.MonsterData.Monster(); + var p = new MonsterData.Pocos.Monster(); p.Description = "from plain to online"; p.Id = 111222; @@ -258,7 +248,7 @@ public async Task PlainToOnline_should_copy_entire_structure_ignore_on_poco_oper { var monster = Entry.Plc.PlainToOnline_should_copy_entire_structure; - var p = new Pocos.MonsterData.Monster(); + var p = new MonsterData.Pocos.Monster(); p.Description = "from plain to online"; p.Id = 111222; @@ -334,7 +324,7 @@ public async Task ITwinObject_PlainToOnline_should_copy_entire_structure() { var monster = Entry.Plc.ITwinObjectPlainToOnline_should_copy_entire_structure; - var p = new Pocos.MonsterData.Monster(); + var p = new MonsterData.Pocos.Monster(); p.Description = "from plain to online"; p.Id = 111222; @@ -433,7 +423,7 @@ public async Task ITwinObject_OnlineToPlain_RealMonster_should_copy() monster.DriveA.NestedLevelOne.NestedLevelTwo.NestedLevelThree.Acc.Cyclic = 123; await monster.WriteAsync(); - var p = await ((ITwinObject)monster).OnlineToPlain(); + var p = await ((ITwinObject)monster).OnlineToPlain(); Assert.Equal(monster.Description.Cyclic, p.Description); Assert.Equal(monster.DriveA.NestedLevelOne.NestedLevelTwo.NestedLevelThree.Acc.Cyclic, p.DriveA.NestedLevelOne.NestedLevelTwo.NestedLevelThree.Acc); @@ -521,7 +511,7 @@ public async Task ITwinObject_ShadowToPlain_should_copy_entire_structure() //await monster.WriteAsync(); - var p = await ((ITwinObject)monster).ShadowToPlain(); + var p = await ((ITwinObject)monster).ShadowToPlain(); Assert.Equal(monster.Description.Shadow, p.Description); Assert.Equal(monster.Id.Shadow, p.Id); @@ -547,7 +537,7 @@ public async Task PlainToShadow_should_copy_entire_structure() { var monster = Entry.Plc.PlainToShadowAsync_should_copy_entire_structure; - var p = new Pocos.MonsterData.Monster(); + var p = new MonsterData.Pocos.Monster(); p.Description = "from plain to shadow"; p.Id = 111222; @@ -604,7 +594,7 @@ public async Task ITwinObject_PlainToShadow_should_copy_entire_structure() { var monster = Entry.Plc.ITwinObjectPlainToShadowAsync_should_copy_entire_structure; - var p = new Pocos.MonsterData.Monster(); + var p = new MonsterData.Pocos.Monster(); p.Description = "from plain to shadow"; p.Id = 111222; diff --git a/src/tests.integrations/integrated/tests/integrated.tests/TwinObjectExtensionTests.cs b/src/tests.integrations/integrated/tests/integrated.tests/TwinObjectExtensionTests.cs index 6e558f0fa..bf06dee52 100644 --- a/src/tests.integrations/integrated/tests/integrated.tests/TwinObjectExtensionTests.cs +++ b/src/tests.integrations/integrated/tests/integrated.tests/TwinObjectExtensionTests.cs @@ -354,7 +354,7 @@ public async Task StartPolling_should_update_cyclic_property() Assert.Equal(pos, polling.DriveA.NestedLevelOne.NestedLevelTwo.NestedLevelThree.Position.Cyclic); } - [Fact] + [Fact] public async Task StartPolling_polling_should_continue_until_last_subscriber() { var holderObject = new object(); diff --git a/src/tests.integrations/integrated/tests/integrated.tests/issues/GH_ISSUE_183.cs b/src/tests.integrations/integrated/tests/integrated.tests/issues/GH_ISSUE_183.cs index d1d550635..ff018d967 100644 --- a/src/tests.integrations/integrated/tests/integrated.tests/issues/GH_ISSUE_183.cs +++ b/src/tests.integrations/integrated/tests/integrated.tests/issues/GH_ISSUE_183.cs @@ -6,13 +6,7 @@ public class GH_ISSUE_183 public GH_ISSUE_183() { -#if NET6_0 Task.Delay(250).Wait(); -#endif - -#if NET7_0 - Task.Delay(500).Wait(); -#endif } [Fact] diff --git a/templates/working/AXSharp.templates.csproj b/templates/working/AXSharp.templates.csproj index 3684b1e1f..f490a8b00 100644 --- a/templates/working/AXSharp.templates.csproj +++ b/templates/working/AXSharp.templates.csproj @@ -1,6 +1,6 @@ - net8.0 + net9.0 Template AXSharp.templates AXSharp templates diff --git a/templates/working/templates/axsharpblazor/axsharpblazor.app/axsharpblazor.hmi.csproj b/templates/working/templates/axsharpblazor/axsharpblazor.app/axsharpblazor.hmi.csproj index 255b488f2..a16b44751 100644 --- a/templates/working/templates/axsharpblazor/axsharpblazor.app/axsharpblazor.hmi.csproj +++ b/templates/working/templates/axsharpblazor/axsharpblazor.app/axsharpblazor.hmi.csproj @@ -1,6 +1,5 @@ - - net8.0 + enable enable aspnet-ixsharpblazor-hmi-ee3150da-5237-49bc-b265-f512331ded6c diff --git a/templates/working/templates/axsharpblazor/axsharpblazor.twin/axsharpblazor.csproj b/templates/working/templates/axsharpblazor/axsharpblazor.twin/axsharpblazor.csproj index 6e9cb742a..5c3baae37 100644 --- a/templates/working/templates/axsharpblazor/axsharpblazor.twin/axsharpblazor.csproj +++ b/templates/working/templates/axsharpblazor/axsharpblazor.twin/axsharpblazor.csproj @@ -1,6 +1,6 @@ - net8.0 + net9.0 enable enable diff --git a/templates/working/templates/axsharpblazor/axsharpblazor.twin/axsharpblazor.twin.csproj b/templates/working/templates/axsharpblazor/axsharpblazor.twin/axsharpblazor.twin.csproj index 30085a14a..3f147862a 100644 --- a/templates/working/templates/axsharpblazor/axsharpblazor.twin/axsharpblazor.twin.csproj +++ b/templates/working/templates/axsharpblazor/axsharpblazor.twin/axsharpblazor.twin.csproj @@ -1,6 +1,6 @@ - net8.0 + net9.0 enable enable diff --git a/templates/working/templates/axsharpconsole/axsharpconsole.twin/axsharpconsole.csproj b/templates/working/templates/axsharpconsole/axsharpconsole.twin/axsharpconsole.csproj index 30085a14a..3f147862a 100644 --- a/templates/working/templates/axsharpconsole/axsharpconsole.twin/axsharpconsole.csproj +++ b/templates/working/templates/axsharpconsole/axsharpconsole.twin/axsharpconsole.csproj @@ -1,6 +1,6 @@ - net8.0 + net9.0 enable enable diff --git a/templates/working/templates/axsharpconsole/axsharpconsole/axsharpconsole.app.csproj b/templates/working/templates/axsharpconsole/axsharpconsole/axsharpconsole.app.csproj index dc533c696..0a515b4a3 100644 --- a/templates/working/templates/axsharpconsole/axsharpconsole/axsharpconsole.app.csproj +++ b/templates/working/templates/axsharpconsole/axsharpconsole/axsharpconsole.app.csproj @@ -1,7 +1,7 @@ Exe - net8.0 + net9.0 enable enable diff --git a/test_L10.ps1 b/test_L10.ps1 index ab64f11a3..891be5130 100644 --- a/test_L10.ps1 +++ b/test_L10.ps1 @@ -1,4 +1,4 @@ # run build -dotnet run --project cake/Build.csproj --do-test --test-level 10 +dotnet run --project cake/Build.csproj --do-test --test-level 10 --framework net9.0 exit $LASTEXITCODE; \ No newline at end of file diff --git a/test_L2.ps1 b/test_L2.ps1 index ec66dbc72..3d16e17b2 100644 --- a/test_L2.ps1 +++ b/test_L2.ps1 @@ -1,4 +1,4 @@ # run build -dotnet run --project cake/Build.csproj --do-test --do-pack --test-level 2 +dotnet run --project cake/Build.csproj --do-test --do-pack --test-level 2 --framework net9.0 exit $LASTEXITCODE; \ No newline at end of file