Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NEW-FEATURE] Poco types should be rather placed into onlinenamespace.Poco instead of Poco.onlinenamespace #342

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update namespace references to use global:: prefix
Updated namespace references for Pocos classes across multiple files to use the global:: prefix. This change affects methods such as OnlineToPlainAsync, _OnlineToPlainNoacAsync, PlainToOnlineAsync, _PlainToOnlineNoacAsync, ShadowToPlainAsync, PlainToShadowAsync, DetectsAnyChangeAsync, and CreateEmptyPoco. The updates ensure the correct global namespace is used, avoiding potential conflicts and improving code maintainability.
  • Loading branch information
PTKu committed Nov 27, 2024
commit e62d74f159816af6e989ef5c908650471e1ddc7d
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public async virtual Task<T> OnlineToPlain<T>()
return await (dynamic)this.OnlineToPlainAsync();
}

public async Task<Pocos.AbstractMotor> OnlineToPlainAsync()
public async Task<global::Pocos.AbstractMotor> OnlineToPlainAsync()
{
Pocos.AbstractMotor plain = new Pocos.AbstractMotor();
global::Pocos.AbstractMotor plain = new global::Pocos.AbstractMotor();
await this.ReadAsync<IgnoreOnPocoOperation>();
plain.Run = Run.LastValue;
plain.ReverseDirection = ReverseDirection.LastValue;
Expand All @@ -44,17 +44,17 @@ public async virtual Task<T> OnlineToPlain<T>()

[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<Pocos.AbstractMotor> _OnlineToPlainNoacAsync()
public async Task<global::Pocos.AbstractMotor> _OnlineToPlainNoacAsync()
{
Pocos.AbstractMotor plain = new Pocos.AbstractMotor();
global::Pocos.AbstractMotor plain = new global::Pocos.AbstractMotor();
plain.Run = Run.LastValue;
plain.ReverseDirection = ReverseDirection.LastValue;
return plain;
}

[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<Pocos.AbstractMotor> _OnlineToPlainNoacAsync(Pocos.AbstractMotor plain)
protected async Task<global::Pocos.AbstractMotor> _OnlineToPlainNoacAsync(global::Pocos.AbstractMotor plain)
{
plain.Run = Run.LastValue;
plain.ReverseDirection = ReverseDirection.LastValue;
Expand All @@ -66,7 +66,7 @@ public async virtual Task PlainToOnline<T>(T plain)
await this.PlainToOnlineAsync((dynamic)plain);
}

public async Task<IEnumerable<ITwinPrimitive>> PlainToOnlineAsync(Pocos.AbstractMotor plain)
public async Task<IEnumerable<ITwinPrimitive>> PlainToOnlineAsync(global::Pocos.AbstractMotor plain)
{
#pragma warning disable CS0612
Run.LethargicWrite(plain.Run);
Expand All @@ -79,7 +79,7 @@ public async Task<IEnumerable<ITwinPrimitive>> PlainToOnlineAsync(Pocos.Abstract

[Obsolete("This method should not be used if you indent to access the controllers data. Use `PlainToOnline` instead.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public async Task _PlainToOnlineNoacAsync(Pocos.AbstractMotor plain)
public async Task _PlainToOnlineNoacAsync(global::Pocos.AbstractMotor plain)
{
#pragma warning disable CS0612
Run.LethargicWrite(plain.Run);
Expand All @@ -94,15 +94,15 @@ public async virtual Task<T> ShadowToPlain<T>()
return await (dynamic)this.ShadowToPlainAsync();
}

public async Task<Pocos.AbstractMotor> ShadowToPlainAsync()
public async Task<global::Pocos.AbstractMotor> ShadowToPlainAsync()
{
Pocos.AbstractMotor plain = new Pocos.AbstractMotor();
global::Pocos.AbstractMotor plain = new global::Pocos.AbstractMotor();
plain.Run = Run.Shadow;
plain.ReverseDirection = ReverseDirection.Shadow;
return plain;
}

protected async Task<Pocos.AbstractMotor> ShadowToPlainAsync(Pocos.AbstractMotor plain)
protected async Task<global::Pocos.AbstractMotor> ShadowToPlainAsync(global::Pocos.AbstractMotor plain)
{
plain.Run = Run.Shadow;
plain.ReverseDirection = ReverseDirection.Shadow;
Expand All @@ -114,7 +114,7 @@ public async virtual Task PlainToShadow<T>(T plain)
await this.PlainToShadowAsync((dynamic)plain);
}

public async Task<IEnumerable<ITwinPrimitive>> PlainToShadowAsync(Pocos.AbstractMotor plain)
public async Task<IEnumerable<ITwinPrimitive>> PlainToShadowAsync(global::Pocos.AbstractMotor plain)
{
Run.Shadow = plain.Run;
ReverseDirection.Shadow = plain.ReverseDirection;
Expand All @@ -131,7 +131,7 @@ public async virtual Task<bool> AnyChangeAsync<T>(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.
///</summary>
public async Task<bool> DetectsAnyChangeAsync(Pocos.AbstractMotor plain, Pocos.AbstractMotor latest = null)
public async Task<bool> DetectsAnyChangeAsync(global::Pocos.AbstractMotor plain, global::Pocos.AbstractMotor latest = null)
{
if (latest == null)
latest = await this._OnlineToPlainNoacAsync();
Expand All @@ -152,9 +152,9 @@ public void Poll()
this.RetrievePrimitives().ToList().ForEach(x => x.Poll());
}

public Pocos.AbstractMotor CreateEmptyPoco()
public global::Pocos.AbstractMotor CreateEmptyPoco()
{
return new Pocos.AbstractMotor();
return new global::Pocos.AbstractMotor();
}

private IList<AXSharp.Connector.ITwinObject> Children { get; } = new List<AXSharp.Connector.ITwinObject>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ public async virtual Task<T> OnlineToPlain<T>()
return await (dynamic)this.OnlineToPlainAsync();
}

public async Task<Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class> OnlineToPlainAsync()
public async Task<ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class> OnlineToPlainAsync()
{
Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain = new Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class();
ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain = new ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class();
await this.ReadAsync<IgnoreOnPocoOperation>();
plain.primitive = primitive.Select(p => p.LastValue).ToArray();
#pragma warning disable CS0612
Expand All @@ -50,9 +50,9 @@ public async virtual Task<T> OnlineToPlain<T>()

[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<Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class> _OnlineToPlainNoacAsync()
public async Task<ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class> _OnlineToPlainNoacAsync()
{
Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain = new Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class();
ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain = new ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class();
plain.primitive = primitive.Select(p => p.LastValue).ToArray();
#pragma warning disable CS0612
plain.complex = complex.Select(async p => await p._OnlineToPlainNoacAsync()).Select(p => p.Result).ToArray();
Expand All @@ -62,7 +62,7 @@ public async virtual Task<T> OnlineToPlain<T>()

[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<Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class> _OnlineToPlainNoacAsync(Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain)
protected async Task<ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class> _OnlineToPlainNoacAsync(ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain)
{
plain.primitive = primitive.Select(p => p.LastValue).ToArray();
#pragma warning disable CS0612
Expand All @@ -76,7 +76,7 @@ public async virtual Task PlainToOnline<T>(T plain)
await this.PlainToOnlineAsync((dynamic)plain);
}

public async Task<IEnumerable<ITwinPrimitive>> PlainToOnlineAsync(Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain)
public async Task<IEnumerable<ITwinPrimitive>> PlainToOnlineAsync(ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain)
{
var _primitive_i_FE8484DAB3 = 0;
#pragma warning disable CS0612
Expand All @@ -91,7 +91,7 @@ public async Task<IEnumerable<ITwinPrimitive>> PlainToOnlineAsync(Pocos.ArrayDec

[Obsolete("This method should not be used if you indent to access the controllers data. Use `PlainToOnline` instead.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public async Task _PlainToOnlineNoacAsync(Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain)
public async Task _PlainToOnlineNoacAsync(ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain)
{
var _primitive_i_FE8484DAB3 = 0;
#pragma warning disable CS0612
Expand All @@ -108,15 +108,15 @@ public async virtual Task<T> ShadowToPlain<T>()
return await (dynamic)this.ShadowToPlainAsync();
}

public async Task<Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class> ShadowToPlainAsync()
public async Task<ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class> ShadowToPlainAsync()
{
Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain = new Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class();
ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain = new ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class();
plain.primitive = primitive.Select(p => p.Shadow).ToArray();
plain.complex = complex.Select(async p => await p.ShadowToPlainAsync()).Select(p => p.Result).ToArray();
return plain;
}

protected async Task<Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class> ShadowToPlainAsync(Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain)
protected async Task<ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class> ShadowToPlainAsync(ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain)
{
plain.primitive = primitive.Select(p => p.Shadow).ToArray();
plain.complex = complex.Select(async p => await p.ShadowToPlainAsync()).Select(p => p.Result).ToArray();
Expand All @@ -128,7 +128,7 @@ public async virtual Task PlainToShadow<T>(T plain)
await this.PlainToShadowAsync((dynamic)plain);
}

public async Task<IEnumerable<ITwinPrimitive>> PlainToShadowAsync(Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain)
public async Task<IEnumerable<ITwinPrimitive>> PlainToShadowAsync(ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain)
{
var _primitive_i_FE8484DAB3 = 0;
primitive.Select(p => p.Shadow = plain.primitive[_primitive_i_FE8484DAB3++]).ToArray();
Expand All @@ -147,7 +147,7 @@ public async virtual Task<bool> AnyChangeAsync<T>(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.
///</summary>
public async Task<bool> DetectsAnyChangeAsync(Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class plain, Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class latest = null)
public async Task<bool> DetectsAnyChangeAsync(ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class plain, ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class latest = null)
{
if (latest == null)
latest = await this._OnlineToPlainNoacAsync();
Expand Down Expand Up @@ -176,9 +176,9 @@ public void Poll()
this.RetrievePrimitives().ToList().ForEach(x => x.Poll());
}

public Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class CreateEmptyPoco()
public ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class CreateEmptyPoco()
{
return new Pocos.ArrayDeclarationSimpleNamespace.array_declaration_class();
return new ArrayDeclarationSimpleNamespace.Pocos.array_declaration_class();
}

private IList<AXSharp.Connector.ITwinObject> Children { get; } = new List<AXSharp.Connector.ITwinObject>();
Expand Down Expand Up @@ -278,24 +278,24 @@ public async virtual Task<T> OnlineToPlain<T>()
return await (dynamic)this.OnlineToPlainAsync();
}

public async Task<Pocos.ArrayDeclarationSimpleNamespace.some_complex_type> OnlineToPlainAsync()
public async Task<ArrayDeclarationSimpleNamespace.Pocos.some_complex_type> OnlineToPlainAsync()
{
Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain = new Pocos.ArrayDeclarationSimpleNamespace.some_complex_type();
ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain = new ArrayDeclarationSimpleNamespace.Pocos.some_complex_type();
await this.ReadAsync<IgnoreOnPocoOperation>();
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<Pocos.ArrayDeclarationSimpleNamespace.some_complex_type> _OnlineToPlainNoacAsync()
public async Task<ArrayDeclarationSimpleNamespace.Pocos.some_complex_type> _OnlineToPlainNoacAsync()
{
Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain = new Pocos.ArrayDeclarationSimpleNamespace.some_complex_type();
ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain = new ArrayDeclarationSimpleNamespace.Pocos.some_complex_type();
return plain;
}

[Obsolete("This method should not be used if you indent to access the controllers data. Use `OnlineToPlain` instead.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
protected async Task<Pocos.ArrayDeclarationSimpleNamespace.some_complex_type> _OnlineToPlainNoacAsync(Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain)
protected async Task<ArrayDeclarationSimpleNamespace.Pocos.some_complex_type> _OnlineToPlainNoacAsync(ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain)
{
return plain;
}
Expand All @@ -305,14 +305,14 @@ public async virtual Task PlainToOnline<T>(T plain)
await this.PlainToOnlineAsync((dynamic)plain);
}

public async Task<IEnumerable<ITwinPrimitive>> PlainToOnlineAsync(Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain)
public async Task<IEnumerable<ITwinPrimitive>> PlainToOnlineAsync(ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain)
{
return await this.WriteAsync<IgnoreOnPocoOperation>();
}

[Obsolete("This method should not be used if you indent to access the controllers data. Use `PlainToOnline` instead.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public async Task _PlainToOnlineNoacAsync(Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain)
public async Task _PlainToOnlineNoacAsync(ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain)
{
}

Expand All @@ -321,13 +321,13 @@ public async virtual Task<T> ShadowToPlain<T>()
return await (dynamic)this.ShadowToPlainAsync();
}

public async Task<Pocos.ArrayDeclarationSimpleNamespace.some_complex_type> ShadowToPlainAsync()
public async Task<ArrayDeclarationSimpleNamespace.Pocos.some_complex_type> ShadowToPlainAsync()
{
Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain = new Pocos.ArrayDeclarationSimpleNamespace.some_complex_type();
ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain = new ArrayDeclarationSimpleNamespace.Pocos.some_complex_type();
return plain;
}

protected async Task<Pocos.ArrayDeclarationSimpleNamespace.some_complex_type> ShadowToPlainAsync(Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain)
protected async Task<ArrayDeclarationSimpleNamespace.Pocos.some_complex_type> ShadowToPlainAsync(ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain)
{
return plain;
}
Expand All @@ -337,7 +337,7 @@ public async virtual Task PlainToShadow<T>(T plain)
await this.PlainToShadowAsync((dynamic)plain);
}

public async Task<IEnumerable<ITwinPrimitive>> PlainToShadowAsync(Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain)
public async Task<IEnumerable<ITwinPrimitive>> PlainToShadowAsync(ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain)
{
return this.RetrievePrimitives();
}
Expand All @@ -352,7 +352,7 @@ public async virtual Task<bool> AnyChangeAsync<T>(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.
///</summary>
public async Task<bool> DetectsAnyChangeAsync(Pocos.ArrayDeclarationSimpleNamespace.some_complex_type plain, Pocos.ArrayDeclarationSimpleNamespace.some_complex_type latest = null)
public async Task<bool> DetectsAnyChangeAsync(ArrayDeclarationSimpleNamespace.Pocos.some_complex_type plain, ArrayDeclarationSimpleNamespace.Pocos.some_complex_type latest = null)
{
if (latest == null)
latest = await this._OnlineToPlainNoacAsync();
Expand All @@ -369,9 +369,9 @@ public void Poll()
this.RetrievePrimitives().ToList().ForEach(x => x.Poll());
}

public Pocos.ArrayDeclarationSimpleNamespace.some_complex_type CreateEmptyPoco()
public ArrayDeclarationSimpleNamespace.Pocos.some_complex_type CreateEmptyPoco()
{
return new Pocos.ArrayDeclarationSimpleNamespace.some_complex_type();
return new ArrayDeclarationSimpleNamespace.Pocos.some_complex_type();
}

private IList<AXSharp.Connector.ITwinObject> Children { get; } = new List<AXSharp.Connector.ITwinObject>();
Expand Down
Loading