Class ExecuteFileAction
Represents a plugin prerequisite action that executes a file
Inherited Members
Namespace: Artemis.Core
Assembly: Artemis.Core.dll
Syntax
public class ExecuteFileAction : PluginPrerequisiteAction
Constructors
ExecuteFileAction(string, string, string?, bool, bool)
Creates a new instance of ExecuteFileAction
Declaration
public ExecuteFileAction(string name, string fileName, string? arguments = null, bool waitForExit = true, bool elevate = false)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the action |
| string | fileName | The target file to execute |
| string | arguments | A set of command-line arguments to use when starting the application |
| bool | waitForExit | A boolean indicating whether the action should wait for the process to exit |
| bool | elevate | A boolean indicating whether the file should run with administrator privileges |
Properties
Arguments
Gets a set of command-line arguments to use when starting the application
Declaration
public string? Arguments { get; }
Property Value
| Type | Description |
|---|---|
| string |
Elevate
Gets a boolean indicating whether the file should run with administrator privileges
Declaration
public bool Elevate { get; }
Property Value
| Type | Description |
|---|---|
| bool |
FileName
Gets the target file to execute
Declaration
public string FileName { get; }
Property Value
| Type | Description |
|---|---|
| string |
WaitForExit
Gets a boolean indicating whether the action should wait for the process to exit
Declaration
public bool WaitForExit { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
Execute(CancellationToken)
Called when the action must execute
Declaration
public override Task Execute(CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task |