PwshScriptRunner Class

Summary

Runs Pwsh scripts on the command line
Assembly
Cake.Powershell.dll
Namespace
Cake.Powershell.Runner
Base Types
  • Tool<ToolSettings>
graph BT Type-->Base0["Tool<ToolSettings>"] Type["PwshScriptRunner"] class Type type-node

Syntax

public class PwshScriptRunner : Tool<ToolSettings>

Constructors

Methods

Name Value Summary
GetToolExecutableNames() IEnumerable<string>
Gets the possible names of the tool executable.
GetToolName() string
Gets the name of the tool.
RunScript(string, PowershellSettings) void
Runs `pwsh` against the script and settings provided

Extension Methods

Name Value Summary
Dump<PwshScriptRunner>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<PwshScriptRunner>(PwshScriptRunner[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<PwshScriptRunner>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<PwshScriptRunner>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
ThrowIfNull<PwshScriptRunner>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<PwshScriptRunner>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin