Table of Contents

Class PluginConfigurationManager

Namespace
Hsl.Xrm.Sdk.Plugin
Assembly
Hsl.Xrm.Sdk.Plugin.dll

A base class for managing settings for a plugin.

public class PluginConfigurationManager
Inheritance
PluginConfigurationManager
Inherited Members

Remarks

This class will attempt to read the attributes of a "settings" node as the settings for the configuration. It is also possible to read a custom object from the configuration using the GetObject method. See the GetObject method comments for more information.

Constructors

PluginConfigurationManager()

Default constructor.

public PluginConfigurationManager()

PluginConfigurationManager(string, string)

Initializes an instance of the object by initializing with the config and secureconfig parameters that are passed to the plugin upon instantiation.

public PluginConfigurationManager(string unsecureConfig, string secureConfig)

Parameters

unsecureConfig string

The config passed to the plugin.

secureConfig string

The secureconfig passed to the plugin.

Properties

SecureConfig

The sections that were loaded from the "secureconfig" for the plugin.

public ParameterCollection SecureConfig { get; }

Property Value

ParameterCollection

SecureConfigText

Gets the secure configuration as raw text.

public string? SecureConfigText { get; }

Property Value

string

The raw text contained in the secure configuration.

SecureConfigXml

Gets the secure configuration as an XElement.

public XElement? SecureConfigXml { get; }

Property Value

XElement

An XElement if the secure configuration is XML, otherwise null.

UnsecureConfig

The sections that were loaded from the "config" for the plugin.

public ParameterCollection UnsecureConfig { get; }

Property Value

ParameterCollection

UnsecureConfigText

Gets the unsecure configuration as raw text.

public string? UnsecureConfigText { get; }

Property Value

string

The raw text contained in the unsecure configuration.

UnsecureConfigXml

Gets the unsecure configuration as an XElement.

public XElement? UnsecureConfigXml { get; }

Property Value

XElement

An XElement if the unsecure configuration is XML, otherwise null.

UserConfig

All of the parameters from both the unsecure and secure configuations. The secure configuration parameters will override any unsecure parameters values that have the same name.

public ParameterCollection UserConfig { get; }

Property Value

ParameterCollection

Methods

InitializeConfig(string?)

Initializes the config (unsecure) configuration.

public void InitializeConfig(string? config)

Parameters

config string

A string containing the configuration data.

InitializeSecureConfig(string?)

Initializes the secure config configuration.

public void InitializeSecureConfig(string? secureConfig)

Parameters

secureConfig string

A string containing the secure configuration data.