Class PluginBase2
Base class for use with CreateMultiple or UpdateMultiple.
Inheritance
System.Object
PluginBase2
Implements
Microsoft.Xrm.Sdk.IPlugin
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Hsl.Xrm.Sdk.Plugin
Assembly: Hsl.Xrm.Sdk.Plugin.dll
Syntax
public abstract class PluginBase2 : IPlugin
Constructors
PluginBase2()
Default constructor
Declaration
public PluginBase2()
PluginBase2(String, String)
Config constructor
Declaration
public PluginBase2(string unsecureConfig, string secureConfig)
Parameters
Type | Name | Description |
---|---|---|
System.String | unsecureConfig | |
System.String | secureConfig |
Methods
CreateEventContext(PluginGeneralConfiguration, IServiceProvider)
Creates an instance of the PluginEventContext2. Can use override to have a custom class extending PluginEventContext2.
Declaration
protected virtual IPluginEventContext2 CreateEventContext(PluginGeneralConfiguration generalConfig, IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
PluginGeneralConfiguration | generalConfig | |
System.IServiceProvider | serviceProvider |
Returns
Type | Description |
---|---|
IPluginEventContext2 |
Execute(IServiceProvider)
Executes the plugin. This is called by the platform.
Declaration
public void Execute(IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
System.IServiceProvider | serviceProvider | Service provider for the plugin |
ExecuteAction(IPluginEventContext2)
Executes the main plugin operation.
Declaration
public abstract void ExecuteAction(IPluginEventContext2 pluginEventContext)
Parameters
Type | Name | Description |
---|---|---|
IPluginEventContext2 | pluginEventContext | Context providing information about the plugin execution |
LoadConfiguration(String, String)
Used to read/process the configuration.
Declaration
protected virtual void LoadConfiguration(string unsecureConfig, string secureConfig)
Parameters
Type | Name | Description |
---|---|---|
System.String | unsecureConfig | |
System.String | secureConfig |
LoadGeneralConfiguration(String, String)
Reads the plugin trace configuration.
Declaration
protected virtual PluginGeneralConfiguration LoadGeneralConfiguration(string unsecureConfig, string secureConfig)
Parameters
Type | Name | Description |
---|---|---|
System.String | unsecureConfig | |
System.String | secureConfig |
Returns
Type | Description |
---|---|
PluginGeneralConfiguration |
Implements
Microsoft.Xrm.Sdk.IPlugin