CodeCarvings Piczard V1.2 Help
How To Register A Plugin
See Also Send Feedback
Extending Piczard > Plugins > How To Register A Plugin

Glossary Item Box

Please see the Web.Config file of the ExampleSet A.

It is mandatory to register a Plugin in the application configuration file in order to allow Piczard to use it.

In particular, it is necessary to add a sub-tag "plugin" to the "codeCarvings.piczard / coreSettings / plugins" section for each plugin to install.
Every Plugin must be registered only one time for each application.

The "type" attribute must contain (at least) the "Fully qualified class name" of the Plugin class and its "assembly file name"
Use the following format:

<plugin type="Fully qualified class name , assembly file name, version, culture, public key token" />

For more information please see: Type.GetType Method


Configuration file Copy Code
<?xml version="1.0"?>
<sectionGroup name="codeCarvings.piczard">
<section name="coreSettings" type="CodeCarvings.Piczard.Configuration.CoreSettingsSectionHandler, CodeCarvings.Piczard" requirePermission="false"/>
<plugin type="MyNamespace1.MyPlugin1, MyAssemblyName" />
<plugin type="MyPlugin2, App_Code" />

Please see:

In order to get a list of the registered Plugins you can use the InstalledPlugins property of the PluginSettings class

Iterate through the installed plugins Copy Code
foreach (Plugin plugin in CoreSettings.Plugins.InstalledPlugins.Values)
string installedPluginNamne = plugin.PluginFullName;
"[" + installedPluginNamne + "]");


See Also

.Config File Settings
Core Settings

©2013 Sergio Turolla. All Rights Reserved.