Tool<TSettings> Class

Summary

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

Syntax

public abstract class Tool<TSettings> where TSettings : ToolSettings

Type Parameters

Name Description
TSettings The settings type.

Constructors

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.
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) void
Runs the tool using the specified settings.
Run(TSettings, ProcessArgumentBuilder, ProcessSettings, Action<IProcess>) void
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.
RunProcess(TSettings, ProcessArgumentBuilder, ProcessSettings) 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.Issues addin
NotNull<Tool<TSettings>>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
ThrowIfNull<Tool<TSettings>>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator 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