From f72e44b9eedd8ad9539bb2b1293a10ffa5e604eb Mon Sep 17 00:00:00 2001 From: IX-BOT <137874481+IX-BOT@users.noreply.github.com> Date: Fri, 10 May 2024 20:14:02 +0200 Subject: [PATCH] [BUG] Poco array fields are null (#312) * Create draft PR for #311 * The most significant changes involve the addition of the `CsPlainConstructorBuilder.cs` file and modifications to the `CsPlainSourceBuilder.cs` file. The new file contains the `CsPlainConstructorBuilder` class, which is used to build constructors for classes. The `CsPlainSourceBuilder.cs` file was updated to use this new class, specifically the `Create` method, to add constructors to the source code. Additionally, the `Arrays.cs` file was updated with a new method for creating and initializing arrays, and the `PlainersSwappingTests.cs` file had code for initializing an array commented out. Changes: 1. Addition of `CsPlainConstructorBuilder.cs` file: This new file contains the `CsPlainConstructorBuilder` class, which is used to build constructors for classes. It implements the `ICombinedThreeVisitor` interface and contains methods for creating different types of declarations and adding them to the source code. It also contains a `Create` method which is used to create a new instance of the `CsPlainConstructorBuilder` class and add the constructor to the source code. 2. Modification of `CsPlainSourceBuilder.cs` file: The `using AXSharp.Compiler.Cs.Onliner;` directive was added to allow the `CsPlainSourceBuilder` class to use the `CsPlainConstructorBuilder` class. The `CsPlainConstructorBuilder.Create` method was added to the `CreateClassDeclaration` method, creating a new instance of the `CsPlainConstructorBuilder` class and adding the constructor to the source code. 3. Addition of `InstantiateArray` method in `Arrays.cs` file: This new method is used to create a new array and initialize it with a specified initializer function and array bounds. 4. Commenting out of array initialization in `PlainersSwappingTests.cs` file: The code for initializing the `ArrayOfDrives` array was commented out, suggesting that the array is now being initialized elsewhere, possibly in the constructor of the `p` object. --------- Co-authored-by: PTKu <61538034+PTKu@users.noreply.github.com> --- .../Plain/CsPlainConstructorBuilder.cs | 167 +++++++++ .../Plain/CsPlainSourceBuilder.cs | 2 + .../expected/.g/POCO/abstract_members.g.cs | 4 + .../expected/.g/POCO/array_declaration.g.cs | 10 + .../.g/POCO/class_all_primitives.g.cs | 4 + .../.g/POCO/class_extended_by_known_type.g.cs | 7 + .../units/expected/.g/POCO/class_extends.g.cs | 6 + .../.g/POCO/class_extends_and_implements.g.cs | 6 + .../.g/POCO/class_generic_extension.g.cs | 14 + .../expected/.g/POCO/class_implements.g.cs | 3 + .../.g/POCO/class_implements_multiple.g.cs | 3 + .../expected/.g/POCO/class_internal.g.cs | 3 + .../.g/POCO/class_no_access_modifier.g.cs | 3 + .../.g/POCO/class_with_complex_members.g.cs | 7 + .../POCO/class_with_non_public_members.g.cs | 7 + .../expected/.g/POCO/class_with_pragmas.g.cs | 7 + .../.g/POCO/class_with_primitive_members.g.cs | 4 + .../.g/POCO/class_with_using_directives.g.cs | 4 + .../.g/POCO/compileromitsattribute.g.cs | 31 ++ .../units/expected/.g/POCO/configuration.g.cs | 4 + .../expected/.g/POCO/file_with_usings.g.cs | 12 + .../units/expected/.g/POCO/generics.g.cs | 11 + .../units/expected/.g/POCO/makereadonce.g.cs | 8 + .../units/expected/.g/POCO/makereadonly.g.cs | 8 + .../samples/units/expected/.g/POCO/misc.g.cs | 23 ++ .../units/expected/.g/POCO/mixed_access.g.cs | 14 + .../units/expected/.g/POCO/ref_to_simple.g.cs | 7 + .../expected/.g/POCO/simple_empty_class.g.cs | 3 + .../simple_empty_class_within_namespace.g.cs | 3 + .../expected/.g/POCO/type_named_values.g.cs | 4 + .../.g/POCO/type_named_values_literals.g.cs | 4 + .../expected/.g/POCO/type_with_enum.g.cs | 4 + .../.g/POCO/types_with_name_attributes.g.cs | 4 + .../POCO/types_with_property_attributes.g.cs | 4 + .../BuilderHelpers/Arrays.cs | 23 ++ .../integrated/src/ax/apax-lock.json | 332 +++++++++--------- .../integrated/src/ax/apax.yml | 2 +- .../.g/POCO/configuration.g.cs | 6 + .../.g/POCO/dataswapping/all_primitives.g.cs | 4 + .../.g/POCO/dataswapping/moster.g.cs | 15 + .../.g/POCO/dataswapping/realmonster.g.cs | 27 ++ .../integrated/src/integrated.twin/Entry.cs | 4 +- .../integrated.tests/PlainersSwappingTests.cs | 8 +- 43 files changed, 653 insertions(+), 173 deletions(-) create mode 100644 src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Plain/CsPlainConstructorBuilder.cs diff --git a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Plain/CsPlainConstructorBuilder.cs b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Plain/CsPlainConstructorBuilder.cs new file mode 100644 index 00000000..81d0d31b --- /dev/null +++ b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Plain/CsPlainConstructorBuilder.cs @@ -0,0 +1,167 @@ +// AXSharp.Compiler.Cs +// Copyright (c) 2023 Peter Kurhajec (PTKu), MTS, and Contributors. All Rights Reserved. +// Contributors: https://github.com/ix-ax/axsharp/graphs/contributors +// See the LICENSE file in the repository root for more information. +// https://github.com/ix-ax/axsharp/blob/dev/LICENSE +// Third party licenses: https://github.com/ix-ax/axsharp/blob/master/notices.md + +using System.Globalization; +using System.Text; +using AX.ST.Semantic; +using AX.ST.Semantic.Model; +using AX.ST.Semantic.Model.Declarations; +using AX.ST.Semantic.Model.Declarations.Types; +using AX.ST.Syntax.Parser; +using AXSharp.Compiler.Core; +using AXSharp.Compiler.Cs.Helpers; +using AXSharp.Compiler.Cs.Helpers.Onliners; +using AXSharp.Connector; +using AXSharp.Connector.BuilderHelpers; +using AXSharp.Compiler.Cs; + +namespace AXSharp.Compiler.Cs.Onliner; + +internal class CsPlainConstructorBuilder : ICombinedThreeVisitor +{ + private readonly StringBuilder _constructorStatements = new(); + + protected CsPlainConstructorBuilder(ISourceBuilder sourceBuilder) + { + SourceBuilder = sourceBuilder; + } + + protected ISourceBuilder SourceBuilder { get; } + + public string Output => _constructorStatements.ToString().FormatCode(); + + public void CreateClassDeclaration(IClassDeclaration classDeclaration, IxNodeVisitor visitor) + { + AddToSource($"{classDeclaration.GetQualifiedName()}"); + } + + public void CreateReferenceToDeclaration(IReferenceTypeDeclaration referenceTypeDeclaration, IxNodeVisitor visitor) + { + referenceTypeDeclaration.ReferencedType.Accept(visitor, this); + } + + public void CreateScalarTypeDeclaration(IScalarTypeDeclaration scalarTypeDeclaration, IxNodeVisitor visitor) + { + AddToSource($"{scalarTypeDeclaration.TransformType()}"); + } + + public void CreateSemanticTypeAccess(ISemanticTypeAccess semanticTypeAccess, IxNodeVisitor visitor) + { + semanticTypeAccess.Type.Accept(visitor, this); + } + + public void CreateStringTypeDeclaration(IStringTypeDeclaration stringTypeDeclaration, IxNodeVisitor visitor) + { + AddToSource($"{stringTypeDeclaration.TransformType()}"); + } + + public void CreateStructuredType(IStructuredTypeDeclaration structuredTypeDeclaration, IxNodeVisitor visitor) + { + AddToSource($"{structuredTypeDeclaration.GetQualifiedName()}"); + } + + public void CreateFieldDeclaration(IFieldDeclaration fieldDeclaration, IxNodeVisitor visitor) + { + if (fieldDeclaration.IsMemberEligibleForConstructor(SourceBuilder)) + { + switch (fieldDeclaration.Type) + { + case IArrayTypeDeclaration array: + AddArrayMemberInitialization(array, fieldDeclaration, visitor); + break; + } + } + } + + public virtual void CreateNamedValueTypeDeclaration(INamedValueTypeDeclaration namedValueTypeDeclaration, + IxNodeVisitor visitor) + { + AddToSource(namedValueTypeDeclaration.ValueTypeAccess.Type.Name.ToUpperInvariant()); + } + + public void CreateInterfaceDeclaration(IInterfaceDeclaration interfaceDeclaration, IxNodeVisitor visitor) + { + // No way to construct interfaces. + } + + public void CreateArrayTypeDeclaration(IArrayTypeDeclaration arrayTypeDeclaration, IxNodeVisitor visitor) + { + + } + + protected void AddToSource(string token, string separator = " ") + { + _constructorStatements.Append($"{token}{separator}"); + } + + public static CsPlainConstructorBuilder Create(IxNodeVisitor visitor, IClassDeclaration semantics, + ISourceBuilder sourceBuilder, bool isExtended, AXSharpProject project) + { + var builder = new CsPlainConstructorBuilder(sourceBuilder); + + + builder.AddToSource( + $"public {semantics.Name}()"); + + + if (isExtended) + { + builder.AddToSource(": base()"); + } + + builder.AddToSource("{"); + + semantics.Fields.ToList().ForEach(p => p.Accept(visitor, builder)); + + builder.AddToSource("}"); + return builder; + } + + private void AddArrayMemberInitialization(IArrayTypeDeclaration type, IFieldDeclaration field, + IxNodeVisitor visitor) + { + if(!type.IsMemberEligibleForConstructor(this.SourceBuilder)) + return; + + switch (type.ElementTypeAccess.Type) + { + case IClassDeclaration classDeclaration: + case IStructuredTypeDeclaration structuredTypeDeclaration: + case IEnumTypeDeclaration enumTypeDeclaration: + case INamedValueTypeDeclaration namedValueTypeDeclaration: + AddToSource("#pragma warning disable CS0612\n"); + AddToSource($"{typeof(Arrays).n()}.InstantiateArray({field.Name}, " + + "() => "); + AddToSource("new"); + type.ElementTypeAccess.Type.Accept(visitor, this); + var dimensions = "new[] {"; + foreach (var dimension in type.Dimensions) + { + dimensions = $"{dimensions}({dimension.LowerBoundValue}, {dimension.UpperBoundValue})"; + } + + dimensions = $"{dimensions}}}"; + + AddToSource($"(), {dimensions});"); + AddToSource("#pragma warning restore CS0612\n"); + break; + } + } + + + + public void AddTypeConstructionParameters(string parametersString) + { + AddToSource(parametersString); + } + + /// + public void CreateDocComment(IDocComment semanticTypeAccess, ICombinedThreeVisitor data) + { + AddToSource(semanticTypeAccess.AddDocumentationComment(SourceBuilder)); + } +} \ No newline at end of file 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 3e17b1f5..e8479b88 100644 --- a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Plain/CsPlainSourceBuilder.cs +++ b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Plain/CsPlainSourceBuilder.cs @@ -15,6 +15,7 @@ using AXSharp.Compiler.Core; using AXSharp.Compiler.Cs.Helpers; using AXSharp.Compiler.Cs.Helpers.Plain; +using AXSharp.Compiler.Cs.Onliner; namespace AXSharp.Compiler.Cs.Plain; @@ -88,6 +89,7 @@ public class CsPlainSourceBuilder : ICombinedThreeVisitor, ISourceBuilder AddToSource("{"); + AddToSource(CsPlainConstructorBuilder.Create(visitor, classDeclaration, this, isExtended, Project).Output); classDeclarationSyntax.UsingDirectives.ToList().ForEach(p => p.Visit(visitor, this)); classDeclaration.Fields.ToList().ForEach(p => p.Accept(visitor, this)); AddToSource("}"); 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 d11d4a1f..65792f74 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 @@ -4,6 +4,10 @@ namespace Pocos { public partial class AbstractMotor : AXSharp.Connector.IPlain { + public AbstractMotor() + { + } + public Boolean Run { get; set; } public Boolean ReverseDirection { get; set; } 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 1f6cf1a1..dea187df 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 @@ -6,12 +6,22 @@ namespace ArrayDeclarationSimpleNamespace { 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) }); +#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 partial class some_complex_type : AXSharp.Connector.IPlain { + public some_complex_type() + { + } } } } \ No newline at end of file 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 6066e48b..72679fc5 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 @@ -4,6 +4,10 @@ namespace Pocos { public partial class class_all_primitives : AXSharp.Connector.IPlain { + public class_all_primitives() + { + } + public Boolean myBOOL { get; set; } public Byte myBYTE { get; set; } 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 d0264b84..981ce150 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 @@ -6,6 +6,9 @@ namespace Simatic.Ax.StateFramework { public partial class State1Transition : Simatic.Ax.StateFramework.AbstractState, AXSharp.Connector.IPlain { + public State1Transition() : base() + { + } } } @@ -13,6 +16,10 @@ namespace Simatic.Ax.StateFramework { public partial class AbstractState : AXSharp.Connector.IPlain, IState, IStateMuteable { + 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 d0c0aecc..e79f54a2 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,9 +4,15 @@ namespace Pocos { public partial class Extended : Extendee, AXSharp.Connector.IPlain { + public Extended() : base() + { + } } public partial class Extendee : AXSharp.Connector.IPlain { + public Extendee() + { + } } } \ No newline at end of file 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 094f13c3..8de92fc8 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,10 +4,16 @@ namespace Pocos { public partial class ExtendsAndImplements : ExtendeeExtendsAndImplements, AXSharp.Connector.IPlain, IImplementation1, IImplementation2 { + public ExtendsAndImplements() : base() + { + } } public partial class ExtendeeExtendsAndImplements : AXSharp.Connector.IPlain { + public ExtendeeExtendsAndImplements() + { + } } public partial interface IImplementation1 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 19a5b8c8..8440e0be 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 @@ -6,21 +6,35 @@ namespace Generics { public partial class Extender : AXSharp.Connector.IPlain { + public Extender() + { + } } public partial class Extendee : Generics.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 partial class Extendee2 : Generics.Extender, AXSharp.Connector.IPlain { + public Extendee2() : base() + { + } + public Generics.SomeType SomeType { get; set; } = new Generics.SomeType(); } public partial class SomeType : AXSharp.Connector.IPlain { + public SomeType() + { + } } } } \ No newline at end of file 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 2afa534b..51a00754 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 @@ -4,6 +4,9 @@ namespace Pocos { public partial class _NULL_CONTEXT : AXSharp.Connector.IPlain, IContext { + public _NULL_CONTEXT() + { + } } public partial interface IContext 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 7eac697e..48f81b2a 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 @@ -4,6 +4,9 @@ namespace Pocos { public partial class _NULL_CONTEXT_MULTIPLE : AXSharp.Connector.IPlain, IContext_Multiple, IObject_Multiple { + public _NULL_CONTEXT_MULTIPLE() + { + } } public partial interface IContext_Multiple diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_internal.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_internal.g.cs index a1ac8818..78060d53 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_internal.g.cs +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_internal.g.cs @@ -4,5 +4,8 @@ namespace Pocos { internal partial class ClassWithComplexTypes : AXSharp.Connector.IPlain { + public ClassWithComplexTypes() + { + } } } \ No newline at end of file diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_no_access_modifier.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_no_access_modifier.g.cs index 46710acf..35e8a50a 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_no_access_modifier.g.cs +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/class_no_access_modifier.g.cs @@ -4,5 +4,8 @@ namespace Pocos { public partial class NoAccessModifierClass : AXSharp.Connector.IPlain { + public NoAccessModifierClass() + { + } } } \ 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 9ff7ea51..81b3bb0a 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 @@ -6,11 +6,18 @@ namespace ClassWithComplexTypesNamespace { public partial class ClassWithComplexTypes : AXSharp.Connector.IPlain { + public ClassWithComplexTypes() + { + } + public ClassWithComplexTypesNamespace.ComplexType1 myComplexType { get; set; } = new ClassWithComplexTypesNamespace.ComplexType1(); } public partial class ComplexType1 : AXSharp.Connector.IPlain { + public ComplexType1() + { + } } } } \ No newline at end of file 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 9fd75d15..7ffd1c51 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 @@ -6,11 +6,18 @@ namespace ClassWithNonTraspilableMemberssNamespace { public partial class ClassWithNonTraspilableMembers : AXSharp.Connector.IPlain { + public ClassWithNonTraspilableMembers() + { + } + public ClassWithNonTraspilableMemberssNamespace.ComplexType1 myComplexType { get; set; } = new ClassWithNonTraspilableMemberssNamespace.ComplexType1(); } public partial class ComplexType1 : AXSharp.Connector.IPlain { + public ComplexType1() + { + } } } } \ No newline at end of file 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 5977417b..df4dd537 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 @@ -6,11 +6,18 @@ namespace ClassWithPragmasNamespace { public partial class ClassWithPragmas : AXSharp.Connector.IPlain { + public ClassWithPragmas() + { + } + public ClassWithPragmasNamespace.ComplexType1 myComplexType { get; set; } = new ClassWithPragmasNamespace.ComplexType1(); } public partial class ComplexType1 : AXSharp.Connector.IPlain { + public ComplexType1() + { + } } } } \ No newline at end of file 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 0c1b97f7..694cfb6b 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 @@ -6,6 +6,10 @@ namespace ClassWithPrimitiveTypesNamespace { public partial class ClassWithPrimitiveTypes : AXSharp.Connector.IPlain { + public ClassWithPrimitiveTypes() + { + } + public Boolean myBOOL { get; set; } public Byte myBYTE { get; set; } 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 9eefca65..88b09bb4 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 @@ -8,6 +8,10 @@ namespace Pocos internal partial class ClassWithUsingDirectives : AXSharp.Connector.IPlain { + public ClassWithUsingDirectives() + { + } + using SimpleFirstLevelNamespace ; using SimpleQualifiedNamespace . Qualified ; using HelloLevelOne . HelloLevelTwo ; } 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 4b20362c..b23c44bc 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 @@ -6,12 +6,20 @@ namespace CompilerOmmits { public partial class ClassWithArrays : AXSharp.Connector.IPlain { + public ClassWithArrays() + { + } + public CompilerOmmits.Complex _must_be_omitted_in_onliner { get; set; } = new CompilerOmmits.Complex(); public Byte[] _primitive { get; set; } = new Byte[11]; } public partial class Complex : AXSharp.Connector.IPlain { + public Complex() + { + } + public string HelloString { get; set; } = string.Empty; public UInt64 Id { get; set; } } @@ -21,6 +29,10 @@ namespace Enums { public partial class ClassWithEnums : AXSharp.Connector.IPlain { + public ClassWithEnums() + { + } + public global::Enums.Colors colors { get; set; } public String NamedValuesColors { get; set; } @@ -31,12 +43,20 @@ namespace misc { public partial class VariousMembers : AXSharp.Connector.IPlain { + public VariousMembers() + { + } + public misc.SomeClass _SomeClass { get; set; } = new misc.SomeClass(); public misc.Motor _Motor { get; set; } = new misc.Motor(); } public partial class SomeClass : AXSharp.Connector.IPlain { + public SomeClass() + { + } + public string SomeClassVariable { get; set; } = string.Empty; } @@ -56,12 +76,23 @@ namespace UnknownArraysShouldNotBeTraspiled { 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) }); +#pragma warning restore CS0612 + } + public UnknownArraysShouldNotBeTraspiled.Complex[] _complexKnown { get; set; } = new UnknownArraysShouldNotBeTraspiled.Complex[11]; public Byte[] _primitive { get; set; } = new Byte[11]; } public partial class Complex : AXSharp.Connector.IPlain { + public Complex() + { + } + public string HelloString { get; set; } = string.Empty; public UInt64 Id { get; set; } } 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 e3e9a9e0..7b5e8249 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 @@ -62,6 +62,10 @@ public partial class unitsTwinController public partial class ComplexForConfig : AXSharp.Connector.IPlain { + public ComplexForConfig() + { + } + public Boolean myBOOL { get; set; } public Byte myBYTE { get; set; } 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 0d64ca0c..fb5be2d2 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 @@ -9,6 +9,9 @@ namespace FileWithUsingsSimpleFirstLevelNamespace { public partial class Hello : AXSharp.Connector.IPlain { + public Hello() + { + } } } @@ -16,6 +19,9 @@ namespace FileWithUsingsSimpleQualifiedNamespace.Qualified { public partial class Hello : AXSharp.Connector.IPlain { + public Hello() + { + } } } @@ -25,6 +31,9 @@ namespace FileWithUsingsHelloLevelTwo { public partial class Hello : AXSharp.Connector.IPlain { + public Hello() + { + } } } } @@ -33,6 +42,9 @@ namespace ExampleNamespace { public partial class Hello : AXSharp.Connector.IPlain { + public Hello() + { + } } } } \ No newline at end of file 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 cace0f96..9d4a791d 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 @@ -6,10 +6,17 @@ namespace GenericsTests { public partial class Extender : AXSharp.Connector.IPlain { + public Extender() + { + } } public partial class SomeTypeToBeGeneric : AXSharp.Connector.IPlain { + public SomeTypeToBeGeneric() + { + } + public Boolean Boolean { get; set; } public Int16 Cele { get; set; } @@ -17,6 +24,10 @@ public partial class SomeTypeToBeGeneric : AXSharp.Connector.IPlain public partial class Extendee2 : GenericsTests.Extender, AXSharp.Connector.IPlain { + public Extendee2() : base() + { + } + public GenericsTests.SomeTypeToBeGeneric SomeData { get; set; } = new GenericsTests.SomeTypeToBeGeneric(); } } 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 9d0c5341..c1f1eb9b 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 @@ -6,6 +6,10 @@ namespace makereadonce { public partial class MembersWithMakeReadOnce : AXSharp.Connector.IPlain { + public MembersWithMakeReadOnce() + { + } + public string makeReadOnceMember { get; set; } = string.Empty; public string someOtherMember { get; set; } = string.Empty; public makereadonce.ComplexMember makeReadComplexMember { get; set; } = new makereadonce.ComplexMember(); @@ -14,6 +18,10 @@ public partial class MembersWithMakeReadOnce : AXSharp.Connector.IPlain public partial class ComplexMember : AXSharp.Connector.IPlain { + public ComplexMember() + { + } + public string someMember { get; set; } = string.Empty; public string someOtherMember { get; set; } = string.Empty; } 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 92deb2e5..f79f845b 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 @@ -6,6 +6,10 @@ namespace makereadonly { public partial class MembersWithMakeReadOnly : AXSharp.Connector.IPlain { + public MembersWithMakeReadOnly() + { + } + public string makeReadOnceMember { get; set; } = string.Empty; public string someOtherMember { get; set; } = string.Empty; public makereadonly.ComplexMember makeReadComplexMember { get; set; } = new makereadonly.ComplexMember(); @@ -14,6 +18,10 @@ public partial class MembersWithMakeReadOnly : AXSharp.Connector.IPlain public partial class ComplexMember : AXSharp.Connector.IPlain { + public ComplexMember() + { + } + public string someMember { get; set; } = string.Empty; public string someOtherMember { get; set; } = string.Empty; } 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 1932346a..1590c14c 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 @@ -6,6 +6,10 @@ namespace Enums { public partial class ClassWithEnums : AXSharp.Connector.IPlain { + public ClassWithEnums() + { + } + public global::Enums.Colors colors { get; set; } public String NamedValuesColors { get; set; } @@ -16,12 +20,20 @@ namespace misc { public partial class VariousMembers : AXSharp.Connector.IPlain { + public VariousMembers() + { + } + public misc.SomeClass _SomeClass { get; set; } = new misc.SomeClass(); public misc.Motor _Motor { get; set; } = new misc.Motor(); } public partial class SomeClass : AXSharp.Connector.IPlain { + public SomeClass() + { + } + public string SomeClassVariable { get; set; } = string.Empty; } @@ -41,12 +53,23 @@ namespace UnknownArraysShouldNotBeTraspiled { 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) }); +#pragma warning restore CS0612 + } + public UnknownArraysShouldNotBeTraspiled.Complex[] _complexKnown { get; set; } = new UnknownArraysShouldNotBeTraspiled.Complex[11]; public Byte[] _primitive { get; set; } = new Byte[11]; } public partial class Complex : AXSharp.Connector.IPlain { + public Complex() + { + } + public string HelloString { get; set; } = string.Empty; public UInt64 Id { get; set; } } 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 5ec06fdf..c621e94c 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 @@ -17,6 +17,10 @@ public partial class unitsTwinController public partial class Motor : AXSharp.Connector.IPlain { + public Motor() + { + } + public Boolean Run { get; set; } } @@ -42,6 +46,10 @@ public partial class struct4 public partial class AbstractMotor : AXSharp.Connector.IPlain { + public AbstractMotor() + { + } + public Boolean Run { get; set; } public Boolean ReverseDirection { get; set; } @@ -49,9 +57,15 @@ public partial class AbstractMotor : AXSharp.Connector.IPlain public partial class GenericMotor : AbstractMotor, AXSharp.Connector.IPlain { + public GenericMotor() : base() + { + } } public partial class SpecificMotorA : GenericMotor, AXSharp.Connector.IPlain { + public SpecificMotorA() : base() + { + } } } \ 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 d74190dc..4630b8fe 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 @@ -6,10 +6,17 @@ namespace RefToSimple { public partial class ref_to_simple : AXSharp.Connector.IPlain { + public ref_to_simple() + { + } } public partial class referenced : AXSharp.Connector.IPlain { + public referenced() + { + } + public Int16 b { get; set; } } } diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/simple_empty_class.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/simple_empty_class.g.cs index 9152919c..116388ce 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/simple_empty_class.g.cs +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/POCO/simple_empty_class.g.cs @@ -4,5 +4,8 @@ namespace Pocos { public partial class simple_class : AXSharp.Connector.IPlain { + public simple_class() + { + } } } \ No newline at end of file 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 bfd3aa47..2121558e 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 @@ -6,6 +6,9 @@ namespace sampleNamespace { public partial class simple_empty_class_within_namespace : AXSharp.Connector.IPlain { + public simple_empty_class_within_namespace() + { + } } } } \ 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 b0475f4d..1713fdcc 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 @@ -6,6 +6,10 @@ namespace NamedValuesNamespace { public partial class using_type_named_values : AXSharp.Connector.IPlain { + public using_type_named_values() + { + } + public Int16 LColors { get; set; } } } 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 fc3c00bb..ab706cf6 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 @@ -6,6 +6,10 @@ namespace Simatic.Ax.StateFramework { public partial class using_type_named_values : AXSharp.Connector.IPlain { + public using_type_named_values() + { + } + public UInt16 LColors { get; set; } } } 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 1deabc4a..59a91df6 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 @@ -13,6 +13,10 @@ namespace Simatic.Ax.StateFramework { public partial class CompareGuardLint : AXSharp.Connector.IPlain, IGuard { + 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 6dce8390..2dcf9ee6 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 @@ -17,6 +17,10 @@ public partial class Vehicle public partial class NoAccessModifierClass : AXSharp.Connector.IPlain { + public NoAccessModifierClass() + { + } + public string SomeClassVariable { get; set; } = string.Empty; } } 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 9fb059c8..a8b8283f 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 @@ -6,6 +6,10 @@ namespace TypesWithPropertyAttributes { public partial class SomeAddedProperties : AXSharp.Connector.IPlain { + public SomeAddedProperties() + { + } + public Int16 Counter { get; set; } } } diff --git a/src/AXSharp.connectors/src/AXSharp.Connector/BuilderHelpers/Arrays.cs b/src/AXSharp.connectors/src/AXSharp.Connector/BuilderHelpers/Arrays.cs index 4753609d..a13b0c47 100644 --- a/src/AXSharp.connectors/src/AXSharp.Connector/BuilderHelpers/Arrays.cs +++ b/src/AXSharp.connectors/src/AXSharp.Connector/BuilderHelpers/Arrays.cs @@ -59,6 +59,29 @@ public static class Arrays } } + [Obsolete("Internal use only")] + [EditorBrowsable(EditorBrowsableState.Never)] + public static void InstantiateArray(this Array array, + Func initializer, + IEnumerable<(int LowerBound, int UpperBound)> arrayBounds) + { + var indice = string.Empty; + var arrayFieldIndex = 0; + + // Rank + foreach (var rank in arrayBounds) + { + indice = string.IsNullOrEmpty(indice) ? string.Empty : $"{indice},"; + + // Index + for (int index = rank.LowerBound; index <= rank.UpperBound; index++) + { + var a = initializer(); + array.SetValue(a, arrayFieldIndex++); + } + } + } + private static int GetNumberOfElements((int LowerBound, int UpperBound) bounds) { return bounds.LowerBound == 0 ? bounds.UpperBound + 1 : bounds.UpperBound - bounds.LowerBound; diff --git a/src/tests.integrations/integrated/src/ax/apax-lock.json b/src/tests.integrations/integrated/src/ax/apax-lock.json index b27a95c8..18e297af 100644 --- a/src/tests.integrations/integrated/src/ax/apax-lock.json +++ b/src/tests.integrations/integrated/src/ax/apax-lock.json @@ -36,53 +36,53 @@ }, "@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": "4.2.4", + "integrity": "sha512-PO3f185FtNodDaOm7hd9CIs1nmyVd+B+JbObY7JFovtc6xvyZh39b5U6VZ9C56nEkAYxPs8hjFadg5n0P7fr7w==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst/-/axunitst-4.2.4.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": "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/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": "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", "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", + "version": "1.1.2", + "integrity": "sha512-h1QdEg6UJcKFa6rCr6BgMSliqnlgpJq1uq4f8o05U/aoc0BdO2F93ReqMGGCeR+0nMjxRfmGf9fRrroXAxDH7A==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/mod/-/mod-1.1.2.tgz", "dependencies": { - "@ax/mod-win-x64": "1.0.4", - "@ax/mod-linux-x64": "1.0.4" + "@ax/mod-win-x64": "1.1.2", + "@ax/mod-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", + "version": "1.1.2", + "integrity": "sha512-KMMxXTmAuwkvqroapb7qisRxnFvARHvZjahbtGMwcYveWa90NNLpatG2FJ03Op9VQk8MXXXV6o2LXQT/rJQFMg==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/mon/-/mon-1.1.2.tgz", "dependencies": { - "@ax/mon-win-x64": "1.0.4", - "@ax/mon-linux-x64": "1.0.4" + "@ax/mon-win-x64": "1.1.2", + "@ax/mon-linux-x64": "1.1.2" } }, "@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", + "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", "dependencies": { - "@ax/sdb-win-x64": "1.0.4", - "@ax/sdb-linux-x64": "1.0.4" + "@ax/sdb-win-x64": "1.1.2", + "@ax/sdb-linux-x64": "1.1.2" } }, "@ax/sld": { @@ -97,33 +97,33 @@ }, "@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", + "version": "2311.1.2", + "integrity": "sha512-uAj/R9YNHQC+iMg82CF9W6RszIUR4Hb9SeZas+ejBt3yBAMi6QEIL5hf5heIa2iYP685sjS0E2Ky2HB91rXSmw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/st/-/st-2311.1.2.tgz", "dependencies": { - "@ax/stc": "6.0.146", - "@ax/apax-build": "0.7.0", - "@ax/st-ls": "3.0.113" + "@ax/stc": "6.1.59", + "@ax/apax-build": "0.8.0", + "@ax/st-ls": "6.1.59" } }, "@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", + "version": "6.1.59", + "integrity": "sha512-e8NPNMrdMagJaPisIrdSG16kEHfMqGlO273f0EvBzL9duXIbcvgzKhYvDkAydSywUY0wzTMcvlikU9o6YuMZmw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/target-llvm/-/target-llvm-6.1.59.tgz", "dependencies": { - "@ax/target-llvm-win-x64": "6.0.146", - "@ax/target-llvm-linux-x64": "6.0.146" + "@ax/target-llvm-win-x64": "6.1.59", + "@ax/target-llvm-linux-x64": "6.1.59" } }, "@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", + "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", "dependencies": { - "@ax/target-mc7plus-win-x64": "6.0.146", - "@ax/target-mc7plus-linux-x64": "6.0.146" + "@ax/target-mc7plus-win-x64": "6.1.59", + "@ax/target-mc7plus-linux-x64": "6.1.59" } }, "@ax/simatic-pragma-stc-plugin": { @@ -135,22 +135,22 @@ }, "@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", + "version": "2.7.1", + "integrity": "sha512-gkk06H11R2PCclPTF/kikex65vPjGjiHJ7BqlIAnEDM54ETF+UWDkSRvTWrl4PEhoFjqB0mAxm7P1cNg6kFs2g==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/trace/-/trace-2.7.1.tgz", "dependencies": { - "@ax/trace-win-x64": "2.7.0", - "@ax/trace-linux-x64": "2.7.0" + "@ax/trace-win-x64": "2.7.1", + "@ax/trace-linux-x64": "2.7.1" } }, "@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", + "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", "dependencies": { - "@ax/diagnostic-buffer-win-x64": "1.2.0", - "@ax/diagnostic-buffer-linux-x64": "1.2.0" + "@ax/diagnostic-buffer-win-x64": "1.3.0", + "@ax/diagnostic-buffer-linux-x64": "1.3.0" } }, "@ax/performance-info": { @@ -175,55 +175,55 @@ }, "@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", + "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", "dependencies": { - "@ax/certificate-management-win-x64": "1.1.0", - "@ax/certificate-management-linux-x64": "1.1.0" + "@ax/certificate-management-win-x64": "1.1.1", + "@ax/certificate-management-linux-x64": "1.1.1" } }, "@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", + "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", "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": "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", "dependencies": { - "@ax/axunitst-runner-linux-x64": "4.1.8", - "@ax/axunitst-runner-win-x64": "4.1.8" + "@ax/axunitst-runner-linux-x64": "4.2.4", + "@ax/axunitst-runner-win-x64": "4.2.4" } }, "@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", + "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.1.8", - "@ax/axunitst-generator-win-x64": "4.1.8" + "@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.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", + "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.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": "4.2.4", + "integrity": "sha512-+ERROnGpRVJri3wm5T5Lqqyl0ut0IJiVqNk3Ha8FZhUxCMg6jS6a744HEA1mYv0MpdUOo+SUEdNCvFX9YX7U8w==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/axunitst-docs/-/axunitst-docs-4.2.4.tgz", "dependencies": {} }, "@ax/build-native": { @@ -238,9 +238,9 @@ }, "@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", + "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", "os": [ "win32" ], @@ -251,9 +251,9 @@ }, "@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", + "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", "os": [ "linux" ], @@ -264,9 +264,9 @@ }, "@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", + "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", "os": [ "win32" ], @@ -277,9 +277,9 @@ }, "@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", + "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", "os": [ "linux" ], @@ -290,9 +290,9 @@ }, "@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", + "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", "os": [ "win32" ], @@ -303,9 +303,9 @@ }, "@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", + "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", "os": [ "linux" ], @@ -316,36 +316,36 @@ }, "@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", + "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.0.146", - "@ax/stc-linux-x64": "6.0.146" + "@ax/stc-win-x64": "6.1.59", + "@ax/stc-linux-x64": "6.1.59" } }, "@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", + "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": "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", + "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": "3.0.113", - "@ax/st-ls-linux-x64": "3.0.113" + "@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.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", + "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", "os": [ "win32" ], @@ -356,9 +356,9 @@ }, "@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", + "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", "os": [ "linux" ], @@ -369,9 +369,9 @@ }, "@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", + "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", "os": [ "win32" ], @@ -382,9 +382,9 @@ }, "@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", + "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", "os": [ "linux" ], @@ -395,9 +395,9 @@ }, "@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", + "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", "os": [ "win32" ], @@ -408,9 +408,9 @@ }, "@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", + "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", "os": [ "linux" ], @@ -421,9 +421,9 @@ }, "@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", + "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", "os": [ "win32" ], @@ -434,9 +434,9 @@ }, "@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", + "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", "os": [ "linux" ], @@ -499,9 +499,9 @@ }, "@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", + "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", "os": [ "win32" ], @@ -512,9 +512,9 @@ }, "@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", + "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", "os": [ "linux" ], @@ -535,9 +535,9 @@ }, "@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", + "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", "os": [ "linux" ], @@ -548,9 +548,9 @@ }, "@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", + "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", "os": [ "win32" ], @@ -561,9 +561,9 @@ }, "@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", + "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", "os": [ "linux" ], @@ -574,9 +574,9 @@ }, "@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", + "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", "os": [ "win32" ], @@ -613,9 +613,9 @@ }, "@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", + "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", "os": [ "win32" ], @@ -623,14 +623,14 @@ "x64" ], "dependencies": { - "@ax/st-docs": "6.0.146" + "@ax/st-docs": "6.1.59" } }, "@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", + "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", "os": [ "linux" ], @@ -638,14 +638,14 @@ "x64" ], "dependencies": { - "@ax/st-docs": "6.0.146" + "@ax/st-docs": "6.1.59" } }, "@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", + "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", "os": [ "win32" ], @@ -656,9 +656,9 @@ }, "@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", + "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", "os": [ "linux" ], @@ -683,9 +683,9 @@ }, "@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": "6.1.59", + "integrity": "sha512-yKvjrpe7o6MQYeAHNxkSGtHXWn7sMDSLt0HzqxFSNGiw3OFQwYADSRTEpgi7TETA1u4pBbNTOCie4TDtYyYhiw==", + "resolved": "https://registry.simatic-ax.siemens.io/@ax/st-docs/-/st-docs-6.1.59.tgz", "dependencies": {} } }, diff --git a/src/tests.integrations/integrated/src/ax/apax.yml b/src/tests.integrations/integrated/src/ax/apax.yml index 465d7bc7..4129cb5e 100644 --- a/src/tests.integrations/integrated/src/ax/apax.yml +++ b/src/tests.integrations/integrated/src/ax/apax.yml @@ -26,4 +26,4 @@ scripts: - apax sld load --accept-security-disclaimer -t $AXTARGET -i $AXTARGETPLATFORMINPUT -r installStrategy: strict -apaxVersion: 3.1.0 +apaxVersion: 3.1.1 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 cdea574d..b7ac1ed7 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 @@ -42,9 +42,15 @@ public partial class integratedTwinController public partial class Pokus : AXSharp.Connector.IPlain { + public Pokus() + { + } } public partial class Nested : AXSharp.Connector.IPlain { + public Nested() + { + } } } \ No newline at end of file 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 5542e190..386d2c13 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 @@ -4,6 +4,10 @@ namespace Pocos { public partial class all_primitives : AXSharp.Connector.IPlain { + public all_primitives() + { + } + public Boolean myBOOL { get; set; } public Byte myBYTE { get; set; } 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 bc7777b7..1f87cf9f 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 @@ -6,6 +6,13 @@ namespace MonsterData { 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) }); +#pragma warning restore CS0612 + } + public string Description { get; set; } = string.Empty; public UInt64 Id { get; set; } @@ -17,11 +24,19 @@ public partial class MonsterBase : AXSharp.Connector.IPlain public partial class Monster : MonsterData.MonsterBase, AXSharp.Connector.IPlain { + public Monster() : base() + { + } + public MonsterData.DriveBase DriveA { get; set; } = new MonsterData.DriveBase(); } public partial class DriveBase : AXSharp.Connector.IPlain { + public DriveBase() + { + } + public Double Position { get; set; } public Double Velo { get; set; } 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 963852b1..f78ae5ec 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 @@ -6,6 +6,13 @@ namespace RealMonsterData { 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) }); +#pragma warning restore CS0612 + } + public string Description { get; set; } = string.Empty; public UInt64 Id { get; set; } @@ -18,11 +25,19 @@ public partial class RealMonsterBase : AXSharp.Connector.IPlain public partial class RealMonster : RealMonsterData.RealMonsterBase, AXSharp.Connector.IPlain { + public RealMonster() : base() + { + } + public RealMonsterData.DriveBaseNested DriveA { get; set; } = new RealMonsterData.DriveBaseNested(); } public partial class DriveBaseNested : AXSharp.Connector.IPlain { + public DriveBaseNested() + { + } + public Double Position { get; set; } public Double Velo { get; set; } @@ -36,6 +51,10 @@ public partial class DriveBaseNested : AXSharp.Connector.IPlain public partial class NestedLevelOne : AXSharp.Connector.IPlain { + public NestedLevelOne() + { + } + public Double Position { get; set; } public Double Velo { get; set; } @@ -49,6 +68,10 @@ public partial class NestedLevelOne : AXSharp.Connector.IPlain public partial class NestedLevelTwo : AXSharp.Connector.IPlain { + public NestedLevelTwo() + { + } + public Double Position { get; set; } public Double Velo { get; set; } @@ -62,6 +85,10 @@ public partial class NestedLevelTwo : AXSharp.Connector.IPlain public partial class NestedLevelThree : AXSharp.Connector.IPlain { + public NestedLevelThree() + { + } + public Double Position { get; set; } public Double Velo { get; set; } diff --git a/src/tests.integrations/integrated/src/integrated.twin/Entry.cs b/src/tests.integrations/integrated/src/integrated.twin/Entry.cs index d8dfe970..26645faa 100644 --- a/src/tests.integrations/integrated/src/integrated.twin/Entry.cs +++ b/src/tests.integrations/integrated/src/integrated.twin/Entry.cs @@ -18,8 +18,8 @@ namespace integrated public static class Entry { private static string TargetIp = Environment.GetEnvironmentVariable("AXTARGET"); // <- replace by your IP - private const string UserName = "Everybody"; //<- replace by user name you have set up in your WebAPI settings - private const string Pass = ""; // <- Pass in the password that you have set up for the user. NOT AS PLAIN TEXT! Use user secrets instead. + 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. public static integratedTwinController Plc { get; } diff --git a/src/tests.integrations/integrated/tests/integrated.tests/PlainersSwappingTests.cs b/src/tests.integrations/integrated/tests/integrated.tests/PlainersSwappingTests.cs index f257c187..519570d7 100644 --- a/src/tests.integrations/integrated/tests/integrated.tests/PlainersSwappingTests.cs +++ b/src/tests.integrations/integrated/tests/integrated.tests/PlainersSwappingTests.cs @@ -207,10 +207,10 @@ public async Task PlainToOnline_should_copy_entire_structure() p.ArrayOfBytes[1] = 22; p.ArrayOfBytes[2] = 33; - for (int i = 0; i < p.ArrayOfDrives.Length; i++) - { - p.ArrayOfDrives[i] = new(); - } + //for (int i = 0; i < p.ArrayOfDrives.Length; i++) + //{ + // p.ArrayOfDrives[i] = new(); + //} p.ArrayOfDrives[0].Velo = 110;