GrypeTool<TSettings> Class

Summary

Base class for the Grype commands.
graph BT Type-->Base0["Tool<TSettings>"] Type["GrypeTool<TSettings>"] class Type type-node Derived0["GrypeDbImporter"]-->Type click Derived0 "/api/Cake.Grype.Db/GrypeDbImporter" Derived1["GrypeDbChecker"]-->Type click Derived1 "/api/Cake.Grype.Db/GrypeDbChecker" Derived2["GrypeVersionReader"]-->Type click Derived2 "/api/Cake.Grype/GrypeVersionReader" Derived3["GrypeDbUpdater"]-->Type click Derived3 "/api/Cake.Grype.Db/GrypeDbUpdater" Derived4["GrypeScanner"]-->Type click Derived4 "/api/Cake.Grype.Scan/GrypeScanner" Derived5["GrypeDbDeleter"]-->Type click Derived5 "/api/Cake.Grype.Db/GrypeDbDeleter" Derived6["GrypeDbStatusReader"]-->Type click Derived6 "/api/Cake.Grype.Db/GrypeDbStatusReader"

Syntax

public abstract class GrypeTool<TSettings> : Tool<TSettings> where TSettings : GrypeSettings

Type Parameters

Name Description
TSettings The settings type.

Constructors

Methods

Name Value Summary
AcceptsExitCode(int, string) bool
Determines whether a non-zero exit code is expected for this command and must not throw.
CreateArgumentBuilder(TSettings, string[]) ProcessArgumentBuilder
Creates a ProcessArgumentBuilder containing the command words followed by the global flags.
GetToolExecutableNames() IEnumerable<string>
Gets the possible names of the tool executable.
GetToolName() string
Gets the name of the tool.
MakeAbsolute(FilePath, TSettings) FilePath
Makes a path absolute against ResolveWorkingDirectory(TSettings).
ProcessExitCode(int) void
ResolveWorkingDirectory(TSettings) DirectoryPath
Gets the absolute directory that relative paths are resolved against: the settings' working directory if set, otherwise the Cake working directory.
RunAndReadJson<T>(TSettings, string[]) T
Runs a command with -q and -o json, and parses its standard output.
TryParseJson<T>(string, T) bool
Parses JSON without throwing.
static

Extension Methods

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