Write the plugin initializer
- Last UpdatedApr 08, 2026
- 1 minute read
This scenario guides you through the steps required to write initialization code for a High Performance Data Export Framework (HPDEF) plugin. Follow the steps in this scenario to create a plugin initializer that the system invokes once when the Data Export Engine starts up.
To identify the code associated with each step, see the code comments in the Example code section.
To write the plugin initializer
In this example, the initializer code is written to a file called Initializer.cs.
- In the created project used to implement the plugin initialization code, open or create the class file.
- Set the class to implement the IPluginInitializer interface.
- Create the Initialize() method where the initialization logic will be written:
- Add any initialization logic that the Data Export Engine executes when it starts up.
- If required, validate the correctness of the logic.
- Return true if initialization was successful; otherwise, return false.
Example code
// In the created project used to implement the plugin initialization code, open or create the class file.
using System;
namespace OASySDNA.RealTime.DataExport.ExamplePlugin
{
// Set the class to implement the IPluginInitializer interface.
public sealed class Initializer : IPluginInitializer
{
// Create the Initialize() method where the initialization logic will be written.
public Boolean Initialize()
{
// Add any initialization logic that the Data Export Engine executes when it starts up.
var cache = new ExampleCache();
cache.Initialize();
// If required, validate the correctness of the logic.
if (cache.Count == 2)
{
// Return true if initialization was successful.
return true;
}
else
{
// Otherwise, return false.
return false;
}
}
}
}