From 9e0eebd4198d54b62d41d065ec68e747e6b1dcba Mon Sep 17 00:00:00 2001
From: PTKu <61538034+PTKu@users.noreply.github.com>
Date: Fri, 29 Nov 2024 15:45:08 +0100
Subject: [PATCH 1/2] the pocos namespaces are backed prefixed instead of
postfixed
---
.../AXSharp.Cs.Compiler/Helpers/CsHelpers.cs | 2 +-
.../Plain/CsPlainSourceBuilder.cs | 33 +--
.../.g/Onliners/array_declaration.g.cs | 56 ++--
.../class_extended_by_known_type.g.cs | 56 ++--
.../.g/Onliners/class_generic_extension.g.cs | 112 ++++----
.../Onliners/class_with_complex_members.g.cs | 56 ++--
.../class_with_non_public_members.g.cs | 56 ++--
.../.g/Onliners/class_with_pragmas.g.cs | 56 ++--
.../class_with_primitive_members.g.cs | 28 +-
.../.g/Onliners/compileromitsattribute.g.cs | 252 +++++++++---------
.../.g/Onliners/file_with_usings.g.cs | 112 ++++----
.../units/expected/.g/Onliners/generics.g.cs | 84 +++---
.../expected/.g/Onliners/makereadonce.g.cs | 56 ++--
.../expected/.g/Onliners/makereadonly.g.cs | 56 ++--
.../units/expected/.g/Onliners/misc.g.cs | 196 +++++++-------
.../expected/.g/Onliners/ref_to_simple.g.cs | 56 ++--
.../simple_empty_class_within_namespace.g.cs | 28 +-
.../.g/Onliners/type_named_values.g.cs | 28 +-
.../Onliners/type_named_values_literals.g.cs | 28 +-
.../expected/.g/Onliners/type_with_enum.g.cs | 28 +-
.../Onliners/types_with_name_attributes.g.cs | 84 +++---
.../types_with_property_attributes.g.cs | 28 +-
.../expected/.g/POCO/array_declaration.g.cs | 11 +-
.../.g/POCO/class_extended_by_known_type.g.cs | 11 +-
.../units/expected/.g/POCO/class_extends.g.cs | 5 +-
.../.g/POCO/class_extends_and_implements.g.cs | 17 +-
.../.g/POCO/class_generic_extension.g.cs | 23 +-
.../expected/.g/POCO/class_implements.g.cs | 6 +-
.../.g/POCO/class_implements_multiple.g.cs | 12 +-
.../.g/POCO/class_with_complex_members.g.cs | 9 +-
.../POCO/class_with_non_public_members.g.cs | 9 +-
.../expected/.g/POCO/class_with_pragmas.g.cs | 9 +-
.../.g/POCO/class_with_primitive_members.g.cs | 4 +-
.../.g/POCO/class_with_using_directives.g.cs | 5 +-
.../.g/POCO/compileromitsattribute.g.cs | 46 +---
.../units/expected/.g/POCO/configuration.g.cs | 19 +-
.../units/expected/.g/POCO/enum_simple.g.cs | 6 +-
.../.g/POCO/file_with_unsupported.g.cs | 5 +-
.../expected/.g/POCO/file_with_usings.g.cs | 27 +-
.../units/expected/.g/POCO/generics.g.cs | 14 +-
.../units/expected/.g/POCO/makereadonce.g.cs | 11 +-
.../units/expected/.g/POCO/makereadonly.g.cs | 11 +-
.../samples/units/expected/.g/POCO/misc.g.cs | 36 +--
.../units/expected/.g/POCO/mixed_access.g.cs | 44 +--
.../units/expected/.g/POCO/program.g.cs | 6 +-
.../units/expected/.g/POCO/ref_to_simple.g.cs | 7 +-
.../simple_empty_class_within_namespace.g.cs | 4 +-
.../units/expected/.g/POCO/struct_simple.g.cs | 5 +-
.../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 | 12 +-
.../.g/POCO/types_with_name_attributes.g.cs | 12 +-
.../POCO/types_with_property_attributes.g.cs | 4 +-
.../samples/units/expected/units.csproj | 4 +-
.../app/ix/.g/POCO/configuration.g.cs | 4 +-
.../expected/app/ix/.g/POCO/program.g.cs | 6 +-
.../TestConnector.cs | 42 ++-
.../ix/.g/POCO/configuration.g.cs | 26 +-
.../ix/.g/POCO/example.g.cs | 30 +--
.../ix/.g/POCO/ixcomponent.g.cs | 10 +-
.../ix/.g/POCO/measurement.g.cs | 15 +-
.../ix/.g/POCO/monster.g.cs | 20 +-
.../ix/.g/POCO/program.g.cs | 6 +-
.../ix/.g/POCO/stacked/weather.g.cs | 6 +-
.../ix/.g/POCO/tabbed/weather.g.cs | 6 +-
.../ix/.g/POCO/test/enumStationStatus.g.cs | 6 +-
.../ix/.g/POCO/weather.g.cs | 7 +-
.../ix/.g/POCO/wrapped/weather.g.cs | 6 +-
.../OnlineShadowPlain/OnlineShadowPlain.razor | 8 +-
.../.g/Onliners/dataswapping/moster.g.cs | 84 +++---
.../.g/Onliners/dataswapping/realmonster.g.cs | 168 ++++++------
.../.g/POCO/configuration.g.cs | 74 +++--
.../.g/POCO/dataswapping/moster.g.cs | 20 +-
.../.g/POCO/dataswapping/myEnum.g.cs | 6 +-
.../.g/POCO/dataswapping/realmonster.g.cs | 33 +--
.../src/integrated.twin/.g/POCO/program.g.cs | 6 +-
.../integrated.tests/PlainersSwappingTests.cs | 16 +-
77 files changed, 1177 insertions(+), 1321 deletions(-)
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 52fb9f68..20e6a707 100644
--- a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Helpers/CsHelpers.cs
+++ b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Helpers/CsHelpers.cs
@@ -67,6 +67,6 @@ public static string CreateGenericSwapperMethodFromPlainer(string methodName, st
/// 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}";
+ return declaration.ContainingNamespace.FullyQualifiedName == "$GLOBAL" ? $"global::Pocos.{declaration.Name}" : $"Pocos.{declaration.ContainingNamespace.FullyQualifiedName}.{declaration.Name}";
}
}
\ 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 7a065e1b..7af3e64d 100644
--- a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Plain/CsPlainSourceBuilder.cs
+++ b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Plain/CsPlainSourceBuilder.cs
@@ -67,9 +67,6 @@ 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
@@ -82,7 +79,7 @@ public void CreateClassDeclaration(IClassDeclarationSyntax classDeclarationSynta
.Any(p => p.FullyQualifiedName == classDeclaration.ExtendedTypeAccesses.FirstOrDefault()?.Type.FullyQualifiedName);
if (isExtended)
- AddToSource($" : {classDeclaration.ExtendedTypeAccesses.FirstOrDefault()?.Type.GetFullyQualifiedPocoName()}");
+ AddToSource($" : {classDeclaration.ExtendedTypeAccesses.FirstOrDefault()?.Type.FullyQualifiedName}");
@@ -101,8 +98,6 @@ 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
}
///
@@ -200,9 +195,11 @@ 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 {fileSyntaxUsingDirective.QualifiedIdentifierList.GetText()}.Pocos;");
+ AddToSource($"using Pocos.{fileSyntaxUsingDirective.QualifiedIdentifierList.GetText()};");
}
+ AddToSource("namespace Pocos {");
fileSyntax.Declarations.ToList().ForEach(p => p.Visit(visitor, this));
+ AddToSource("}");
}
///
@@ -212,19 +209,9 @@ 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
}
///
@@ -333,9 +320,7 @@ 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("{");
@@ -344,8 +329,6 @@ public void CreateStructuredType(IStructTypeDeclarationSyntax structTypeDeclarat
structuredTypeDeclaration.Fields.ToList().ForEach(p => p.Accept(visitor, this));
AddToSource("}");
-
- AddToSource("}"); // namespace closing
}
///
@@ -369,13 +352,13 @@ public void CreateScalarTypeDeclaration(IScalarTypeDeclaration scalarTypeDeclara
///
public void CreateClassDeclaration(IClassDeclaration classDeclaration, IxNodeVisitor data)
{
- AddToSource(classDeclaration.GetFullyQualifiedPocoName());
+ AddToSource(classDeclaration.GetQualifiedName());
}
///
public void CreateInterfaceDeclaration(IInterfaceDeclaration interfaceDeclaration, IxNodeVisitor visitor)
{
- AddToSource(interfaceDeclaration.GetFullyQualifiedPocoName());
+ AddToSource(interfaceDeclaration.GetQualifiedName());
}
///
@@ -404,7 +387,7 @@ public void CreateStringTypeDeclaration(IStringTypeDeclaration stringTypeDeclara
public void CreateStructuredType(IStructuredTypeDeclaration structuredTypeDeclaration, IxNodeVisitor visitor)
{
structuredTypeDeclaration.Pragmas.ToList().ForEach(p => p.Accept(visitor, this));
- AddToSource($"{structuredTypeDeclaration.GetFullyQualifiedPocoName()}");
+ AddToSource($"{structuredTypeDeclaration.GetQualifiedName()}");
}
///
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 bbe1e56b..d306e637 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
@@ -36,9 +36,9 @@ public async virtual Task OnlineToPlain()
return await (dynamic)this.OnlineToPlainAsync();
}
- public async Task OnlineToPlainAsync()
+ public async Task OnlineToPlainAsync()
{
- ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain = new ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class();
+ Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain = new Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class();
await this.ReadAsync();
plain.primitive = primitive.Select(p => p.LastValue).ToArray();
#pragma warning disable CS0612
@@ -49,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()
{
- ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain = new ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class();
+ Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain = new Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class();
plain.primitive = primitive.Select(p => p.LastValue).ToArray();
#pragma warning disable CS0612
plain.complex = complex.Select(async p => await p._OnlineToPlainNoacAsync()).Select(p => p.Result).ToArray();
@@ -61,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(ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain)
+ protected async Task _OnlineToPlainNoacAsync(Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain)
{
plain.primitive = primitive.Select(p => p.LastValue).ToArray();
#pragma warning disable CS0612
@@ -75,7 +75,7 @@ public async virtual Task PlainToOnline(T plain)
await this.PlainToOnlineAsync((dynamic)plain);
}
- public async Task> PlainToOnlineAsync(ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain)
+ public async Task> PlainToOnlineAsync(Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain)
{
var _primitive_i_FE8484DAB3 = 0;
#pragma warning disable CS0612
@@ -90,7 +90,7 @@ public async Task> PlainToOnlineAsync(ArrayDeclarati
[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(ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain)
+ public async Task _PlainToOnlineNoacAsync(Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain)
{
var _primitive_i_FE8484DAB3 = 0;
#pragma warning disable CS0612
@@ -107,15 +107,15 @@ public async virtual Task ShadowToPlain()
return await (dynamic)this.ShadowToPlainAsync();
}
- public async Task ShadowToPlainAsync()
+ public async Task ShadowToPlainAsync()
{
- ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain = new ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class();
+ Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain = new Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class();
plain.primitive = primitive.Select(p => p.Shadow).ToArray();
plain.complex = complex.Select(async p => await p.ShadowToPlainAsync()).Select(p => p.Result).ToArray();
return plain;
}
- protected async Task ShadowToPlainAsync(ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain)
+ protected async Task ShadowToPlainAsync(Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain)
{
plain.primitive = primitive.Select(p => p.Shadow).ToArray();
plain.complex = complex.Select(async p => await p.ShadowToPlainAsync()).Select(p => p.Result).ToArray();
@@ -127,7 +127,7 @@ public async virtual Task PlainToShadow(T plain)
await this.PlainToShadowAsync((dynamic)plain);
}
- public async Task> PlainToShadowAsync(ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain)
+ public async Task> PlainToShadowAsync(Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain)
{
var _primitive_i_FE8484DAB3 = 0;
primitive.Select(p => p.Shadow = plain.primitive[_primitive_i_FE8484DAB3++]).ToArray();
@@ -146,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(ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain, ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class latest = null)
+ public async Task DetectsAnyChangeAsync(Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain, Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class latest = null)
{
if (latest == null)
latest = await this._OnlineToPlainNoacAsync();
@@ -175,9 +175,9 @@ public void Poll()
this.RetrievePrimitives().ToList().ForEach(x => x.Poll());
}
- public ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class CreateEmptyPoco()
+ public Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class CreateEmptyPoco()
{
- return new ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class();
+ return new Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class();
}
private IList Children { get; } = new List();
@@ -278,24 +278,24 @@ public async virtual Task OnlineToPlain()
return await (dynamic)this.OnlineToPlainAsync();
}
- public async Task OnlineToPlainAsync()
+ public async Task OnlineToPlainAsync()
{
- ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain = new ArrayDeclarationSimpleNamespace.Pocos.some_complex_type();
+ Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain = new Pocos.ArrayDeclarationSimpleNamespace.some_complex_type();
await this.ReadAsync();
return plain;
}
[Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- public async Task _OnlineToPlainNoacAsync()
+ public async Task _OnlineToPlainNoacAsync()
{
- ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain = new ArrayDeclarationSimpleNamespace.Pocos.some_complex_type();
+ Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain = new Pocos.ArrayDeclarationSimpleNamespace.some_complex_type();
return plain;
}
[Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- protected async Task _OnlineToPlainNoacAsync(ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain)
+ protected async Task _OnlineToPlainNoacAsync(Pocos.ArrayDeclarationSimpleNamespace.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(ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain)
+ public async Task> PlainToOnlineAsync(Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain)
{
return await this.WriteAsync();
}
[Obsolete("This method should not be used if you indent to access the controllers data. Use `PlainToOnline` instead.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- public async Task _PlainToOnlineNoacAsync(ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain)
+ public async Task _PlainToOnlineNoacAsync(Pocos.ArrayDeclarationSimpleNamespace.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()
{
- ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain = new ArrayDeclarationSimpleNamespace.Pocos.some_complex_type();
+ Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain = new Pocos.ArrayDeclarationSimpleNamespace.some_complex_type();
return plain;
}
- protected async Task ShadowToPlainAsync(ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain)
+ protected async Task ShadowToPlainAsync(Pocos.ArrayDeclarationSimpleNamespace.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(ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain)
+ public async Task> PlainToShadowAsync(Pocos.ArrayDeclarationSimpleNamespace.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(ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain, ArrayDeclarationSimpleNamespace.Pocos.some_complex_type latest = null)
+ public async Task DetectsAnyChangeAsync(Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain, Pocos.ArrayDeclarationSimpleNamespace.some_complex_type latest = null)
{
if (latest == null)
latest = await this._OnlineToPlainNoacAsync();
@@ -369,9 +369,9 @@ public void Poll()
this.RetrievePrimitives().ToList().ForEach(x => x.Poll());
}
- public ArrayDeclarationSimpleNamespace.Pocos.some_complex_type CreateEmptyPoco()
+ public Pocos.ArrayDeclarationSimpleNamespace.some_complex_type CreateEmptyPoco()
{
- return new ArrayDeclarationSimpleNamespace.Pocos.some_complex_type();
+ return new Pocos.ArrayDeclarationSimpleNamespace.some_complex_type();
}
private IList Children { get; } = new List();
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 17b37b6e..e845f2dd 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()
{
- Simatic.Ax.StateFramework.Pocos.State1Transition plain = new Simatic.Ax.StateFramework.Pocos.State1Transition();
+ Pocos.Simatic.Ax.StateFramework.State1Transition plain = new Pocos.Simatic.Ax.StateFramework.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()
{
- Simatic.Ax.StateFramework.Pocos.State1Transition plain = new Simatic.Ax.StateFramework.Pocos.State1Transition();
+ Pocos.Simatic.Ax.StateFramework.State1Transition plain = new Pocos.Simatic.Ax.StateFramework.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(Simatic.Ax.StateFramework.Pocos.State1Transition plain)
+ protected async Task _OnlineToPlainNoacAsync(Pocos.Simatic.Ax.StateFramework.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(Simatic.Ax.StateFramework.Pocos.State1Transition plain)
+ public async Task> PlainToOnlineAsync(Pocos.Simatic.Ax.StateFramework.State1Transition plain)
{
await base._PlainToOnlineNoacAsync(plain);
return await this.WriteAsync();
@@ -67,7 +67,7 @@ public async Task> PlainToOnlineAsync(Simatic.Ax.Sta
[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(Simatic.Ax.StateFramework.Pocos.State1Transition plain)
+ public async Task _PlainToOnlineNoacAsync(Pocos.Simatic.Ax.StateFramework.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()
{
- Simatic.Ax.StateFramework.Pocos.State1Transition plain = new Simatic.Ax.StateFramework.Pocos.State1Transition();
+ Pocos.Simatic.Ax.StateFramework.State1Transition plain = new Pocos.Simatic.Ax.StateFramework.State1Transition();
await base.ShadowToPlainAsync(plain);
return plain;
}
- protected async Task ShadowToPlainAsync(Simatic.Ax.StateFramework.Pocos.State1Transition plain)
+ protected async Task ShadowToPlainAsync(Pocos.Simatic.Ax.StateFramework.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(Simatic.Ax.StateFramework.Pocos.State1Transition plain)
+ public async Task> PlainToShadowAsync(Pocos.Simatic.Ax.StateFramework.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(Simatic.Ax.StateFramework.Pocos.State1Transition plain, Simatic.Ax.StateFramework.Pocos.State1Transition latest = null)
+ public new async Task DetectsAnyChangeAsync(Pocos.Simatic.Ax.StateFramework.State1Transition plain, Pocos.Simatic.Ax.StateFramework.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 Simatic.Ax.StateFramework.Pocos.State1Transition CreateEmptyPoco()
+ public new Pocos.Simatic.Ax.StateFramework.State1Transition CreateEmptyPoco()
{
- return new Simatic.Ax.StateFramework.Pocos.State1Transition();
+ return new Pocos.Simatic.Ax.StateFramework.State1Transition();
}
}
}
@@ -166,9 +166,9 @@ public async virtual Task OnlineToPlain()
return await (dynamic)this.OnlineToPlainAsync();
}
- public async Task OnlineToPlainAsync()
+ public async Task OnlineToPlainAsync()
{
- Simatic.Ax.StateFramework.Pocos.AbstractState plain = new Simatic.Ax.StateFramework.Pocos.AbstractState();
+ Pocos.Simatic.Ax.StateFramework.AbstractState plain = new Pocos.Simatic.Ax.StateFramework.AbstractState();
await this.ReadAsync();
plain.StateID = StateID.LastValue;
plain.StateName = StateName.LastValue;
@@ -177,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()
{
- Simatic.Ax.StateFramework.Pocos.AbstractState plain = new Simatic.Ax.StateFramework.Pocos.AbstractState();
+ Pocos.Simatic.Ax.StateFramework.AbstractState plain = new Pocos.Simatic.Ax.StateFramework.AbstractState();
plain.StateID = StateID.LastValue;
plain.StateName = StateName.LastValue;
return plain;
@@ -187,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(Simatic.Ax.StateFramework.Pocos.AbstractState plain)
+ protected async Task _OnlineToPlainNoacAsync(Pocos.Simatic.Ax.StateFramework.AbstractState plain)
{
plain.StateID = StateID.LastValue;
plain.StateName = StateName.LastValue;
@@ -199,7 +199,7 @@ public async virtual Task PlainToOnline(T plain)
await this.PlainToOnlineAsync((dynamic)plain);
}
- public async Task> PlainToOnlineAsync(Simatic.Ax.StateFramework.Pocos.AbstractState plain)
+ public async Task> PlainToOnlineAsync(Pocos.Simatic.Ax.StateFramework.AbstractState plain)
{
#pragma warning disable CS0612
StateID.LethargicWrite(plain.StateID);
@@ -212,7 +212,7 @@ public async Task> PlainToOnlineAsync(Simatic.Ax.Sta
[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(Simatic.Ax.StateFramework.Pocos.AbstractState plain)
+ public async Task _PlainToOnlineNoacAsync(Pocos.Simatic.Ax.StateFramework.AbstractState plain)
{
#pragma warning disable CS0612
StateID.LethargicWrite(plain.StateID);
@@ -227,15 +227,15 @@ public async virtual Task ShadowToPlain()
return await (dynamic)this.ShadowToPlainAsync();
}
- public async Task ShadowToPlainAsync()
+ public async Task ShadowToPlainAsync()
{
- Simatic.Ax.StateFramework.Pocos.AbstractState plain = new Simatic.Ax.StateFramework.Pocos.AbstractState();
+ Pocos.Simatic.Ax.StateFramework.AbstractState plain = new Pocos.Simatic.Ax.StateFramework.AbstractState();
plain.StateID = StateID.Shadow;
plain.StateName = StateName.Shadow;
return plain;
}
- protected async Task ShadowToPlainAsync(Simatic.Ax.StateFramework.Pocos.AbstractState plain)
+ protected async Task ShadowToPlainAsync(Pocos.Simatic.Ax.StateFramework.AbstractState plain)
{
plain.StateID = StateID.Shadow;
plain.StateName = StateName.Shadow;
@@ -247,7 +247,7 @@ public async virtual Task PlainToShadow(T plain)
await this.PlainToShadowAsync((dynamic)plain);
}
- public async Task> PlainToShadowAsync(Simatic.Ax.StateFramework.Pocos.AbstractState plain)
+ public async Task> PlainToShadowAsync(Pocos.Simatic.Ax.StateFramework.AbstractState plain)
{
StateID.Shadow = plain.StateID;
StateName.Shadow = plain.StateName;
@@ -264,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(Simatic.Ax.StateFramework.Pocos.AbstractState plain, Simatic.Ax.StateFramework.Pocos.AbstractState latest = null)
+ public async Task DetectsAnyChangeAsync(Pocos.Simatic.Ax.StateFramework.AbstractState plain, Pocos.Simatic.Ax.StateFramework.AbstractState latest = null)
{
if (latest == null)
latest = await this._OnlineToPlainNoacAsync();
@@ -285,9 +285,9 @@ public void Poll()
this.RetrievePrimitives().ToList().ForEach(x => x.Poll());
}
- public Simatic.Ax.StateFramework.Pocos.AbstractState CreateEmptyPoco()
+ public Pocos.Simatic.Ax.StateFramework.AbstractState CreateEmptyPoco()
{
- return new Simatic.Ax.StateFramework.Pocos.AbstractState();
+ return new Pocos.Simatic.Ax.StateFramework.AbstractState();
}
private IList Children { get; } = new List();
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 f8030c33..55bb0214 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()
{
- Generics.Pocos.Extender plain = new Generics.Pocos.Extender();
+ Pocos.Generics.Extender plain = new Pocos.Generics.Extender();
await this.ReadAsync();
return plain;
}
[Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- public async Task _OnlineToPlainNoacAsync()
+ public async Task _OnlineToPlainNoacAsync()
{
- Generics.Pocos.Extender plain = new Generics.Pocos.Extender();
+ Pocos.Generics.Extender plain = new Pocos.Generics.Extender();
return plain;
}
[Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- protected async Task _OnlineToPlainNoacAsync(Generics.Pocos.Extender plain)
+ protected async Task _OnlineToPlainNoacAsync(Pocos.Generics.Extender plain)
{
return plain;
}
@@ -56,14 +56,14 @@ public async virtual Task PlainToOnline(T plain)
await this.PlainToOnlineAsync((dynamic)plain);
}
- public async Task> PlainToOnlineAsync(Generics.Pocos.Extender plain)
+ public async Task> PlainToOnlineAsync(Pocos.Generics.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(Generics.Pocos.Extender plain)
+ public async Task _PlainToOnlineNoacAsync(Pocos.Generics.Extender plain)
{
}
@@ -72,13 +72,13 @@ public async virtual Task ShadowToPlain()
return await (dynamic)this.ShadowToPlainAsync();
}
- public async Task ShadowToPlainAsync()
+ public async Task ShadowToPlainAsync()
{
- Generics.Pocos.Extender plain = new Generics.Pocos.Extender();
+ Pocos.Generics.Extender plain = new Pocos.Generics.Extender();
return plain;
}
- protected async Task ShadowToPlainAsync(Generics.Pocos.Extender plain)
+ protected async Task ShadowToPlainAsync(Pocos.Generics.Extender plain)
{
return plain;
}
@@ -88,7 +88,7 @@ public async virtual Task PlainToShadow(T plain)
await this.PlainToShadowAsync((dynamic)plain);
}
- public async Task> PlainToShadowAsync(Generics.Pocos.Extender plain)
+ public async Task> PlainToShadowAsync(Pocos.Generics.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(Generics.Pocos.Extender plain, Generics.Pocos.Extender latest = null)
+ public async Task DetectsAnyChangeAsync(Pocos.Generics.Extender plain, Pocos.Generics.Extender latest = null)
{
if (latest == null)
latest = await this._OnlineToPlainNoacAsync();
@@ -120,9 +120,9 @@ public void Poll()
this.RetrievePrimitives().ToList().ForEach(x => x.Poll());
}
- public Generics.Pocos.Extender CreateEmptyPoco()
+ public Pocos.Generics.Extender CreateEmptyPoco()
{
- return new Generics.Pocos.Extender();
+ return new Pocos.Generics.Extender();
}
private IList Children { get; } = new List();
@@ -222,9 +222,9 @@ public async override Task OnlineToPlain()
return await (dynamic)this.OnlineToPlainAsync();
}
- public new async Task OnlineToPlainAsync()
+ public new async Task OnlineToPlainAsync()
{
- Generics.Pocos.Extendee plain = new Generics.Pocos.Extendee();
+ Pocos.Generics.Extendee plain = new Pocos.Generics.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()
{
- Generics.Pocos.Extendee plain = new Generics.Pocos.Extendee();
+ Pocos.Generics.Extendee plain = new Pocos.Generics.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(Generics.Pocos.Extendee plain)
+ protected async Task _OnlineToPlainNoacAsync(Pocos.Generics.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(Generics.Pocos.Extendee plain)
+ public async Task> PlainToOnlineAsync(Pocos.Generics.Extendee plain)
{
await base._PlainToOnlineNoacAsync(plain);
#pragma warning disable CS0612
@@ -290,7 +290,7 @@ public async Task> PlainToOnlineAsync(Generics.Pocos
[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(Generics.Pocos.Extendee plain)
+ public async Task _PlainToOnlineNoacAsync(Pocos.Generics.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()
{
- Generics.Pocos.Extendee plain = new Generics.Pocos.Extendee();
+ Pocos.Generics.Extendee plain = new Pocos.Generics.Extendee();
await base.ShadowToPlainAsync(plain);
plain.SomeType = await SomeType.ShadowToPlainAsync();
plain.SomeTypeAsPoco = await SomeTypeAsPoco.ShadowToPlainAsync();
return plain;
}
- protected async Task ShadowToPlainAsync(Generics.Pocos.Extendee plain)
+ protected async Task ShadowToPlainAsync(Pocos.Generics.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(Generics.Pocos.Extendee plain)
+ public async Task> PlainToShadowAsync(Pocos.Generics.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(Generics.Pocos.Extendee plain, Generics.Pocos.Extendee latest = null)
+ public new async Task DetectsAnyChangeAsync(Pocos.Generics.Extendee plain, Pocos.Generics.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 Generics.Pocos.Extendee CreateEmptyPoco()
+ public new Pocos.Generics.Extendee CreateEmptyPoco()
{
- return new Generics.Pocos.Extendee();
+ return new Pocos.Generics.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()
{
- Generics.Pocos.Extendee2 plain = new Generics.Pocos.Extendee2();
+ Pocos.Generics.Extendee2 plain = new Pocos.Generics.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()
{
- Generics.Pocos.Extendee2 plain = new Generics.Pocos.Extendee2();
+ Pocos.Generics.Extendee2 plain = new Pocos.Generics.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(Generics.Pocos.Extendee2 plain)
+ protected async Task _OnlineToPlainNoacAsync(Pocos.Generics.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(Generics.Pocos.Extendee2 plain)
+ public async Task> PlainToOnlineAsync(Pocos.Generics.Extendee2 plain)
{
await base._PlainToOnlineNoacAsync(plain);
#pragma warning disable CS0612
@@ -450,7 +450,7 @@ public async Task> PlainToOnlineAsync(Generics.Pocos
[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(Generics.Pocos.Extendee2 plain)
+ public async Task _PlainToOnlineNoacAsync(Pocos.Generics.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()
{
- Generics.Pocos.Extendee2 plain = new Generics.Pocos.Extendee2();
+ Pocos.Generics.Extendee2 plain = new Pocos.Generics.Extendee2();
await base.ShadowToPlainAsync(plain);
plain.SomeType = await SomeType.ShadowToPlainAsync();
return plain;
}
- protected async Task ShadowToPlainAsync(Generics.Pocos.Extendee2 plain)
+ protected async Task ShadowToPlainAsync(Pocos.Generics.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(Generics.Pocos.Extendee2 plain)
+ public async Task> PlainToShadowAsync(Pocos.Generics.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(Generics.Pocos.Extendee2 plain, Generics.Pocos.Extendee2 latest = null)
+ public new async Task DetectsAnyChangeAsync(Pocos.Generics.Extendee2 plain, Pocos.Generics.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 Generics.Pocos.Extendee2 CreateEmptyPoco()
+ public new Pocos.Generics.Extendee2 CreateEmptyPoco()
{
- return new Generics.Pocos.Extendee2();
+ return new Pocos.Generics.Extendee2();
}
}
@@ -549,24 +549,24 @@ public async virtual Task OnlineToPlain()
return await (dynamic)this.OnlineToPlainAsync();
}
- public async Task OnlineToPlainAsync()
+ public async Task OnlineToPlainAsync()
{
- Generics.Pocos.SomeType plain = new Generics.Pocos.SomeType();
+ Pocos.Generics.SomeType plain = new Pocos.Generics.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()
{
- Generics.Pocos.SomeType plain = new Generics.Pocos.SomeType();
+ Pocos.Generics.SomeType plain = new Pocos.Generics.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(Generics.Pocos.SomeType plain)
+ protected async Task _OnlineToPlainNoacAsync(Pocos.Generics.SomeType plain)
{
return plain;
}
@@ -576,14 +576,14 @@ public async virtual Task PlainToOnline(T plain)
await this.PlainToOnlineAsync((dynamic)plain);
}
- public async Task> PlainToOnlineAsync(Generics.Pocos.SomeType plain)
+ public async Task> PlainToOnlineAsync(Pocos.Generics.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(Generics.Pocos.SomeType plain)
+ public async Task _PlainToOnlineNoacAsync(Pocos.Generics.SomeType plain)
{
}
@@ -592,13 +592,13 @@ public async virtual Task ShadowToPlain()
return await (dynamic)this.ShadowToPlainAsync();
}
- public async Task ShadowToPlainAsync()
+ public async Task ShadowToPlainAsync()
{
- Generics.Pocos.SomeType plain = new Generics.Pocos.SomeType();
+ Pocos.Generics.SomeType plain = new Pocos.Generics.SomeType();
return plain;
}
- protected async Task ShadowToPlainAsync(Generics.Pocos.SomeType plain)
+ protected async Task ShadowToPlainAsync(Pocos.Generics.SomeType plain)
{
return plain;
}
@@ -608,7 +608,7 @@ public async virtual Task PlainToShadow(T plain)
await this.PlainToShadowAsync((dynamic)plain);
}
- public async Task> PlainToShadowAsync(Generics.Pocos.SomeType plain)
+ public async Task> PlainToShadowAsync(Pocos.Generics.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(Generics.Pocos.SomeType plain, Generics.Pocos.SomeType latest = null)
+ public async Task DetectsAnyChangeAsync(Pocos.Generics.SomeType plain, Pocos.Generics.SomeType latest = null)
{
if (latest == null)
latest = await this._OnlineToPlainNoacAsync();
@@ -640,9 +640,9 @@ public void Poll()
this.RetrievePrimitives().ToList().ForEach(x => x.Poll());
}
- public Generics.Pocos.SomeType CreateEmptyPoco()
+ public Pocos.Generics.SomeType CreateEmptyPoco()
{
- return new Generics.Pocos.SomeType();
+ return new Pocos.Generics.SomeType();
}
private IList Children { get; } = new List();
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 310d09c5..76e48ab7 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()
{
- ClassWithComplexTypesNamespace.Pocos.ClassWithComplexTypes plain = new ClassWithComplexTypesNamespace.Pocos.ClassWithComplexTypes();
+ Pocos.ClassWithComplexTypesNamespace.ClassWithComplexTypes plain = new Pocos.ClassWithComplexTypesNamespace.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()
{
- ClassWithComplexTypesNamespace.Pocos.ClassWithComplexTypes plain = new ClassWithComplexTypesNamespace.Pocos.ClassWithComplexTypes();
+ Pocos.ClassWithComplexTypesNamespace.ClassWithComplexTypes plain = new Pocos.ClassWithComplexTypesNamespace.ClassWithComplexTypes();
#pragma warning disable CS0612
plain.myComplexType = await myComplexType._OnlineToPlainNoacAsync();
#pragma warning restore CS0612
@@ -55,7 +55,7 @@ public async virtual Task