Class PlugInAttribute
The base class for all specialized plug-in types
Inheritance
Namespace: EPiServer.PlugIn
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public abstract class PlugInAttribute : Attribute
Remarks
When an area that support plug-ins executes in EPiServer it will search for files in the
bin directory and their containing classes for an attribute called Plug
The class that handles searching is Plug
Constructors
PlugInAttribute()
Initializes a new instance of the Plug
Declaration
protected PlugInAttribute()
PlugInAttribute(String, String)
Initializes a new instance of the Plug
Declaration
protected PlugInAttribute(string displayName, string description)
Parameters
Type | Name | Description |
---|---|---|
System. |
displayName | The name of the plug-in. |
System. |
description | The description for the plug-in. |
Remarks
Unless the Language
PlugInAttribute(String, String, String)
Initializes a new instance of the Plug
Declaration
protected PlugInAttribute(string displayName, string description, string languagePath)
Parameters
Type | Name | Description |
---|---|---|
System. |
displayName | The name of the plug-in. |
System. |
description | The description for the plug-in. |
System. |
languagePath | The language path for translation support. |
Remarks
See DisplaylanguagePath
is used.
Properties
DefaultEnabled
Declaration
public bool DefaultEnabled { get; set; }
Property Value
Type | Description |
---|---|
System. |
|
Remarks
If not set the value of this property is 'true'.
Description
Description of the plugin
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System. |
The description. |
Remarks
If a LanguagePath has been defined, the return value for Description will be the translated text from LanguagePath + "/description"
DisplayName
The display name for the plugin.
Declaration
public string DisplayName { get; set; }
Property Value
Type | Description |
---|---|
System. |
A string with the display name. |
Remarks
If a LanguagePath has been defined, the return value for DisplayName will be the translated text from LanguagePath + "/displayname"
LanguagePath
Path to node in language files where translation can be found.
Declaration
public string LanguagePath { get; set; }
Property Value
Type | Description |
---|---|
System. |
Remarks
Set this property to the path of the XML element that contains the displayname and description elements in one of your language files (an xml file in the /lang directory.)
Examples
For a LanguagePath with the value "/myshop/plugin/ShopPluginTree/" the XML should look something like this:
<languages>
<language name="English" id="EN">
<myshop>
<plugin>
<ShopPluginTree>
<displayname>My shop</displayname>
<description>Description of shopping tab</description>
</ShopPluginTree>
</plugin>
</myshop>
</language>
</languages>
PlugInType
Gets or sets the plug-in type that is decorated with this attribute. This property is normally set by plug-in system during runtime, but can be overriden explicitly by plug-in developer.
Declaration
public Type PlugInType { get; }
Property Value
Type | Description |
---|---|
System. |
Plug-in type. |
RequireLicenseForLoad
Determine if the plugin requires a valid license to be loaded.
Declaration
public bool RequireLicenseForLoad { get; set; }
Property Value
Type | Description |
---|---|
System. |
True if license is required. |
Remarks
If true, the Plug
SortIndex
The sort index compared to other plugins
Declaration
public int SortIndex { get; set; }
Property Value
Type | Description |
---|---|
System. |
Methods
SetPlugInType(Type)
Sets the type of the plug-in.
Declaration
public void SetPlugInType(Type plugInType)
Parameters
Type | Name | Description |
---|---|---|
System. |
plugInType | Type of the plug-in. |