IScriptHost Interface

Summary

Represents a script host that works as a context for scripts.
graph BT Type["IScriptHost"] class Type type-node Implementing0["BuildScriptHost<TContext>"]-.->Type click Implementing0 "/api/Cake.Cli/BuildScriptHost_1" Implementing1["DryRunScriptHost<TContext>"]-.->Type click Implementing1 "/api/Cake.Cli/DryRunScriptHost_1" Implementing2["BuildScriptHost"]-.->Type click Implementing2 "/api/Cake.Cli/BuildScriptHost" Implementing3["DescriptionScriptHost"]-.->Type click Implementing3 "/api/Cake.Cli/DescriptionScriptHost" Implementing4["ScriptHost"]-.->Type click Implementing4 "/api/Cake.Core.Scripting/ScriptHost" Implementing5["DryRunScriptHost"]-.->Type click Implementing5 "/api/Cake.Cli/DryRunScriptHost" Implementing6["TreeScriptHost"]-.->Type click Implementing6 "/api/Cake.Cli/TreeScriptHost"

Syntax

public interface IScriptHost

Properties

Name Value Summary
Context ICakeContext
Gets the context.
Settings ExecutionSettings
Gets the execution settings.
Tasks IReadOnlyList<ICakeTaskInfo>
Gets all registered tasks.

Methods

Name Value Summary
RunTarget(string) CakeReport
Runs the specified target.
RunTargetAsync(string) Task<CakeReport>
Runs the specified target.
RunTargets(IEnumerable<string>) CakeReport
Runs the specified targets.
RunTargetsAsync(IEnumerable<string>) Task<CakeReport>
Runs the specified targets.
Setup(Action<ISetupContext>) 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<TData>(Func<ISetupContext, TData>) 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(string) CakeTaskBuilder
Registers a new task.
TaskOf<TData>(string) CakeTaskBuilder<TData>
Registers a new task.
TaskSetup(Action<ITaskSetupContext>) 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<TData>(Action<ITaskSetupContext, TData>) 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(Action<ITaskTeardownContext>) 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<TData>(Action<ITaskTeardownContext, TData>) 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(Action<ITeardownContext>) 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<TData>(Action<ITeardownContext, TData>) 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<IScriptHost>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<IScriptHost>(IScriptHost[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<IScriptHost>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<IScriptHost>(string) void
Requires the Cake.Issues addin
ThrowIfNull<IScriptHost>(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<IScriptHost>(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
ToStringWithNullMarkup() string
Requires the Cake.Issues addin