Class ActionAttribute
Decorate an action of a Studio application provinding metadata informations
Inherited Members
Namespace: Sdl.Desktop.IntegrationApi.Extensions
Assembly: Sdl.Desktop.IntegrationApi.Extensions.dll
Syntax
[AttributeUsage(AttributeTargets.Class)]
public class ActionAttribute : AbstractCommandBarItemAttribute
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()
Default constructor for XML serialization.
Declaration
public ActionAttribute()
ActionAttribute(String)
Initialize the instance of the action attribute
Declaration
public ActionAttribute(string id)
Parameters
Type | Name | Description |
---|---|---|
System.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 |
---|---|---|
System.String | id | The unique identifier of the action. |
System.String | name | The name that will be displayed. |
System.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 |
---|---|---|
System.String | id | The unique identifier of the action. |
System.String | name | The name that will be displayed. |
System.String | description | The description of the action. |
System.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 |
---|---|---|
System.String | id | The unique identifier of the action |
System.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.