IScriptHost.

Setup(Action<ISetupContext>) Method

Summary

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.
Namespace
Cake.Core.Scripting
Containing Type
IScriptHost

Syntax

void Setup(Action<ISetupContext> action)

Examples

Setup(context => {
  context.Log.Information("Hello World!");
});

Parameters

Name Type Description
action Action<ISetupContext> The action to be executed.

Return Value

Type Description
void