DryRunAliases.

IsDryRun(ICakeContext) Method

Summary

Determines whether or not the current script execution is a dry run.
Namespace
Cake.Common
Containing Type
DryRunAliases

Syntax

[CakeMethodAlias]
public static bool IsDryRun(this ICakeContext context)

Examples

Setup(context =>
{
    if (!context.IsDryRun())
    {
        // Do things that you don't want to
        // do during a dry run.
    }
});

Attributes

Type Description
CakeMethodAliasAttribute An attribute used to mark script method aliases.

Parameters

Name Type Description
context ICakeContext The context.

Return Value

Type Description
bool Whether or not the current script execution is a dry run.