BaseAttribute Class

graph BT Type-->Base0["Attribute"] Type-.->Interface0["IReadOnlyArgumentAttribute"] click Interface0 "/api/Cake.ArgumentBinder/IReadOnlyArgumentAttribute" Type["BaseAttribute"] class Type type-node Derived0["BasePathAttribute"]-->Type click Derived0 "/api/Cake.ArgumentBinder/BasePathAttribute" Derived1["BooleanArgumentAttribute"]-->Type click Derived1 "/api/Cake.ArgumentBinder/BooleanArgumentAttribute" Derived2["StringArgumentAttribute"]-->Type click Derived2 "/api/Cake.ArgumentBinder/StringArgumentAttribute" Derived3["EnumArgumentAttribute"]-->Type click Derived3 "/api/Cake.ArgumentBinder/EnumArgumentAttribute" Derived4["IntegerArgumentAttribute"]-->Type click Derived4 "/api/Cake.ArgumentBinder/IntegerArgumentAttribute"

Syntax

public abstract class BaseAttribute : Attribute, IReadOnlyArgumentAttribute

Attributes

Type Description
AttributeUsageAttribute

Constructors

Properties

Name Value Summary
ArgName string
The name of the argument that is passed in via the command-line.
ArgumentSource ArgumentSource
Where to find the argument's value.
BaseDefaultValue object
The default value if an argument isn't specified.
DefaultArgumentSource ArgumentSource
static
Description string
Description of what the argument does.
HasSecretValue bool
Set to true if the value passed into the argument should be hidden from any print-outs to the console.
Required bool
If the value is not specified, this will fail validation when this is set to true.

Methods

Name Value Summary
ToString(StringBuilder) void
Appends this class's string representation to the passed in string builder object. This should be the first thing called when creating a ToString() function of all child classes.

Extension Methods

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