First hack at setting up Mono.Options

This commit is contained in:
Paul Betts
2014-08-21 15:41:43 -07:00
parent 318d9ab269
commit 3b9ea34fb7

View File

@@ -3,13 +3,32 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Mono.Options;
namespace Update namespace Update
{ {
class Program class Program
{ {
static void Main(string[] args) static int Main(string[] args)
{ {
if (args.Any(x => x.StartsWith("/squirrel", StringComparison.OrdinalIgnoreCase))) {
// NB: We're marked as Squirrel-aware, but we don't want to do
// anything in response to these events
return 0;
}
var opts = new OptionSet() {
{ "h|?|help", v => ShowHelp() }
};
opts.Parse(args);
return 0;
}
static void ShowHelp()
{
Console.WriteLine("Help!");
} }
} }
} }