Class ActionBase
Base class for making input-storable and invokable Actions. This is the very base class for all RuleEngine and Toolbox Actions.
Inherited Members
Namespace: PiXYZ.Tools
Assembly: cs.temp.dll.dll
Syntax
public abstract class ActionBase
Properties
displayNameRuleEngine
Returns the display name (without menu path).
Declaration
public string displayNameRuleEngine { get; }
Property Value
Type | Description |
---|---|
System.String |
displayNameToolbox
Returns the display name (without menu path)
Declaration
public string displayNameToolbox { get; }
Property Value
Type | Description |
---|---|
System.String |
fieldInstances
Eventual fields. Fields can be added for an Action implementation thanks to the attribute @link PiXYZ.Tools.UserParameter @endlink.
Declaration
public FieldInstance[] fieldInstances { get; protected set; }
Property Value
Type | Description |
---|---|
FieldInstance[] |
helpersMethods
Eventual helper methods. Helper methods can be added for an Action implementation thanks to the attribute @link PiXYZ.Tools.HelperMethod @endlink.
Declaration
public MethodInfo[] helpersMethods { get; protected set; }
Property Value
Type | Description |
---|---|
MethodInfo[] |
id
The id of the Acton implementation. This id should be unique and is readonly (written in code). The id is the actual reference if the Action is serialized (in a set of RuleEngine Rules for example), hence, this shouldn't be changed if possible when someone uses it.
Declaration
public abstract int id { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
inputType
Specifies what kind of data enters your actions.
Declaration
public abstract Type inputType { get; }
Property Value
Type | Description |
---|---|
System.Type |
isInRuleEngine
Returns true if this Action is available trough the RuleEngine.
Declaration
public bool isInRuleEngine { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
isInToolbox
Returns true if this Action is available trough the Toolbox.
Declaration
public bool isInToolbox { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
menuPathRuleEngine
The menu path for the RuleEngine. Use forward slashes for submenus (ex:"Custom/My Custom Action") If left null or empty, this Action won't be listed in the RuleEngine.
Declaration
public virtual string menuPathRuleEngine { get; }
Property Value
Type | Description |
---|---|
System.String |
menuPathToolbox
The menu path for the Toolbox. Use forward slashes for submenus (ex:"Custom/My Custom Action") If left null or empty, this Action won't be listed in the Toolbox.
Declaration
public virtual string menuPathToolbox { get; }
Property Value
Type | Description |
---|---|
System.String |
order
The order to use when placing this action in a list. If the value is -1, the display name will be used instead;
Declaration
public virtual int order { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
outputType
Specifies what kind of data the actions outputs.
Declaration
public abstract Type outputType { get; }
Property Value
Type | Description |
---|---|
System.Type |
tooltip
Returns the tooltip.
Declaration
public virtual string tooltip { get; }
Property Value
Type | Description |
---|---|
System.String |
undo
Undo Action.
Declaration
public virtual Action undo { get; }
Property Value
Type | Description |
---|---|
System.Action |
Methods
getErrors()
Virtual method for Error checks before execution. Returning a non null string array will display each string as an Error on the RuleEngine and Toolbox.
Declaration
public virtual string[] getErrors()
Returns
Type | Description |
---|---|
System.String[] |
getInfos()
Virtual method for Info checks before execution. Returning a non null string array will display each string as an Information on the RuleEngine and Toolbox.
Declaration
public virtual string[] getInfos()
Returns
Type | Description |
---|---|
System.String[] |
getWarnings()
Virtual method for Warning checks before execution. Returning a non null string array will display each string as a Warning on the RuleEngine and Toolbox.
Declaration
public virtual string[] getWarnings()
Returns
Type | Description |
---|---|
System.String[] |
initialize()
Initialize parameters from RuleEngineParameters attributes.
Declaration
public virtual void initialize()
invoke(Object)
Runs the action through reflection
Declaration
public object invoke(object data)
Parameters
Type | Name | Description |
---|---|---|
System.Object | data |
Returns
Type | Description |
---|---|
System.Object |
onAfterDraw()
Declaration
public virtual void onAfterDraw()
onBeforeDraw()
Virtual method for implementing operations before the Action gets drawn in the RuleEngine or the Toolbox.
Declaration
public virtual void onBeforeDraw()