Nuke.Cola
Loading...
Searching...
No Matches
Nuke.Cola.Arguments Class Reference

Extension class for dealing with passing arguments from the user through nuke to a tool. More...

Static Public Member Functions

static ? string ProcessArgument (string? arg)
 Unescape argument input which is passed by the user through a parameter.
 
static IEnumerable< string?> AsArguments (this IEnumerable< string >? args)
 Unescape multiple argument input which is passed by the user through a parameter.
 
static string AppendAsArguments (this IEnumerable< string >? input, bool leadingSpace=true)
 Unescape multiple argument input which is passed by the user through a parameter.
 
static IEnumerable< string > GetBlock (string name="", IEnumerable< string >? from=null)
 Gets an optionally named block of arguments. An argument block starts with "-->" (+ optional name) and either ends at the start of another argument block or ends at the last argument.
 
static IEnumerable< string > GetArgumentBlock (this IEnumerable< string > from, string name="")
 Gets an optionally named block of arguments. An argument block starts with "-->" (+ optional name) and either ends at the start of another argument block or ends at the last argument.
 

Detailed Description

Extension class for dealing with passing arguments from the user through nuke to a tool.

Definition at line 14 of file Arguments.cs.

Member Function Documentation

◆ AppendAsArguments()

static string Nuke.Cola.Arguments.AppendAsArguments ( this IEnumerable< string >? input,
bool leadingSpace = true )
static

Unescape multiple argument input which is passed by the user through a parameter.

◆ AsArguments()

static IEnumerable< string?> Nuke.Cola.Arguments.AsArguments ( this IEnumerable< string >? args)
static

Unescape multiple argument input which is passed by the user through a parameter.

◆ GetArgumentBlock()

static IEnumerable< string > Nuke.Cola.Arguments.GetArgumentBlock ( this IEnumerable< string > from,
string name = "" )
static

Gets an optionally named block of arguments. An argument block starts with "-->" (+ optional name) and either ends at the start of another argument block or ends at the last argument.

For example

<blockquote>&zwj;nuke display-args &ndash;param1 foo --> -d foo bar /switch="asdasd"
args: -d foo bar /switch="asdasd"
nuke display-args &ndash;param1 foo -->b1 -d foo bar -->b2 /switch="asdasd"
b1 args: -d foo bar
b2 args: /switch="asdasd"

Nuke allows unknown arguments for its reflection system, but it doesn't know it should stop processing arguments inside an argument block. If the build has similarly named arguments it may interfere with other parameters. Design your build usage with this in mind.

◆ GetBlock()

static IEnumerable< string > Nuke.Cola.Arguments.GetBlock ( string name = "",
IEnumerable< string >? from = null )
static

Gets an optionally named block of arguments. An argument block starts with "-->" (+ optional name) and either ends at the start of another argument block or ends at the last argument.

For example

<blockquote>&zwj;nuke display-args &ndash;param1 foo --> -d foo bar /switch="asdasd"
args: -d foo bar /switch="asdasd"
nuke display-args &ndash;param1 foo -->b1 -d foo bar -->b2 /switch="asdasd"
b1 args: -d foo bar
b2 args: /switch="asdasd"

Nuke allows unknown arguments for its reflection system, but it doesn't know it should stop processing arguments inside an argument block. If the build has similarly named arguments it may interfere with other parameters. Design your build usage with this in mind.

Definition at line 64 of file Arguments.cs.

◆ ProcessArgument()

static ? string Nuke.Cola.Arguments.ProcessArgument ( string? arg)
static

Unescape argument input which is passed by the user through a parameter.

Definition at line 19 of file Arguments.cs.


The documentation for this class was generated from the following file: