Interface IExtension
Represents an extension registered with a particular extension point within a particular plug-in.
Namespace: Sdl.Core.PluginFramework
Assembly: Sdl.Core.PluginFramework.dll
Syntax
public interface IExtension
Properties
AuxiliaryExtensionAttributes
Returns the read-only collection of auxiliary extension attributes, specifying more information about this extension.
Declaration
AuxiliaryExtensionAttributeCollection AuxiliaryExtensionAttributes { get; }
Property Value
Type | Description |
---|---|
AuxiliaryExtensionAttributeCollection |
Enabled
True when this extension is currently enabled.
Declaration
bool Enabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
ExtensionAttribute
Gets the extension attribute that represents this extension.
Declaration
ExtensionAttribute ExtensionAttribute { get; }
Property Value
Type | Description |
---|---|
ExtensionAttribute |
ExtensionPoint
The extension point to which this extension contributes.
Declaration
IExtensionPoint ExtensionPoint { get; }
Property Value
Type | Description |
---|---|
IExtensionPoint |
ExtensionType
Gets the extension implementation type.
Declaration
Type ExtensionType { get; }
Property Value
Type | Description |
---|---|
System.Type |
Plugin
Gets the plug-in providing this extension.
Declaration
IPlugin Plugin { get; }
Property Value
Type | Description |
---|---|
IPlugin |
Methods
CreateInstance()
Creates a new instance of the extension implementation type.
Declaration
object CreateInstance()
Returns
Type | Description |
---|---|
System.Object | The newly created instance. |
GetAuxiliaryExtensionAttributes<T>()
Gets the auxiliary extension attributes of the specified type.
Declaration
T[] GetAuxiliaryExtensionAttributes<T>()
where T : AuxiliaryExtensionAttribute
Returns
Type | Description |
---|---|
T[] | The auxiliary extension attributes of the requested type. |
Type Parameters
Name | Description |
---|---|
T | The type of auxiliary extension attributes to return. |
SetEnabled(Boolean)
Enables or disables this extension.
Declaration
bool SetEnabled(bool enabled)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | enabled | True to enable the extension. |
Returns
Type | Description |
---|---|
System.Boolean | True if disabling the extension does not require restarting the application, false otherwise. |
Validate()
Validates this extension.
Declaration
void Validate()
Events
EnabledChanged
Raised when the Enabled property changes.
Declaration
event EventHandler<ExtensionEventArgs> EnabledChanged
Event Type
Type | Description |
---|---|
System.EventHandler<ExtensionEventArgs> |