Summary
Represents a script host that works as a context for scripts.
- Namespace
- Cake
.Core .Scripting - Implementing Types
graph BT
Type["IScriptHost"]
class Type type-node
Implementing0["DescriptionScriptHost"]-.->Type
click Implementing0 "/api/Cake.Cli/DescriptionScriptHost"
Implementing1["TreeScriptHost"]-.->Type
click Implementing1 "/api/Cake.Cli/TreeScriptHost"
Implementing2["BuildScriptHost"]-.->Type
click Implementing2 "/api/Cake.Cli/BuildScriptHost"
Implementing3["DryRunScriptHost"]-.->Type
click Implementing3 "/api/Cake.Cli/DryRunScriptHost"
Implementing4["DryRunScriptHost<TContext>"]-.->Type
click Implementing4 "/api/Cake.Cli/DryRunScriptHost_1"
Implementing5["BuildScriptHost<TContext>"]-.->Type
click Implementing5 "/api/Cake.Cli/BuildScriptHost_1"
Implementing6["ScriptHost"]-.->Type
click Implementing6 "/api/Cake.Core.Scripting/ScriptHost"
Syntax
public interface IScriptHost
Properties
Name | Value | Summary |
---|---|---|
Context | ICakeContext |
Gets the context.
|
Settings | ExecutionSettings |
Gets the execution settings.
|
Tasks | IReadOnlyList |
Gets all registered tasks.
|
Methods
Name | Value | Summary |
---|---|---|
RunTarget |
CakeReport |
Runs the specified target.
|
RunTargetAsync |
Task |
Runs the specified target.
|
RunTargets |
CakeReport |
Runs the specified targets.
|
RunTargetsAsync |
Task |
Runs the specified targets.
|
Setup |
void |
Allows registration of an action that's executed before any tasks are run.
If setup fails, no tasks will be executed but teardown will be performed.
|
Setup |
void |
Allows registration of an action that's executed before any tasks are run.
If setup fails, no tasks will be executed but teardown will be performed.
|
Task |
CakeTaskBuilder |
Registers a new task.
|
TaskOf |
CakeTaskBuilder |
Registers a new task.
|
TaskSetup |
void |
Allows registration of an action that's executed before each task is run.
If the task setup fails, its task will not be executed but the task teardown will be performed.
|
TaskSetup |
void |
Allows registration of an action that's executed before each task is run.
If the task setup fails, its task will not be executed but the task teardown will be performed.
|
TaskTeardown |
void |
Allows registration of an action that's executed after each task has been run.
If a task setup action or a task fails with or without recovery, the specified task teardown action will still be executed.
|
TaskTeardown |
void |
Allows registration of an action that's executed after each task has been run.
If a task setup action or a task fails with or without recovery, the specified task teardown action will still be executed.
|
Teardown |
void |
Allows registration of an action that's executed after all other tasks have been run.
If a setup action or a task fails with or without recovery, the specified teardown action will still be executed.
|
Teardown |
void |
Allows registration of an action that's executed after all other tasks have been run.
If a setup action or a task fails with or without recovery, the specified teardown action will still be executed.
|
Extension Methods
Name | Value | Summary |
---|---|---|
Dump |
string |
Get a basic string representation of specified object.
From LoggingExtensions
Requires the Cake.Incubator addin
|
IsIn |
bool |
Checks if the source is contained in a list
From EnumerableExtensions
Requires the Cake.Incubator addin
|
NotNull |
void |
Throws an exception if the specified parameter's value is null.
From IssuesArgumentChecks
Requires the Cake.Issues addin
|
NotNull |
void |
Throws an exception if the specified parameter's value is null.
From Extensions
Requires the Cake.Ftp addin
|
ThrowIfNull |
T |
Throws a
System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
From AssertExtensions
Requires the Cake.Incubator addin
|
ThrowIfNull |
T |
Throws a
System.ArgumentNullException if the value is null, otherwise returns the value
From AssertExtensions
Requires the Cake.Incubator addin
|
ToDictionary |
IDictionary |
From ObjectHelpers
Requires the Cake.DeployParams addin
|
To |
string |
Returns the string value or a
Not set > markup suitable for Spectre.Console.
From StringExtensions
Requires the Cake.Issues addin
|