Azure-Samples / iot-edge-opc-plc

Sample OPC UA server with nodes that generate random and increasing data, anomalies and much more ...
MIT License
218 stars 94 forks source link

Do not add custom types into global EncodeableFactory #371

Closed koepalex closed 2 months ago

koepalex commented 2 months ago

Purpose

When used via NuGet package in-memory, the server needs to use its own encodable factory. Otherwise, the client will not load the type definitions for decoding correctly. There is currently no public API to set the encodable factory and it is not possible to provide own implementation, because other classes require the StandardServer or ServerInternalData as objects, so we need to use reflection to set it.

Does this introduce a breaking change?

[ ] Yes
[X] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[X] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install

What to Check

Verify that the following are valid

Other Information