How to delete dynamic data types on runtime.

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

Moderator: uasdknet

Post Reply
Sleepy-Simon89
Jr. Member
Jr. Member
Posts: 4
Joined: 18 May 2020, 15:17

How to delete dynamic data types on runtime.

Post by Sleepy-Simon89 »

Hello together,

I have dynamic data types that are created during runtime.

I create them using the following helper functions:
1. BaseNodeManager.CreateTypeDictionary
2. BaseNodeManager.CreateGenericDataType

I use GenericStructureValue to set values. This works very well.

Now I have a new requirement to delete the generic data types from address space and type dictionary on runtime. How can I handle this?

I can already delete object / variable and method nodes that use the dynamic data type on runtime using BaseNodeManager.DeleteNode method.
But I do not find any option to delete the data type (including XmlEncoding / BinaryEncoding) itsself. Can you please help?

Thanks in advance!

Sleepy-Simon89

Sleepy-Simon89
Jr. Member
Jr. Member
Posts: 4
Joined: 18 May 2020, 15:17

Re: How to delete dynamic data types on runtime.

Post by Sleepy-Simon89 »

I figured out this far:

1. DeleteDataTypeNode
2. DeleteBinaryEncodingNode
3. DeleteXmlEncodingNode
4. UnregisterDataType
5. UnregisterEncodings

Only thing I'm not able to manage is to remove SchemaBuilder from TypeDictionary due to "m_dictionaries" is private and there is only CreateTypeDictionary functionality and no functionality to access or remove it.

Post Reply