Data types using C#

Manually adding or removing a data type

The sample code in the following sections demonstrates how to manually add or remove a data type in C1 CMS.

Adding

If you want to add your data type to the system, you should at one point make this call:

DynamicTypeManager.EnsureCreateStore(typeof(IMyDataType));

It is safe to call this repeatedly, but it is recommended only doing it one time per system startup.

Removing

If you want to remove your type from the system, you do the following:

DataTypeDescriptor dtd = DynamicTypeManager.GetDataTypeDescriptor(typeof(IMyDataFolder));
DynamicTypeManager.DropStore(dtd);

This can only be call one time.