DownloadToolSettings Class

Summary

A typed description of a download: tool for the DownloadTool alias. Each property maps to one directive parameter, and unset properties keep the directive's defaults. Nothing is validated until the tool is installed.
Assembly
Cake.Download.Module.dll
Namespace
Cake.Download.Module
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["DownloadToolSettings"] class Type type-node

Syntax

public sealed class DownloadToolSettings

Attributes

Type Description
NullableContextAttribute
NullableAttribute

Constructors

Name Summary
DownloadToolSettings()

Properties

Name Value Summary
ArchiveOverrides IDictionary<string, string>
Gets {archive} overrides, keyed by the dialect's default {os} value (archive.<os>).
ArchOverrides IDictionary<string, string>
Gets {arch} overrides, keyed by the dialect's default value (arch.<value>).
ChecksumsFile string
Gets or sets the checksums file, relative to the download URL or absolute (checksums).
ChecksumsFileSha256 string
Gets or sets the SHA-256 of the checksums file itself (checksums_sha256).
Dialect Nullable<DownloadDialect>
Gets or sets the placeholder dialect (dialect); Go when not set.
Exclude IList<string>
Gets the globs removed from the Include result (exclude).
FileName string
Gets or sets the file name for a raw download (filename).
Format Nullable<DownloadFormat>
Gets or sets the download format (format); detected from the URL when not set.
Include IList<string>
Gets the globs choosing the files to register (include).
OsOverrides IDictionary<string, string>
Gets {os} overrides, keyed by the dialect's default value (os.<value>).
Package string
Gets or sets the tool name (package): install folder, default file name and default include.
Sha256 string
Gets or sets the SHA-256 of the download on every platform (sha256).
Sha256ByPlatform IDictionary<string, string>
Gets the SHA-256 of the download per .NET RID (sha256.<rid>).
SkipVerification bool
Gets or sets a value indicating whether to install without verification (sha256=skip). Not recommended.
TripleOverrides IDictionary<string, string>
Gets {triple} overrides per .NET RID (triple.<rid>, rust dialect only).
Url string
Gets or sets the URL template used on every platform without a UrlByPlatform entry.
UrlByPlatform IDictionary<string, string>
Gets URL templates per .NET RID (url.<rid>).
Version string
Gets or sets the exact version (version); fills {version}.

Methods

Name Value Summary
ToDirective() string
Writes these settings as a download: directive, for #tool-style eager installs such as Cake.Sdk's InstallTool.
ToDirectiveUri() Uri
Writes these settings as a download: directive System.Uri, for Frosting's CakeHost.InstallTool.
WithArch(string, string) DownloadToolSettings
Overrides one {arch} value (arch.<value>), e.g. WithArch("amd64", "x86_64").
WithArchive(string, string) DownloadToolSettings
Overrides {archive} for one OS (archive.<os>), e.g. WithArchive("darwin", "zip").
WithChecksums(string, string) DownloadToolSettings
Verifies the download against a pinned checksums file (checksums and checksums_sha256).
WithDialect(DownloadDialect) DownloadToolSettings
Sets Dialect.
WithExclude(string) DownloadToolSettings
Adds an exclude glob.
WithFileName(string) DownloadToolSettings
Sets FileName.
WithFormat(DownloadFormat) DownloadToolSettings
Sets Format.
WithInclude(string) DownloadToolSettings
Adds an include glob.
WithOs(string, string) DownloadToolSettings
Overrides one {os} value (os.<value>), e.g. WithOs("darwin", "macOS").
WithoutVerification() DownloadToolSettings
Installs without verification (sha256=skip). A warning is logged on every fresh install. Not recommended.
WithPackage(string) DownloadToolSettings
Sets Package.
WithSha256(string, string) DownloadToolSettings
Pins the download's SHA-256 for one platform (sha256.<rid>).
WithSha256(string) DownloadToolSettings
Pins the download's SHA-256 on every platform (sha256).
WithTriple(string, string) DownloadToolSettings
Overrides {triple} for one platform (triple.<rid>, rust dialect only).
WithUrl(string, string) DownloadToolSettings
Sets the URL template for one platform (url.<rid>).
WithUrl(string) DownloadToolSettings
Sets Url.
WithVersion(string) DownloadToolSettings
Sets Version.

Extension Methods

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