ScriptHost.

TaskSetup<TData>(Action<ITaskSetupContext, TData>) Method

Summary

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

Syntax

public void TaskSetup<TData>(Action<ITaskSetupContext, TData> action) where TData : class

Type Parameters

Name Description
TData The data type.

Parameters

Name Type Description
action Action<ITaskSetupContext, TData> The action to be executed.

Return Value

Type Description
void