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 20e6a707..a5b1654b 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}" : $"Pocos.{declaration.ContainingNamespace.FullyQualifiedName}.{declaration.Name}";
+ return declaration.ContainingNamespace.FullyQualifiedName == "$GLOBAL" ? $"global::Pocos.{declaration.Name}" : $"global::Pocos.{declaration.ContainingNamespace.FullyQualifiedName}.{declaration.Name}";
}
}
\ No newline at end of file
diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/array_declaration.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/array_declaration.g.cs
index d306e637..00655324 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()
{
- Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain = new Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class();
+ global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain = new global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class();
await this.ReadAsync();
plain.primitive = primitive.Select(p => p.LastValue).ToArray();
#pragma warning disable CS0612
@@ -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()
{
- Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain = new Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class();
+ global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain = new global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class();
plain.primitive = primitive.Select(p => p.LastValue).ToArray();
#pragma warning disable CS0612
plain.complex = complex.Select(async p => await p._OnlineToPlainNoacAsync()).Select(p => p.Result).ToArray();
@@ -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(Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain)
+ protected async Task _OnlineToPlainNoacAsync(global::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(Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain)
+ public async Task> PlainToOnlineAsync(global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain)
{
var _primitive_i_FE8484DAB3 = 0;
#pragma warning disable CS0612
@@ -90,7 +90,7 @@ public async Task> PlainToOnlineAsync(Pocos.ArrayDec
[Obsolete("This method should not be used if you indent to access the controllers data. Use `PlainToOnline` instead.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- public async Task _PlainToOnlineNoacAsync(Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain)
+ public async Task _PlainToOnlineNoacAsync(global::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()
{
- Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain = new Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class();
+ global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain = new global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class();
plain.primitive = primitive.Select(p => p.Shadow).ToArray();
plain.complex = complex.Select(async p => await p.ShadowToPlainAsync()).Select(p => p.Result).ToArray();
return plain;
}
- protected async Task ShadowToPlainAsync(Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain)
+ protected async Task ShadowToPlainAsync(global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain)
{
plain.primitive = primitive.Select(p => p.Shadow).ToArray();
plain.complex = complex.Select(async p => await p.ShadowToPlainAsync()).Select(p => p.Result).ToArray();
@@ -127,7 +127,7 @@ public async virtual Task PlainToShadow(T plain)
await this.PlainToShadowAsync((dynamic)plain);
}
- public async Task> PlainToShadowAsync(Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain)
+ public async Task> PlainToShadowAsync(global::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(Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain, Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class latest = null)
+ public async Task DetectsAnyChangeAsync(global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain, global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class latest = null)
{
if (latest == null)
latest = await this._OnlineToPlainNoacAsync();
@@ -175,9 +175,9 @@ public void Poll()
this.RetrievePrimitives().ToList().ForEach(x => x.Poll());
}
- public Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class CreateEmptyPoco()
+ public global::Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class CreateEmptyPoco()
{
- return new Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class();
+ return new global::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()
{
- Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain = new Pocos.ArrayDeclarationSimpleNamespace.some_complex_type();
+ global::Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain = new global::Pocos.ArrayDeclarationSimpleNamespace.some_complex_type();
await this.ReadAsync();
return plain;
}
[Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- public async Task _OnlineToPlainNoacAsync()
+ public async Task _OnlineToPlainNoacAsync()
{
- Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain = new Pocos.ArrayDeclarationSimpleNamespace.some_complex_type();
+ global::Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain = new global::Pocos.ArrayDeclarationSimpleNamespace.some_complex_type();
return plain;
}
[Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- protected async Task _OnlineToPlainNoacAsync(Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain)
+ protected async Task _OnlineToPlainNoacAsync(global::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(Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain)
+ public async Task> PlainToOnlineAsync(global::Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain)
{
return await this.WriteAsync();
}
[Obsolete("This method should not be used if you indent to access the controllers data. Use `PlainToOnline` instead.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- public async Task _PlainToOnlineNoacAsync(Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain)
+ public async Task _PlainToOnlineNoacAsync(global::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()
{
- Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain = new Pocos.ArrayDeclarationSimpleNamespace.some_complex_type();
+ global::Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain = new global::Pocos.ArrayDeclarationSimpleNamespace.some_complex_type();
return plain;
}
- protected async Task ShadowToPlainAsync(Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain)
+ protected async Task ShadowToPlainAsync(global::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(Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain)
+ public async Task> PlainToShadowAsync(global::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(Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain, Pocos.ArrayDeclarationSimpleNamespace.some_complex_type latest = null)
+ public async Task DetectsAnyChangeAsync(global::Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain, global::Pocos.ArrayDeclarationSimpleNamespace.some_complex_type latest = null)
{
if (latest == null)
latest = await this._OnlineToPlainNoacAsync();
@@ -369,9 +369,9 @@ public void Poll()
this.RetrievePrimitives().ToList().ForEach(x => x.Poll());
}
- public Pocos.ArrayDeclarationSimpleNamespace.some_complex_type CreateEmptyPoco()
+ public global::Pocos.ArrayDeclarationSimpleNamespace.some_complex_type CreateEmptyPoco()
{
- return new Pocos.ArrayDeclarationSimpleNamespace.some_complex_type();
+ return new global::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 e845f2dd..d6a63b53 100644
--- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_extended_by_known_type.g.cs
+++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_extended_by_known_type.g.cs
@@ -23,9 +23,9 @@ public async override Task OnlineToPlain()
return await (dynamic)this.OnlineToPlainAsync();
}
- public new async Task OnlineToPlainAsync()
+ public new async Task OnlineToPlainAsync()
{
- Pocos.Simatic.Ax.StateFramework.State1Transition plain = new Pocos.Simatic.Ax.StateFramework.State1Transition();
+ global::Pocos.Simatic.Ax.StateFramework.State1Transition plain = new global::Pocos.Simatic.Ax.StateFramework.State1Transition();
await this.ReadAsync();
#pragma warning disable CS0612
await base._OnlineToPlainNoacAsync(plain);
@@ -35,9 +35,9 @@ public async override Task OnlineToPlain()
[Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- public new async Task _OnlineToPlainNoacAsync()
+ public new async Task _OnlineToPlainNoacAsync()
{
- Pocos.Simatic.Ax.StateFramework.State1Transition plain = new Pocos.Simatic.Ax.StateFramework.State1Transition();
+ global::Pocos.Simatic.Ax.StateFramework.State1Transition plain = new global::Pocos.Simatic.Ax.StateFramework.State1Transition();
#pragma warning disable CS0612
await base._OnlineToPlainNoacAsync(plain);
#pragma warning restore CS0612
@@ -46,7 +46,7 @@ public async override Task OnlineToPlain()
[Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- protected async Task _OnlineToPlainNoacAsync(Pocos.Simatic.Ax.StateFramework.State1Transition plain)
+ protected async Task _OnlineToPlainNoacAsync(global::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(Pocos.Simatic.Ax.StateFramework.State1Transition plain)
+ public async Task> PlainToOnlineAsync(global::Pocos.Simatic.Ax.StateFramework.State1Transition plain)
{
await base._PlainToOnlineNoacAsync(plain);
return await this.WriteAsync();
@@ -67,7 +67,7 @@ public async Task> PlainToOnlineAsync(Pocos.Simatic.
[Obsolete("This method should not be used if you indent to access the controllers data. Use `PlainToOnline` instead.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- public async Task _PlainToOnlineNoacAsync(Pocos.Simatic.Ax.StateFramework.State1Transition plain)
+ public async Task _PlainToOnlineNoacAsync(global::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()
{
- Pocos.Simatic.Ax.StateFramework.State1Transition plain = new Pocos.Simatic.Ax.StateFramework.State1Transition();
+ global::Pocos.Simatic.Ax.StateFramework.State1Transition plain = new global::Pocos.Simatic.Ax.StateFramework.State1Transition();
await base.ShadowToPlainAsync(plain);
return plain;
}
- protected async Task ShadowToPlainAsync(Pocos.Simatic.Ax.StateFramework.State1Transition plain)
+ protected async Task ShadowToPlainAsync(global::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(Pocos.Simatic.Ax.StateFramework.State1Transition plain)
+ public async Task> PlainToShadowAsync(global::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(Pocos.Simatic.Ax.StateFramework.State1Transition plain, Pocos.Simatic.Ax.StateFramework.State1Transition latest = null)
+ public new async Task DetectsAnyChangeAsync(global::Pocos.Simatic.Ax.StateFramework.State1Transition plain, global::Pocos.Simatic.Ax.StateFramework.State1Transition latest = null)
{
if (latest == null)
latest = await this._OnlineToPlainNoacAsync();
@@ -130,9 +130,9 @@ public async override Task AnyChangeAsync(T plain)
this.RetrievePrimitives().ToList().ForEach(x => x.Poll());
}
- public new Pocos.Simatic.Ax.StateFramework.State1Transition CreateEmptyPoco()
+ public new global::Pocos.Simatic.Ax.StateFramework.State1Transition CreateEmptyPoco()
{
- return new Pocos.Simatic.Ax.StateFramework.State1Transition();
+ return new global::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()
{
- Pocos.Simatic.Ax.StateFramework.AbstractState plain = new Pocos.Simatic.Ax.StateFramework.AbstractState();
+ global::Pocos.Simatic.Ax.StateFramework.AbstractState plain = new global::Pocos.Simatic.Ax.StateFramework.AbstractState();
await this.ReadAsync();
plain.StateID = StateID.LastValue;
plain.StateName = StateName.LastValue;
@@ -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()
{
- Pocos.Simatic.Ax.StateFramework.AbstractState plain = new Pocos.Simatic.Ax.StateFramework.AbstractState();
+ global::Pocos.Simatic.Ax.StateFramework.AbstractState plain = new global::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(Pocos.Simatic.Ax.StateFramework.AbstractState plain)
+ protected async Task _OnlineToPlainNoacAsync(global::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(Pocos.Simatic.Ax.StateFramework.AbstractState plain)
+ public async Task> PlainToOnlineAsync(global::Pocos.Simatic.Ax.StateFramework.AbstractState plain)
{
#pragma warning disable CS0612
StateID.LethargicWrite(plain.StateID);
@@ -212,7 +212,7 @@ public async Task> PlainToOnlineAsync(Pocos.Simatic.
[Obsolete("This method should not be used if you indent to access the controllers data. Use `PlainToOnline` instead.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- public async Task _PlainToOnlineNoacAsync(Pocos.Simatic.Ax.StateFramework.AbstractState plain)
+ public async Task _PlainToOnlineNoacAsync(global::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()
{
- Pocos.Simatic.Ax.StateFramework.AbstractState plain = new Pocos.Simatic.Ax.StateFramework.AbstractState();
+ global::Pocos.Simatic.Ax.StateFramework.AbstractState plain = new global::Pocos.Simatic.Ax.StateFramework.AbstractState();
plain.StateID = StateID.Shadow;
plain.StateName = StateName.Shadow;
return plain;
}
- protected async Task ShadowToPlainAsync(Pocos.Simatic.Ax.StateFramework.AbstractState plain)
+ protected async Task ShadowToPlainAsync(global::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(Pocos.Simatic.Ax.StateFramework.AbstractState plain)
+ public async Task> PlainToShadowAsync(global::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(Pocos.Simatic.Ax.StateFramework.AbstractState plain, Pocos.Simatic.Ax.StateFramework.AbstractState latest = null)
+ public async Task DetectsAnyChangeAsync(global::Pocos.Simatic.Ax.StateFramework.AbstractState plain, global::Pocos.Simatic.Ax.StateFramework.AbstractState latest = null)
{
if (latest == null)
latest = await this._OnlineToPlainNoacAsync();
@@ -285,9 +285,9 @@ public void Poll()
this.RetrievePrimitives().ToList().ForEach(x => x.Poll());
}
- public Pocos.Simatic.Ax.StateFramework.AbstractState CreateEmptyPoco()
+ public global::Pocos.Simatic.Ax.StateFramework.AbstractState CreateEmptyPoco()
{
- return new Pocos.Simatic.Ax.StateFramework.AbstractState();
+ return new global::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 55bb0214..ec0ba7be 100644
--- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_generic_extension.g.cs
+++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_generic_extension.g.cs
@@ -29,24 +29,24 @@ public async virtual Task OnlineToPlain()
return await (dynamic)this.OnlineToPlainAsync();
}
- public async Task OnlineToPlainAsync()
+ public async Task OnlineToPlainAsync()
{
- Pocos.Generics.Extender plain = new Pocos.Generics.Extender();
+ global::Pocos.Generics.Extender plain = new global::Pocos.Generics.Extender();
await this.ReadAsync();
return plain;
}
[Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- public async Task _OnlineToPlainNoacAsync()
+ public async Task _OnlineToPlainNoacAsync()
{
- Pocos.Generics.Extender plain = new Pocos.Generics.Extender();
+ global::Pocos.Generics.Extender plain = new global::Pocos.Generics.Extender();
return plain;
}
[Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- protected async Task _OnlineToPlainNoacAsync(Pocos.Generics.Extender plain)
+ protected async Task _OnlineToPlainNoacAsync(global::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(Pocos.Generics.Extender plain)
+ public async Task> PlainToOnlineAsync(global::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(Pocos.Generics.Extender plain)
+ public async Task _PlainToOnlineNoacAsync(global::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()
{
- Pocos.Generics.Extender plain = new Pocos.Generics.Extender();
+ global::Pocos.Generics.Extender plain = new global::Pocos.Generics.Extender();
return plain;
}
- protected async Task ShadowToPlainAsync(Pocos.Generics.Extender plain)
+ protected async Task ShadowToPlainAsync(global::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(Pocos.Generics.Extender plain)
+ public async Task> PlainToShadowAsync(global::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(Pocos.Generics.Extender plain, Pocos.Generics.Extender latest = null)
+ public async Task DetectsAnyChangeAsync(global::Pocos.Generics.Extender plain, global::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 Pocos.Generics.Extender CreateEmptyPoco()
+ public global::Pocos.Generics.Extender CreateEmptyPoco()
{
- return new Pocos.Generics.Extender();
+ return new global::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()
{
- Pocos.Generics.Extendee plain = new Pocos.Generics.Extendee();
+ global::Pocos.Generics.Extendee plain = new global::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()
{
- Pocos.Generics.Extendee plain = new Pocos.Generics.Extendee();
+ global::Pocos.Generics.Extendee plain = new global::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(Pocos.Generics.Extendee plain)
+ protected async Task _OnlineToPlainNoacAsync(global::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(Pocos.Generics.Extendee plain)
+ public async Task> PlainToOnlineAsync(global::Pocos.Generics.Extendee plain)
{
await base._PlainToOnlineNoacAsync(plain);
#pragma warning disable CS0612
@@ -290,7 +290,7 @@ public async Task> PlainToOnlineAsync(Pocos.Generics
[Obsolete("This method should not be used if you indent to access the controllers data. Use `PlainToOnline` instead.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- public async Task _PlainToOnlineNoacAsync(Pocos.Generics.Extendee plain)
+ public async Task _PlainToOnlineNoacAsync(global::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()
{
- Pocos.Generics.Extendee plain = new Pocos.Generics.Extendee();
+ global::Pocos.Generics.Extendee plain = new global::Pocos.Generics.Extendee();
await base.ShadowToPlainAsync(plain);
plain.SomeType = await SomeType.ShadowToPlainAsync();
plain.SomeTypeAsPoco = await SomeTypeAsPoco.ShadowToPlainAsync();
return plain;
}
- protected async Task ShadowToPlainAsync(Pocos.Generics.Extendee plain)
+ protected async Task ShadowToPlainAsync(global::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(Pocos.Generics.Extendee plain)
+ public async Task> PlainToShadowAsync(global::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(Pocos.Generics.Extendee plain, Pocos.Generics.Extendee latest = null)
+ public new async Task DetectsAnyChangeAsync(global::Pocos.Generics.Extendee plain, global::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 Pocos.Generics.Extendee CreateEmptyPoco()
+ public new global::Pocos.Generics.Extendee CreateEmptyPoco()
{
- return new Pocos.Generics.Extendee();
+ return new global::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()
{
- Pocos.Generics.Extendee2 plain = new Pocos.Generics.Extendee2();
+ global::Pocos.Generics.Extendee2 plain = new global::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()
{
- Pocos.Generics.Extendee2 plain = new Pocos.Generics.Extendee2();
+ global::Pocos.Generics.Extendee2 plain = new global::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(Pocos.Generics.Extendee2 plain)
+ protected async Task _OnlineToPlainNoacAsync(global::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(Pocos.Generics.Extendee2 plain)
+ public async Task> PlainToOnlineAsync(global::Pocos.Generics.Extendee2 plain)
{
await base._PlainToOnlineNoacAsync(plain);
#pragma warning disable CS0612
@@ -450,7 +450,7 @@ public async Task> PlainToOnlineAsync(Pocos.Generics
[Obsolete("This method should not be used if you indent to access the controllers data. Use `PlainToOnline` instead.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- public async Task _PlainToOnlineNoacAsync(Pocos.Generics.Extendee2 plain)
+ public async Task _PlainToOnlineNoacAsync(global::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()
{
- Pocos.Generics.Extendee2 plain = new Pocos.Generics.Extendee2();
+ global::Pocos.Generics.Extendee2 plain = new global::Pocos.Generics.Extendee2();
await base.ShadowToPlainAsync(plain);
plain.SomeType = await SomeType.ShadowToPlainAsync();
return plain;
}
- protected async Task ShadowToPlainAsync(Pocos.Generics.Extendee2 plain)
+ protected async Task ShadowToPlainAsync(global::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(Pocos.Generics.Extendee2 plain)
+ public async Task> PlainToShadowAsync(global::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(Pocos.Generics.Extendee2 plain, Pocos.Generics.Extendee2 latest = null)
+ public new async Task DetectsAnyChangeAsync(global::Pocos.Generics.Extendee2 plain, global::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 Pocos.Generics.Extendee2 CreateEmptyPoco()
+ public new global::Pocos.Generics.Extendee2 CreateEmptyPoco()
{
- return new Pocos.Generics.Extendee2();
+ return new global::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()
{
- Pocos.Generics.SomeType plain = new Pocos.Generics.SomeType();
+ global::Pocos.Generics.SomeType plain = new global::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()
{
- Pocos.Generics.SomeType plain = new Pocos.Generics.SomeType();
+ global::Pocos.Generics.SomeType plain = new global::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(Pocos.Generics.SomeType plain)
+ protected async Task _OnlineToPlainNoacAsync(global::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(Pocos.Generics.SomeType plain)
+ public async Task> PlainToOnlineAsync(global::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(Pocos.Generics.SomeType plain)
+ public async Task _PlainToOnlineNoacAsync(global::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()
{
- Pocos.Generics.SomeType plain = new Pocos.Generics.SomeType();
+ global::Pocos.Generics.SomeType plain = new global::Pocos.Generics.SomeType();
return plain;
}
- protected async Task ShadowToPlainAsync(Pocos.Generics.SomeType plain)
+ protected async Task ShadowToPlainAsync(global::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(Pocos.Generics.SomeType plain)
+ public async Task> PlainToShadowAsync(global::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(Pocos.Generics.SomeType plain, Pocos.Generics.SomeType latest = null)
+ public async Task DetectsAnyChangeAsync(global::Pocos.Generics.SomeType plain, global::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 Pocos.Generics.SomeType CreateEmptyPoco()
+ public global::Pocos.Generics.SomeType CreateEmptyPoco()
{
- return new Pocos.Generics.SomeType();
+ return new global::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 76e48ab7..94925519 100644
--- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_with_complex_members.g.cs
+++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_with_complex_members.g.cs
@@ -32,9 +32,9 @@ public async virtual Task OnlineToPlain()
return await (dynamic)this.OnlineToPlainAsync();
}
- public async Task OnlineToPlainAsync()
+ public async Task OnlineToPlainAsync()
{
- Pocos.ClassWithComplexTypesNamespace.ClassWithComplexTypes plain = new Pocos.ClassWithComplexTypesNamespace.ClassWithComplexTypes();
+ global::Pocos.ClassWithComplexTypesNamespace.ClassWithComplexTypes plain = new global::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()
{
- Pocos.ClassWithComplexTypesNamespace.ClassWithComplexTypes plain = new Pocos.ClassWithComplexTypesNamespace.ClassWithComplexTypes();
+ global::Pocos.ClassWithComplexTypesNamespace.ClassWithComplexTypes plain = new global::Pocos.ClassWithComplexTypesNamespace.ClassWithComplexTypes();
#pragma warning disable CS0612
plain.myComplexType = await myComplexType._OnlineToPlainNoacAsync();
#pragma warning restore CS0612
@@ -55,7 +55,7 @@ public async virtual Task