ToolSettings Class

Summary

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

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
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
ToStringWithNullMarkup() string
Requires the Cake.Issues 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.