Class ActionAttribute
Decorate an action of a Studio application provinding metadata informations
Inheritance
Implements
Inherited Members
Namespace: SdlSdl.DesktopIntegrationApiExtensions
Assembly: Sdl.Desktop.IntegrationApi.Extensions.dll
Syntax
[ExtensionPointInfo("Actions", ExtensionPointBehavior.Static)]
[AttributeUsage(AttributeTargets.Class)]
public class ActionAttribute : AbstractCommandBarItemAttribute, _Attribute
Remarks
The framework also provides support for getting property values from the PluginResources.resx resource file, which is deployed together with the plug-in manifest. To specify that the value of a certain string property needs to be retrieved from the resource file, annotate the property definition with the PluginResourceAttribute attribute. Users should now specify the name of the resource key, instead of the actual value, as the property value. When no resource string with the specified key can be found, the framework keeps the specified string as the property value. To define non-string properties whose value is stored in the PluginResources.resx resource file, create a string property, which value should be set to a resource key. When consuming the extension, use GetPluginResource<T>(string) tio retriece the resource from the plug-in resource file.
Constructors
ActionAttribute(string)
Initialize the instance of the action attribute
Declaration
public ActionAttribute(string id)
Parameters
Type | Name | Description |
---|---|---|
string | id | The unique identifier of the action |
Remarks
This constructor should be used only if pluginresources are used to resolve the name and description of the extension.
The resource keys for name and description are built from id and postfixed with _Name and _Description.
ActionAttribute(string, string, string)
Initialize the instance of the action attribute.
Declaration
public ActionAttribute(string id, string name, string description)
Parameters
Type | Name | Description |
---|---|---|
string | id | The unique identifier of the action. |
string | name | The name that will be displayed. |
string | description | The description of the action. |
ActionAttribute(string, string, string, Type)
Initialize the instance of the action attribute.
Declaration
public ActionAttribute(string id, string name, string description, Type contextByType)
Parameters
Type | Name | Description |
---|---|---|
string | id | The unique identifier of the action. |
string | name | The name that will be displayed. |
string | description | The description of the action. |
Type | contextByType | The context in which the action should work. |
ActionAttribute(string, Type)
Initialize the instance of the action attribute
Declaration
public ActionAttribute(string id, Type contextByType)
Parameters
Type | Name | Description |
---|---|---|
string | id | The unique identifier of the action |
Type | contextByType | The context in which the action should work. |
Remarks
This constructor should be used only if pluginresources are used to resolve the name and description of the extension.
The resource keys for name and description are built from id and postfixed with _Name and _Description.