Tool<TSettings> Class

Summary

Base class for tools.
graph BT Type-->Base0["object"] Type["Tool<TSettings>"] class Type type-node Derived0["CandleRunner"]-->Type click Derived0 "/api/Cake.Common.Tools.WiX/CandleRunner" Derived1["DupFinderRunner"]-->Type click Derived1 "/api/Cake.Common.Tools.DupFinder/DupFinderRunner" Derived2["XBuildRunner"]-->Type click Derived2 "/api/Cake.Common.Tools.XBuild/XBuildRunner" Derived3["DotNetTool<TSettings>"]-->Type click Derived3 "/api/Cake.Common.Tools.DotNet/DotNetTool_1" Derived4["DotCoverTool<TSettings>"]-->Type click Derived4 "/api/Cake.Common.Tools.DotCover/DotCoverTool_1" Derived5["ChocolateyTool<TSettings>"]-->Type click Derived5 "/api/Cake.Common.Tools.Chocolatey/ChocolateyTool_1" Derived6["VSWhereTool<TSettings>"]-->Type click Derived6 "/api/Cake.Common.Tools.VSWhere/VSWhereTool_1" Derived7["GitReleaseNotesRunner"]-->Type click Derived7 "/api/Cake.Common.Tools.GitReleaseNotes/GitReleaseNotesRunner" Derived8["GitLinkRunner"]-->Type click Derived8 "/api/Cake.Common.Tools.GitLink/GitLinkRunner" Derived9["ReportGeneratorRunner"]-->Type click Derived9 "/api/Cake.Common.Tools.ReportGenerator/ReportGeneratorRunner" Derived10["CakeRunner"]-->Type click Derived10 "/api/Cake.Common.Tools.Cake/CakeRunner" Derived11["ReportUnitRunner"]-->Type click Derived11 "/api/Cake.Common.Tools.ReportUnit/ReportUnitRunner" Derived12["XUnit2Runner"]-->Type click Derived12 "/api/Cake.Common.Tools.XUnit/XUnit2Runner" Derived13["GitVersionRunner"]-->Type click Derived13 "/api/Cake.Common.Tools.GitVersion/GitVersionRunner" Derived14["VSTestRunner"]-->Type click Derived14 "/api/Cake.Common.Tools.VSTest/VSTestRunner" Derived15["FixieRunner"]-->Type click Derived15 "/api/Cake.Common.Tools.Fixie/FixieRunner" Derived16["SignToolSignRunner"]-->Type click Derived16 "/api/Cake.Common.Tools.SignTool/SignToolSignRunner" Derived17["GitLink3Runner"]-->Type click Derived17 "/api/Cake.Common.Tools.GitLink/GitLink3Runner" Derived18["RoundhouseRunner"]-->Type click Derived18 "/api/Cake.Common.Tools.Roundhouse/RoundhouseRunner" Derived19["SpecFlowTool<TSettings>"]-->Type click Derived19 "/api/Cake.Common.Tools.SpecFlow/SpecFlowTool_1" Derived20["NUnitRunner"]-->Type click Derived20 "/api/Cake.Common.Tools.NUnit/NUnitRunner" Derived21["NUnit3Runner"]-->Type click Derived21 "/api/Cake.Common.Tools.NUnit/NUnit3Runner" Derived22["CommandRunner"]-->Type click Derived22 "/api/Cake.Common.Tools.Command/CommandRunner" Derived23["GitReleaseManagerTool<TSettings>"]-->Type click Derived23 "/api/Cake.Common.Tools.GitReleaseManager/GitReleaseManagerTool_1" Derived24["XUnitRunner"]-->Type click Derived24 "/api/Cake.Common.Tools.XUnit/XUnitRunner" Derived25["InspectCodeRunner"]-->Type click Derived25 "/api/Cake.Common.Tools.InspectCode/InspectCodeRunner" Derived26["MakeNSISRunner"]-->Type click Derived26 "/api/Cake.Common.Tools.NSIS/MakeNSISRunner" Derived27["LightRunner"]-->Type click Derived27 "/api/Cake.Common.Tools.WiX/LightRunner" Derived28["TextTransformRunner"]-->Type click Derived28 "/api/Cake.Common.Tools.TextTransform/TextTransformRunner" Derived29["ILMergeRunner"]-->Type click Derived29 "/api/Cake.Common.Tools.ILMerge/ILMergeRunner" Derived30["ILRepackRunner"]-->Type click Derived30 "/api/Cake.Common.Tools.ILRepack/ILRepackRunner" Derived31["OctopusDeployTool<TSettings>"]-->Type click Derived31 "/api/Cake.Common.Tools.OctopusDeploy/OctopusDeployTool_1" Derived32["OpenCoverRunner"]-->Type click Derived32 "/api/Cake.Common.Tools.OpenCover/OpenCoverRunner" Derived33["MSTestRunner"]-->Type click Derived33 "/api/Cake.Common.Tools.MSTest/MSTestRunner" Derived34["NuGetTool<TSettings>"]-->Type click Derived34 "/api/Cake.Common.Tools.NuGet/NuGetTool_1" Derived35["MSpecRunner"]-->Type click Derived35 "/api/Cake.Common.Tools.MSpec/MSpecRunner" Derived36["MSBuildRunner"]-->Type click Derived36 "/api/Cake.Common.Tools.MSBuild/MSBuildRunner" Derived37["InnoSetupRunner"]-->Type click Derived37 "/api/Cake.Common.Tools.InnoSetup/InnoSetupRunner" Derived38["HeatRunner"]-->Type click Derived38 "/api/Cake.Common.Tools.WiX.Heat/HeatRunner"

Syntax

public abstract class Tool<TSettings> where TSettings : ToolSettings

Type Parameters

Name Description
TSettings The settings type.

Constructors

Name Summary
Tool(IFileSystem, ICakeEnvironment, IProcessRunner, IToolLocator) Initializes a new instance of the Tool<TSettings> class.

Methods

Name Value Summary
GetAlternativeToolPaths(TSettings) IEnumerable<FilePath>
Gets alternative file paths which the tool may exist in.
GetEnvironmentVariables(TSettings) IDictionary<string, string>
Gets the environment variables.
GetToolExecutableNames() IEnumerable<string>
Gets the possible names of the tool executable.
GetToolExecutableNames(TSettings) IEnumerable<string>
Gets the possible names of the tool executable.
GetToolName() string
Gets the name of the tool.
GetToolPath(TSettings) FilePath
Gets the resolved tool path.
GetWorkingDirectory(TSettings) DirectoryPath
Gets the working directory. Defaults to the currently set working directory.
ProcessExitCode(int) void
Customized exit code handling. Standard behavior is to fail when non zero.
Run(TSettings, ProcessArgumentBuilder, ProcessSettings, Action<IProcess>) void
Runs the tool using a custom tool path and the specified settings.
Run(TSettings, ProcessArgumentBuilder) void
Runs the tool using the specified settings.
RunProcess(TSettings, ProcessArgumentBuilder, ProcessSettings) IProcess
Runs the tool using a custom tool path and the specified settings.
RunProcess(TSettings, ProcessArgumentBuilder) IProcess
Runs the tool using a custom tool path and the specified settings.

Extension Methods

Name Value Summary
Dump<Tool<TSettings>>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<Tool<TSettings>>(Tool<TSettings>[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<Tool<TSettings>>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<Tool<TSettings>>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
ThrowIfNull<Tool<TSettings>>(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
ThrowIfNull<Tool<TSettings>>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin