static RpxInterface() { Title = Strings.App_Title + " " + typeof(Program).Assembly.GetName().Version.ToString(); Parser = new ArgumentParser("Rpx", Title + "\n" + Strings.App_AboutText); Parser.AboutTitleText = Title; Parser.AboutText = Strings.App_AboutText; Parser.AboutTextLong = Strings.App_AboutTextLong; Parser.CreditsText = Strings.App_CreditsText; Parser.LegalText = Strings.App_LegalText; Parser.HasApplicationDocument = true; PathString = new StringArgument(Strings.Arg_PathString_Name, Strings.Arg_PathString_ShortHelp, Strings.Arg_PathString_Help); FileList = new StringListArgument(Strings.Arg_FileList_Name, "", Strings.Arg_FileList_Help); Parser.FirstArgument = PathString; Parser.DefaultArgument = FileList; AssemblyInfoPath = new StringArgument(Strings.Arg_AssemblyInfoPath_Name, Strings.Arg_AssemblyInfoPath_ShortHelp, Strings.Arg_AssemblyInfoPath_Help); IconPath = new StringArgument(Strings.Arg_IconPath_Name, Strings.Arg_IconPath_ShortHelp, Strings.Arg_IconPath_Help); OutputPath = new StringArgument(Strings.Arg_OutputPath_Name, Strings.Arg_OutputPath_ShortHelp, Strings.Arg_OutputPath_Help); ConsoleSwitch = new PlusMinusSwitch(Strings.Arg_ConsoleSwitch_ShortHelp, Strings.Arg_ConsoleSwitch_Help, true); PassArgsSwitch = new BoolSwitch(Strings.Arg_PassArgsSwitch_ShortHelp, Strings.Arg_PassArgsSwitch_Help); DecorateSwitch = new BoolSwitch(Strings.Arg_Decorate_ShortHelp, Strings.Arg_Decorate_Help); ProtectZipSwitch = new OptionalStringArgument(Strings.Arg_Hide_Name, Strings.Arg_Hide_ShortHelp, Strings.Arg_Hide_Help); ToolsCsv = new CsvArgument(Strings.Arg_Toolkit_Name, Strings.Arg_Toolkit_ShortHelp, Strings.Arg_Toolkit_Help); Parser.Add(PlusMinusSwitch.KeyPrefix, Strings.Arg_ConsoleSwitch_Symbol, Strings.Arg_ConsoleSwitch_Key, ConsoleSwitch); Parser.Add("/", Strings.Arg_PassArgsSwitch_Symbol, Strings.Arg_PassArgsSwitch_Key, PassArgsSwitch); Parser.Add("/", Strings.Arg_Toolkit_Key, ToolsCsv); Parser.Add("/", Strings.Arg_OutputPath_Symbol, Strings.Arg_OutputPath_Key, OutputPath); Parser.Add("/", Strings.Arg_Decorate_Key, DecorateSwitch); Parser.Add("/", Strings.Arg_IconPath_Symbol, Strings.Arg_IconPath_Key, IconPath); Parser.Add("/", Strings.Arg_AssemblyInfoPath_Symbol, Strings.Arg_AssemblyInfoPath_Key, AssemblyInfoPath); Parser.Add("/", Strings.Arg_Hide_Key, ProtectZipSwitch); BuildSwitch = new BoolSwitch(Strings.Arg_BuildSwitch_ShortHelp, Strings.Arg_BuildSwitch_Help); QuietSwitch = new BoolSwitch(Strings.Arg_QuietSwitch_ShortHelp, Strings.Arg_QuietSwitch_Help); VerboseSwitch = new EnumSwitch(Strings.Arg_Verbose_ShortHelp, Strings.Arg_Verbose_Help, typeof(ConsoleVerbosity)); Parser.Add("/", Strings.Arg_BuildSwitch_Key, BuildSwitch); Parser.Add("/", Strings.Arg_QuietSwitch_Key, QuietSwitch); Parser.Add("/", Strings.Arg_Verbose_Key, VerboseSwitch); WarningsAsErrors = new PlusMinusSwitch(Strings.Arg_WarningsAsErrors_ShortHelp, Strings.Arg_WarningsAsErrors_Help, false); Parser.Add(PlusMinusSwitch.KeyPrefix, Strings.Arg_WarningsAsErrors_Key, WarningsAsErrors); }
public static int SwitchEnum(EnumSwitch a) { switch (a) { case EnumSwitch.Case1: return(100); case EnumSwitch.Case3: break; default: return(1000); } return(200); }