Code clean up and improvements#3532
Conversation
| NonMetadata = MessageType | DataSetMetaData, | ||
|
|
||
| MetaData_Name, | ||
| MetaData_Description, |
There was a problem hiding this comment.
not familiar with this area, but why was this removed? not needed any more?
There was a problem hiding this comment.
It was not used, you cannot fail for missing description, because it was set to null in the configuration.
| public object SystemHandle { get; set; } | ||
|
|
||
| /// <inheritdoc/> | ||
| public string UserId => UserIdentity?.DisplayName; |
There was a problem hiding this comment.
Is this really an OPC UA semantic?
Not shure why it is added here
There was a problem hiding this comment.
I needed to pull this into the interface so it can be pulled into condition state and audit event state from system context (without these areas to understand "user tokens").
| /// Encodeable activator | ||
| /// </summary> | ||
| /// <typeparam name="T"></typeparam> | ||
| public abstract class EncodeableType<T> : IEncodeableType |
There was a problem hiding this comment.
Added in this PR for a reason?
There was a problem hiding this comment.
No reason - in fact we can likely remove this although, let me do that in the next PR if there are no glaring other issues.
| </xs:sequence> | ||
| <xs:attribute name="Name" type="xs:string" use="optional" /> | ||
| <xs:attribute name="Value" type="xs:int" use="optional" /> | ||
| <xs:attribute name="Value" type="xs:unsignedLong" use="optional" /> |
There was a problem hiding this comment.
should this be changed in ModelCompilerRepo as well or is this only present in UANetstandard?
There was a problem hiding this comment.
It is already changed there, this is the copy
Proposed changes
PR Classification
Code cleanup and modernization to align with latest C# and .NET best practices, and to remove legacy .NET Standard 2.0 support.
PR Summary
This pull request modernizes the OPC UA .NET codebase and tests, removes .NET Standard 2.0 support from certificate/security code, and updates test code to use C# 12 and .NET 8+ features for clarity and maintainability.
Types of changes
What types of changes does your code introduce?
Put an
xin the boxes that apply. You can also fill these out after creating the PR.Checklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...