IScriptHost Interface

Summary

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

Syntax

public interface IScriptHost

Properties

Name Value Summary
Context ICakeContext
Gets the context.
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.
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.
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
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
ThrowIfNull<IScriptHost>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator 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