Skip to content

Commit 2a06840

Browse files
Fixes #232
1 parent 03129b6 commit 2a06840

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Opc.Ua.ModelCompiler/ModelGenerator2.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,22 @@ private void GenerateNodesetXml(string filePath, SystemContext context, NodeStat
882882
File.Delete(outputFile);
883883
}
884884

885+
private void UpdateExtensions(string filePath)
886+
{
887+
using (Stream istrm = m_fileSystem.OpenRead(filePath))
888+
{
889+
Opc.Ua.Export.UANodeSet nodeSet = Opc.Ua.Export.UANodeSet.Read(istrm);
890+
istrm.Close();
891+
892+
nodeSet.Extensions = m_model.Extensions;
893+
894+
using (Stream ostrm = m_fileSystem.OpenWrite(filePath))
895+
{
896+
nodeSet.Write(ostrm);
897+
}
898+
}
899+
}
900+
885901
/// <summary>
886902
/// Generate nodeset 2 xml file
887903
/// </summary>
@@ -945,6 +961,8 @@ private void GenerateNodeset2Xml(
945961
}
946962
}
947963

964+
UpdateExtensions(outputFile);
965+
948966
// load as node set.
949967
using (Stream istrm = m_fileSystem.OpenRead(outputFile))
950968
{

0 commit comments

Comments
 (0)