Imported Upstream version 5.20.0.180

Former-commit-id: ff953ca879339fe1e1211f7220f563e1342e66cb
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-02-04 20:11:37 +00:00
parent 0e2d47d1c8
commit 0510252385
3360 changed files with 83827 additions and 39243 deletions

View File

@ -5,6 +5,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Mono.Options;
@ -25,6 +26,9 @@ class CommandDemo {
new Command ("echo", "Echo arguments to the screen") {
Run = ca => Console.WriteLine ("{0}", string.Join (" ", ca)),
},
new Command ("equinox", "Does something with the equinox?") {
Run = ca => Console.WriteLine ("{0}", string.Join (" ", ca)),
},
new RequiresArgsCommand (),
"Commands with spaces are supported:",
new Command ("has spaces", "spaces?!") {
@ -35,8 +39,20 @@ class CommandDemo {
new Command ("file type", "Does something or other.") {
Run = ca => Console.WriteLine ("File type set to: {0}", string.Join (" ", ca)),
},
new Command ("output", "Sets output location") {
Run = ca => Console.WriteLine ("Output set to: {0}", string.Join (" ", ca)),
},
},
};
commands.Add (new Command ("completions", "Show CommandSet completions") {
Run = ca => {
var start = ca.Any() ? string.Join (" ", ca) : "";
Console.WriteLine ($"Showing CommandSet completions for prefix '{start}':");
foreach (var completion in commands.GetCompletions (start)) {
Console.WriteLine ($"\tcompletion: {completion}");
}
},
});
commands.Add (commands);
return commands.Run (args);
}