Class PluginBase2
Base class for use with CreateMultiple or UpdateMultiple.
public abstract class PluginBase2 : IPlugin
- Inheritance
-
PluginBase2
- Implements
- Derived
- Inherited Members
Constructors
PluginBase2()
Default constructor
public PluginBase2()
PluginBase2(string?, string?)
Config constructor
public PluginBase2(string? unsecureConfig, string? secureConfig)
Parameters
Properties
EnableGetTraceLog
Set this to true in the constructor to enable the GetTraceLog() method.
public bool EnableGetTraceLog { get; init; }
Property Value
Methods
CreateEventContext(PluginGeneralConfiguration, IServiceProvider)
Creates an instance of the PluginEventContext2. Can use override to have a custom class extending PluginEventContext2.
protected virtual IPluginEventContext2 CreateEventContext(PluginGeneralConfiguration generalConfig, IServiceProvider serviceProvider)
Parameters
generalConfig
PluginGeneralConfigurationserviceProvider
IServiceProvider
Returns
Execute(IServiceProvider)
Executes the plugin. This is called by the platform.
public void Execute(IServiceProvider serviceProvider)
Parameters
serviceProvider
IServiceProviderService provider for the plugin
ExecuteAction(IPluginEventContext2)
Executes the business logic of the plugin.
public abstract void ExecuteAction(IPluginEventContext2 pluginEventContext)
Parameters
pluginEventContext
IPluginEventContext2Context providing information about the plugin execution
LoadConfiguration(string?, string?)
Used to read/process the configuration. Note that this method is called before the derived class's constructor finishes.
protected virtual void LoadConfiguration(string? unsecureConfig, string? secureConfig)
Parameters
LoadGeneralConfiguration(string?, string?)
Reads the plugin trace configuration.
protected virtual PluginGeneralConfiguration LoadGeneralConfiguration(string? unsecureConfig, string? secureConfig)