ToolSettings Class

Summary

Base class for tool settings.
graph BT Type-->Base0["object"] Type["ToolSettings"] class Type type-node Derived0["GitLink3Settings"]-->Type click Derived0 "/api/Cake.Common.Tools.GitLink/GitLink3Settings" Derived1["GitReleaseNotesSettings"]-->Type click Derived1 "/api/Cake.Common.Tools.GitReleaseNotes/GitReleaseNotesSettings" Derived2["NuGetListSettings"]-->Type click Derived2 "/api/Cake.Common.Tools.NuGet.List/NuGetListSettings" Derived3["VSTestSettings"]-->Type click Derived3 "/api/Cake.Common.Tools.VSTest/VSTestSettings" Derived4["NuGetSetApiKeySettings"]-->Type click Derived4 "/api/Cake.Common.Tools.NuGet.SetApiKey/NuGetSetApiKeySettings" Derived5["DotNetSettings"]-->Type click Derived5 "/api/Cake.Common.Tools.DotNet/DotNetSettings" Derived6["NuGetRestoreSettings"]-->Type click Derived6 "/api/Cake.Common.Tools.NuGet.Restore/NuGetRestoreSettings" Derived7["OpenCoverSettings"]-->Type click Derived7 "/api/Cake.Common.Tools.OpenCover/OpenCoverSettings" Derived8["InnoSetupSettings"]-->Type click Derived8 "/api/Cake.Common.Tools.InnoSetup/InnoSetupSettings" Derived9["NuGetUpdateSettings"]-->Type click Derived9 "/api/Cake.Common.Tools.NuGet.Update/NuGetUpdateSettings" Derived10["SignToolSignSettings"]-->Type click Derived10 "/api/Cake.Common.Tools.SignTool/SignToolSignSettings" Derived11["CandleSettings"]-->Type click Derived11 "/api/Cake.Common.Tools.WiX/CandleSettings" Derived12["GitReleaseManagerSettings"]-->Type click Derived12 "/api/Cake.Common.Tools.GitReleaseManager/GitReleaseManagerSettings" Derived13["TextTransformSettings"]-->Type click Derived13 "/api/Cake.Common.Tools.TextTransform/TextTransformSettings" Derived14["NuGetDeleteSettings"]-->Type click Derived14 "/api/Cake.Common.Tools.NuGet.Delete/NuGetDeleteSettings" Derived15["NuGetPackSettings"]-->Type click Derived15 "/api/Cake.Common.Tools.NuGet.Pack/NuGetPackSettings" Derived16["NuGetPushSettings"]-->Type click Derived16 "/api/Cake.Common.Tools.NuGet.Push/NuGetPushSettings" Derived17["MSpecSettings"]-->Type click Derived17 "/api/Cake.Common.Tools.MSpec/MSpecSettings" Derived18["VSWhereSettings"]-->Type click Derived18 "/api/Cake.Common.Tools.VSWhere/VSWhereSettings" Derived19["NuGetInstallSettings"]-->Type click Derived19 "/api/Cake.Common.Tools.NuGet.Install/NuGetInstallSettings" Derived20["GitLinkSettings"]-->Type click Derived20 "/api/Cake.Common.Tools.GitLink/GitLinkSettings" Derived21["XUnit2Settings"]-->Type click Derived21 "/api/Cake.Common.Tools.XUnit/XUnit2Settings" Derived22["CakeSettings"]-->Type click Derived22 "/api/Cake.Common.Tools.Cake/CakeSettings" Derived23["NUnitSettings"]-->Type click Derived23 "/api/Cake.Common.Tools.NUnit/NUnitSettings" Derived24["NuGetInitSettings"]-->Type click Derived24 "/api/Cake.Common.Tools.NuGet.Init/NuGetInitSettings" Derived25["MakeNSISSettings"]-->Type click Derived25 "/api/Cake.Common.Tools.NSIS/MakeNSISSettings" Derived26["ILRepackSettings"]-->Type click Derived26 "/api/Cake.Common.Tools.ILRepack/ILRepackSettings" Derived27["ILMergeSettings"]-->Type click Derived27 "/api/Cake.Common.Tools.ILMerge/ILMergeSettings" Derived28["LightSettings"]-->Type click Derived28 "/api/Cake.Common.Tools.WiX/LightSettings" Derived29["InspectCodeSettings"]-->Type click Derived29 "/api/Cake.Common.Tools.InspectCode/InspectCodeSettings" Derived30["NUnit3Settings"]-->Type click Derived30 "/api/Cake.Common.Tools.NUnit/NUnit3Settings" Derived31["MSTestSettings"]-->Type click Derived31 "/api/Cake.Common.Tools.MSTest/MSTestSettings" Derived32["CommandSettings"]-->Type click Derived32 "/api/Cake.Common.Tools.Command/CommandSettings" Derived33["NuGetSetProxySettings"]-->Type click Derived33 "/api/Cake.Common.Tools.NuGet.SetProxy/NuGetSetProxySettings" Derived34["RoundhouseSettings"]-->Type click Derived34 "/api/Cake.Common.Tools.Roundhouse/RoundhouseSettings" Derived35["DotCoverSettings"]-->Type click Derived35 "/api/Cake.Common.Tools.DotCover/DotCoverSettings" Derived36["DupFinderSettings"]-->Type click Derived36 "/api/Cake.Common.Tools.DupFinder/DupFinderSettings" Derived37["NuGetSourcesSettings"]-->Type click Derived37 "/api/Cake.Common.Tools.NuGet.Sources/NuGetSourcesSettings" Derived38["HeatSettings"]-->Type click Derived38 "/api/Cake.Common.Tools.WiX.Heat/HeatSettings" Derived39["ReportUnitSettings"]-->Type click Derived39 "/api/Cake.Common.Tools.ReportUnit/ReportUnitSettings" Derived40["OctopusDeployToolSettings"]-->Type click Derived40 "/api/Cake.Common.Tools.OctopusDeploy/OctopusDeployToolSettings" Derived41["SpecFlowSettings"]-->Type click Derived41 "/api/Cake.Common.Tools.SpecFlow/SpecFlowSettings" Derived42["XBuildSettings"]-->Type click Derived42 "/api/Cake.Common.Tools.XBuild/XBuildSettings" Derived43["ChocolateySettings"]-->Type click Derived43 "/api/Cake.Common.Tools.Chocolatey/ChocolateySettings" Derived44["GitVersionSettings"]-->Type click Derived44 "/api/Cake.Common.Tools.GitVersion/GitVersionSettings" Derived45["MSBuildSettings"]-->Type click Derived45 "/api/Cake.Common.Tools.MSBuild/MSBuildSettings" Derived46["ReportGeneratorSettings"]-->Type click Derived46 "/api/Cake.Common.Tools.ReportGenerator/ReportGeneratorSettings" Derived47["NuGetAddSettings"]-->Type click Derived47 "/api/Cake.Common.Tools.NuGet.Add/NuGetAddSettings" Derived48["FixieSettings"]-->Type click Derived48 "/api/Cake.Common.Tools.Fixie/FixieSettings" Derived49["XUnitSettings"]-->Type click Derived49 "/api/Cake.Common.Tools.XUnit/XUnitSettings"

Syntax

public class ToolSettings

Properties

Name Value Summary
ArgumentCustomization Func<ProcessArgumentBuilder, ProcessArgumentBuilder>
Gets or sets the argument customization. Argument customization is a way that lets you add, replace or reuse arguments passed to a tool. This allows you to support new tool arguments, customize arguments or address potential argument issues.
EnvironmentVariables IDictionary<string, string>
Gets or sets search paths for files, directories for temporary files, application-specific options, and other similar information.
HandleExitCode Func<int, bool>
Gets or sets whether the exit code from the tool process causes an exception to be thrown.

If the delegate is null (the default) or returns false, then an exception is thrown upon a non-zero exit code.

If the delegate returns true then no exception is thrown.

This can be useful when the exit code should be ignored, or if there is a desire to apply logic that is conditional on the exit code value.

NoWorkingDirectory bool
Gets or sets a value indicating whether or not to opt out of using an explicit working directory for the process.
PostAction Action<IProcess>
Gets or sets a delegate which is executed after the process was started.
SetupProcessSettings Action<ProcessSettings>
Gets or sets a delegate to configure the process settings.
ToolPath FilePath
Gets or sets the tool path.
ToolTimeout TimeSpan?
Gets or sets optional timeout for tool execution.
WorkingDirectory DirectoryPath
Gets or sets the working directory for the tool process.

Extension Methods

Name Value Summary
Dump<ToolSettings>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<ToolSettings>(ToolSettings[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<ToolSettings>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<ToolSettings>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
ThrowIfNull<ToolSettings>(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<ToolSettings>(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
WithArgumentCustomization<ToolSettings>(Func<ProcessArgumentBuilder, ProcessArgumentBuilder>) T
Sets the tool argument customization delegate.
WithEnvironmentVariable<ToolSettings>(string, string) T
Sets or adds tool environment variable.
WithExpectedExitCode<ToolSettings>(int) T
Sets expected exit code using WithHandleExitCode<T>(T, Func<int, bool>).
WithHandleExitCode<ToolSettings>(Func<int, bool>) T
Sets delegate whether the exit code from the tool process causes an exception to be thrown.
WithNoWorkingDirectory<ToolSettings>(bool) T
Sets whether the tool should use a working directory or not.
WithPostAction<ToolSettings>(Action<IProcess>) T
Sets a delegate which is executed after the tool process was started.
WithSetupProcessSettings<ToolSettings>(Action<ProcessSettings>) T
Sets a delegate to configure the process settings.
WithToolPath<ToolSettings>(FilePath) T
Sets the tool path.
WithToolSettings<ToolSettings>(Action<ToolSettings>) T
Provides fluent null guarded tool settings action.
WithToolTimeout<ToolSettings>(TimeSpan) T
Sets the tool timeout.
WithWorkingDirectory<ToolSettings>(DirectoryPath) T
Sets the tool working directory.