SqliteActionRepository
[Serializable]public sealed class SqliteActionRepositoryImplementation of IActionRepository that uses AssetInventory’s SQLite database via CustomAction and CustomActionStep tables.
Methods
Section titled “Methods”
GetAllActions()
Section titled “GetAllActions()”public List<ActionDefinition> GetAllActions()Gets all action definitions.
Returns
System.Collections.Generic.List{Automator.ActionDefinition} — List of all actions
GetAction(int)
Section titled “GetAction(int)”public ActionDefinition GetAction(int id)Gets a single action by ID.
Parameters
| Name | Type | Description |
|---|---|---|
id |
System.Int32 | The action ID |
Returns
Automator.ActionDefinition — The action, or null if not found
GetActionByName(string)
Section titled “GetActionByName(string)”public ActionDefinition GetActionByName(string name)Gets a single action by name.
Parameters
| Name | Type | Description |
|---|---|---|
name |
System.String | The action name |
Returns
Automator.ActionDefinition — The action, or null if not found
SaveAction(ActionDefinition)
Section titled “SaveAction(ActionDefinition)”public ActionDefinition SaveAction(ActionDefinition action)Saves an action (insert or update).
Parameters
| Name | Type | Description |
|---|---|---|
action |
Automator.ActionDefinition | The action to save |
Returns
Automator.ActionDefinition — The saved action with updated ID if inserted
DeleteAction(int)
Section titled “DeleteAction(int)”public void DeleteAction(int id)Deletes an action and its steps.
Parameters
| Name | Type | Description |
|---|---|---|
id |
System.Int32 | The action ID to delete |
GetSteps(int)
Section titled “GetSteps(int)”public List<ActionStepDefinition> GetSteps(int actionId)Gets all steps for an action.
Parameters
| Name | Type | Description |
|---|---|---|
actionId |
System.Int32 | The action ID |
Returns
System.Collections.Generic.List{Automator.ActionStepDefinition} — List of steps ordered by OrderIndex
SaveStep(ActionStepDefinition)
Section titled “SaveStep(ActionStepDefinition)”public ActionStepDefinition SaveStep(ActionStepDefinition step)Saves a step (insert or update).
Parameters
| Name | Type | Description |
|---|---|---|
step |
Automator.ActionStepDefinition | The step to save |
Returns
Automator.ActionStepDefinition — The saved step with updated ID if inserted
DeleteStep(int)
Section titled “DeleteStep(int)”public void DeleteStep(int id)Deletes a step.
Parameters
| Name | Type | Description |
|---|---|---|
id |
System.Int32 | The step ID to delete |
DeleteStepsExcept(int, List)
Section titled “DeleteStepsExcept(int, List)”public void DeleteStepsExcept(int actionId, List<int> keepStepIds)Deletes all steps for an action that are not in the given list of IDs.
Parameters
| Name | Type | Description |
|---|---|---|
actionId |
System.Int32 | The action ID |
keepStepIds |
System.Collections.Generic.List{System.Int32} | Step IDs to keep |
Save()
Section titled “Save()”public void Save()Persists any pending changes (for file-based repositories).