Imported Upstream version 5.16.0.100

Former-commit-id: 38faa55fb9669e35e7d8448b15c25dc447f25767
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-08-07 15:19:03 +00:00
parent 0a9828183b
commit 7d7f676260
4419 changed files with 170950 additions and 90273 deletions

View File

@ -25,17 +25,28 @@ class CommandDemo {
new Command ("echo", "Echo arguments to the screen") {
Run = ca => Console.WriteLine ("{0}", string.Join (" ", ca)),
},
new RequiresArgs (),
new RequiresArgsCommand (),
"Commands with spaces are supported:",
new Command ("has spaces", "spaces?!") {
Run = ca => Console.WriteLine ("spaces, yo! {0}", string.Join (" ", ca)),
},
"Nested CommandSets are also supported. They're invoked similarly to commands with spaces.",
new CommandSet ("set") {
new Command ("file type", "Does something or other.") {
Run = ca => Console.WriteLine ("File type set to: {0}", string.Join (" ", ca)),
},
},
};
commands.Add (commands);
return commands.Run (args);
}
public static int Verbosity;
}
class RequiresArgs : Command {
class RequiresArgsCommand : Command {
public RequiresArgs ()
public RequiresArgsCommand ()
: base ("requires-args", "Class-based Command subclass")
{
Options = new OptionSet () {