using System; using System.Runtime.InteropServices; using CommandLine; using CommandLine.Text; namespace Trigger { /// /// Command line options /// public class Options { /// /// The name of the event that shall be triggered /// Every registered event handler has to compare this integer to the event it is waiting for /// [Option('t', "trigger", Required = false, HelpText = "The command line event that shall be triggered.\nUse \"string\".GetHashCode() to check against the retreived event code.")] public string Trigger { get; set; } /// /// Signal that this thread was started to gain administrator privileges /// [Option('a', "admin", Required = false, DefaultValue = false, HelpText = "Don't use this")] public bool Admin { get; set; } /// /// Prints some help text /// /// [HelpOption] public string GetUsage() { return HelpText.AutoBuild(this, current => HelpText.DefaultParsingErrorsHandler(this, current)); } } }