CakeTask Class

Summary

A CakeTask represents a unit of work.
Namespace
Cake.Core
Interfaces
Base Types
  • object
graph BT Type-->Base0["object"] Type-.->Interface0["ICakeTaskInfo"] click Interface0 "/api/Cake.Core/ICakeTaskInfo" Type["CakeTask"] class Type type-node

Syntax

public sealed class CakeTask : ICakeTaskInfo

Constructors

Name Summary
CakeTask(string) Initializes a new instance of the CakeTask class.

Properties

Name Value Summary
Actions List<Func<ICakeContext, Task>>
Gets the task's actions.
Criterias List<CakeTaskCriteria>
Gets the task's criterias.
DeferExceptions bool
Gets or sets a value indicating whether gets the task's state if it will defer exceptions until the end of the task.
DelayedActions Queue<Action<ICakeContext>>
Gets the task's actions that are run at execution time to additionally populate Actions.
Dependees List<CakeTaskDependency>
Gets the tasks that the task want to be a dependency of.
Dependencies List<CakeTaskDependency>
Gets the task's dependencies.
Description string
Gets or sets the description of the task.
ErrorHandler Action<Exception, ICakeContext>
Gets or sets the error handler.
ErrorReporter Action<Exception>
Gets or sets the error reporter.
FinallyHandler Action
Gets or sets the finally handler.
Name string
Gets the name of the task.

Methods

Name Value Summary
Execute(ICakeContext) Task
Executes the task using the specified context.

Extension Methods

Name Value Summary
AddAction(Func<ICakeContext, Task>) void
Adds the action to the task's actions.
AddCriteria(Func<ICakeContext, bool>, string) void
Adds to the task's criteria.
AddDelayedAction(Action<ICakeContext>) void
Adds the action to the task's delayed actions.
AddDependee(string, bool) void
Adds the dependee to the task's dependees.
AddDependency(string, bool) void
Adds the dependency to the task's dependencies.
Dump<CakeTask>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<CakeTask>(CakeTask[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<CakeTask>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<CakeTask>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
SetDeferExceptions(bool) void
Sets the task's defer exceptions state.
SetErrorHandler(Action<Exception, ICakeContext>) void
Sets the task's error handler.
SetErrorReporter(Action<Exception>) void
Sets the task's error reporter.
SetFinallyHandler(Action) void
Sets the task's finally handler.
ThrowIfNull<CakeTask>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<CakeTask>(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