Class GuiPlugInAttribute

Settings for plugins in graphical modes

Inheritance
System.Object
System.Attribute
GuiPlugInAttribute
Implements
System.Runtime.InteropServices._Attribute
Inherited Members
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Boolean)
System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type)
System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Boolean)
System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type)
System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.Module)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.Module, System.Type)
System.Attribute.IsDefined(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Boolean)
System.Attribute.IsDefined(System.Reflection.Assembly, System.Type)
System.Attribute.IsDefined(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.Equals(System.Object)
System.Attribute.GetHashCode()
System.Attribute.IsDefaultAttribute()
System.Attribute.System.Runtime.InteropServices._Attribute.GetTypeInfoCount(System.UInt32)
System.Attribute.System.Runtime.InteropServices._Attribute.GetTypeInfo(System.UInt32, System.UInt32, System.IntPtr)
System.Attribute.System.Runtime.InteropServices._Attribute.GetIDsOfNames(System.Guid, System.IntPtr, System.UInt32, System.UInt32, System.IntPtr)
System.Attribute.System.Runtime.InteropServices._Attribute.Invoke(System.UInt32, System.Guid, System.UInt32, System.Int16, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr)
System.Attribute.TypeId
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.PlugIn
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.5
Syntax
[AttributeUsage(AttributeTargets.Class)]
public class GuiPlugInAttribute : PlugInAttribute, _Attribute
Remarks

To translate DisplayName and Description of a plug-in you have to add your own xml file in the “lang/” directory and set the property LanguagePath. If you for example set LanguagePath to /myplugin/sample the xml paths you add should be /myplugin/sample/displayname and /myplugin/sample/description.

There may be some plug-ins that requires special security roles or other circumstances that the plug-in framework doesn’t have knowledge of, in these cases you may implement ICustomPlugInLoader on you plug-in. This will allow you to control loading of the plug-in yourself.

Some plug-ins need to store some kind of internal settings or state, there are different approaches to this. If you only need to store simple system settings, for example the mail server name in your brand new mail plug-in you probably want to use web.config. If you have large amout of data the obvious choice is to store it in a database. When your need fits in between these two, you need to store small sets of relational data and don’t want to use your own database for this simple purpose you have PlugInSettings. PlugInSettings is used to store plug-in settings and information in a DataSet, these will be persisted as xml together will the plug-in definition in the EpiServer database.

See PlugInAttribute class for more information on how the plug-ins are located and matched.

Examples
  Sample plug-in that will show up in the administration menu.
    [GuiPlugIn(DisplayName="MyShop",
Description="Shopping Administration",
Area=PlugInArea.AdminMenu,
Url="~/MyShop/Plugin/ShopPluginTree.ascx", 
LanguagePath="/myshop/plugin/ShopPluginTree")]
public abstract class EPiShopPluginTree : System.Web.UI.UserControl
{
// ToDo: Add functionality
}

Constructors

GuiPlugInAttribute()

Initializes a new instance of the GuiPlugInAttribute class.

Declaration
public GuiPlugInAttribute()
Remarks

You must use named parameters to initialize the properties.

Properties

Area

The area this plugin supports.

Declaration
public PlugInArea Area { get; set; }
Property Value
Type Description
PlugInArea

Category

The category of the plugin (currently only supported by Report and Visitor Group Criterion).

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

RequiredAccess

The required page access to view plugin (currently only supported by EditPanel).

Declaration
public AccessLevel RequiredAccess { get; set; }
Property Value
Type Description
AccessLevel

Url

The url to the resource defined by Area.

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

UrlFromModuleFolder

Gets or sets the URL relative the folder of EPiServer Shell module that plug-in belongs to. ModuleType property must be defined to resolve the path to module folder.

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

The URL relative the corresponding Shell module folder.

UrlFromUi

Gets and sets the url relative the UI directory to the resource

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

The URL relative the UI directory

UrlFromUtil

Sets the URL relative the util directory to the resource

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

The URL relative the util directory

Methods

Match(Object)

Returns a value indicating whether this instance equals a specified object.

Declaration
public override bool Match(object o)
Parameters
Type Name Description
System.Object o

The object to match.

Returns
Type Description
System.Boolean

True if the object matches this instance.

Overrides
System.Attribute.Match(System.Object)
Remarks

Used internally to selectively load plugins.

ResolvePathInternal(String, GuiPlugInAttribute.ResolvePathDelegate)

Resolves the path to plug-in resources.

Declaration
protected string ResolvePathInternal(string path, GuiPlugInAttribute.ResolvePathDelegate resolvePathDelegate)
Parameters
Type Name Description
System.String path

The path.

GuiPlugInAttribute.ResolvePathDelegate resolvePathDelegate

The resolve path delegate.

Returns
Type Description
System.String

Resolved path.

ToString()

Returns a System.String that represents this instance.

Declaration
public override string ToString()
Returns
Type Description
System.String

A System.String that represents this instance.

Overrides
System.Object.ToString()

Implements

System.Runtime.InteropServices._Attribute

Extension Methods