Class PlugInLocator
Handles all internal locating of plugins.
Inheritance
Inherited Members
Namespace: EPiServer.PlugIn
Assembly: EPiServer.dll
Version: 8.11.0Syntax
public class PlugInLocator
Remarks
Used to find all plug-ins for a specific PlugInAttribute. The System.Attribute.Match(System.Object) method will be called to test if a class is a match.
If you already know the type of plug-in you wish to locate use Load(Int32).
Properties
Assemblies
Gets the assemblies that are scanned for plugins.
Declaration
public static IDictionary Assemblies { get; }
Property Value
Type | Description |
---|---|
System.Collections.IDictionary | A dictionary with the assembly display name as key and the AssemblyTypeInfo as value. |
Methods
FindPlugInAssemblies()
Finds all assemblies that contain plugins in the specified directory
Declaration
public static AssemblyName[] FindPlugInAssemblies()
Returns
Type | Description |
---|---|
System.Reflection.AssemblyName[] | A array of plugins. If no plugins was found a empty array will be returned. |
FindPlugInAttributes()
Finds all plugin attributes in the specified directory
Declaration
public static Type[] FindPlugInAttributes()
Returns
Type | Description |
---|---|
System.Type[] | A array of plugin attributes. If no plugins was found a empty array will be returned. |
FindPlugInTypes(AssemblyTypeInfo, Type)
Finds all plugins of the specified type in the specified assembly
Declaration
public static ICollection FindPlugInTypes(AssemblyTypeInfo assemblyType, Type pluginType)
Parameters
Type | Name | Description |
---|---|---|
AssemblyTypeInfo | assemblyType | The assembly to search in |
System.Type | pluginType | The type to be used |
Returns
Type | Description |
---|---|
System.Collections.ICollection | An ICollection with PlugInDescriptors. |
FindPlugInTypes(AssemblyName, Type)
Finds all plugins of the specified type in the specified assembly
Declaration
public static PlugInDescriptor[] FindPlugInTypes(AssemblyName assemblyName, Type pluginType)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.AssemblyName | assemblyName | The assembly search in |
System.Type | pluginType | The type to be used |
Returns
Type | Description |
---|---|
PlugInDescriptor[] | A array of plugins. If no plugins was found a empty array will be returned. |
FindPlugInTypes(Type)
Finds all plugins of the specified type
Declaration
public static PlugInDescriptor[] FindPlugInTypes(Type pluginType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | pluginType | The type to be used |
Returns
Type | Description |
---|---|
PlugInDescriptor[] | A array of plugins. If no plugins was found a empty array will be returned. |
HasPlugIns(Type)
Determines whether the type has any plugin attributes.
Declaration
public static bool HasPlugIns(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to check for attributes. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Search(PlugInAttribute)
Search for plugins
Declaration
public static PlugInDescriptor[] Search(PlugInAttribute matchAttribute)
Parameters
Type | Name | Description |
---|---|---|
PlugInAttribute | matchAttribute | The attribute to used for matching by calling System.Attribute.Match(System.Object) |
Returns
Type | Description |
---|---|
PlugInDescriptor[] | A array of plugins. If no plugins was found a empty array will be returned. |
Search(AssemblyName, PlugInAttribute)
Search for plugins
Declaration
public static PlugInDescriptor[] Search(AssemblyName assemblyName, PlugInAttribute matchAttribute)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.AssemblyName | assemblyName | The assembly to search in |
PlugInAttribute | matchAttribute | The attribute to used for matching by calling System.Attribute.Match(System.Object) |
Returns
Type | Description |
---|---|
PlugInDescriptor[] | A array of plugins. If no plugins was found a empty array will be returned. |