IntegerArgumentAttribute Class

Summary

This is an argument that should be limited to an integer. Note that this attribute can only be attached to a property whose type is an int, or run-time exceptions will occur.
Assembly
Cake.ArgumentBinder.dll
Namespace
Cake.ArgumentBinder
Interfaces
Base Types
graph BT Type-->Base0["BaseAttribute"] click Base0 "/api/Cake.ArgumentBinder/BaseAttribute" Base0-->Base1["Attribute"] Type-.->Interface0["IReadOnlyArgumentAttribute"] click Interface0 "/api/Cake.ArgumentBinder/IReadOnlyArgumentAttribute" Type["IntegerArgumentAttribute"] class Type type-node

Syntax

public sealed class IntegerArgumentAttribute : BaseAttribute, IReadOnlyArgumentAttribute

Constructors

Properties

Name Value Summary
ArgName string
The name of the argument that is passed in via the command-line.
Inherited from BaseAttribute
ArgumentSource ArgumentSource
Where to find the argument's value.
Inherited from BaseAttribute
BaseDefaultValue object
DefaultArgumentSource ArgumentSource
Inherited from BaseAttribute
static
DefaultValue int
The default value of the argument; defaulted to 0. The default value IS allowed to be outside of the range specified in Min and Max.
Description string
Description of what the argument does.
Inherited from BaseAttribute
HasSecretValue bool
Set to true if the value passed into the argument should be hidden from any print-outs to the console.
Inherited from BaseAttribute
Max int
The maximum acceptable value. Defaulted to System.Int32.MaxValue. If the argument is greater than (equal to is okay) this value, validation will fail.
Min int
The minimum acceptable value. Defaulted to 0. If the argument is less than (equal to is okay) this value, validation will fail.
Required bool
If the value is not specified, this will fail validation when this is set to true.
Inherited from BaseAttribute

Methods

Name Value Summary
ToString() string
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.
Inherited from BaseAttribute

Extension Methods

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