Show / Hide Table of Contents

    Class PluginConfigurationManager

    A base class for managing settings for a plugin.

    Inheritance
    System.Object
    PluginConfigurationManager
    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 class PluginConfigurationManager
    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.

    Declaration
    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.

    Declaration
    public PluginConfigurationManager(string unsecureConfig, string secureConfig)
    Parameters
    Type Name Description
    System.String unsecureConfig

    The config passed to the plugin.

    System.String secureConfig

    The secureconfig passed to the plugin.

    Properties

    SecureConfig

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

    Declaration
    public ParameterCollection SecureConfig { get; }
    Property Value
    Type Description
    Microsoft.Xrm.Sdk.ParameterCollection

    SecureConfigText

    Gets the secure configuration as raw text.

    Declaration
    public string SecureConfigText { get; }
    Property Value
    Type Description
    System.String

    The raw text contained in the secure configuration.

    SecureConfigXml

    Gets the secure configuration as an XElement.

    Declaration
    public XElement SecureConfigXml { get; }
    Property Value
    Type Description
    System.Xml.Linq.XElement

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

    UnsecureConfig

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

    Declaration
    public ParameterCollection UnsecureConfig { get; }
    Property Value
    Type Description
    Microsoft.Xrm.Sdk.ParameterCollection

    UnsecureConfigText

    Gets the unsecure configuration as raw text.

    Declaration
    public string UnsecureConfigText { get; }
    Property Value
    Type Description
    System.String

    The raw text contained in the unsecure configuration.

    UnsecureConfigXml

    Gets the unsecure configuration as an XElement.

    Declaration
    public XElement UnsecureConfigXml { get; }
    Property Value
    Type Description
    System.Xml.Linq.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.

    Declaration
    public ParameterCollection UserConfig { get; }
    Property Value
    Type Description
    Microsoft.Xrm.Sdk.ParameterCollection

    Methods

    InitializeConfig(String)

    Initializes the config (unsecure) configuration.

    Declaration
    public void InitializeConfig(string config)
    Parameters
    Type Name Description
    System.String config

    A string containing the configuration data.

    InitializeSecureConfig(String)

    Initializes the secure config configuration.

    Declaration
    public void InitializeSecureConfig(string secureConfig)
    Parameters
    Type Name Description
    System.String secureConfig

    A string containing the secure configuration data.

    Back to top Hsl.Xrm.Sdk