Class RunInlinePowerShellAction
Represents a plugin prerequisite action runs inline powershell
Inherited Members
Namespace: Artemis.Core
Assembly: Artemis.Core.dll
Syntax
public class RunInlinePowerShellAction : PluginPrerequisiteAction
Constructors
RunInlinePowerShellAction(string, string, bool, string?)
Creates a new instance of a copy folder action
Declaration
public RunInlinePowerShellAction(string name, string code, bool elevate = false, string? arguments = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the action |
string | code | The inline code to run |
bool | elevate | A boolean indicating whether the file should run with administrator privileges |
string | arguments | Optional arguments to pass to your script, you are responsible for proper quoting etc. Arguments are available in PowerShell as |
Properties
Arguments
Gets optional arguments to pass to your script, you are responsible for proper quoting etc.
Arguments are available in PowerShell as $args[0], $args[1]
etc.
Declaration
public string? Arguments { get; }
Property Value
Type | Description |
---|---|
string |
Code
Gets the inline code to run
Declaration
public string Code { 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 |
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 |