static void Main(string[] args) { TryWritePid(); GlooService.SetInfo(GlooService.ServiceInfo); if (!GlooService.ProcessCommandLineArgs(args)) { IsolateMethodCalls = false; AddSwitches(typeof(ConsoleActions)); AddConfigurationSwitches(); ArgumentAdder.AddArguments(args); Initialize(args, (a) => { OutLineFormat("Error parsing arguments: {0}", ConsoleColor.Red, a.Message); Thread.Sleep(1000); Exit(1); }); if (Arguments.Contains("singleProcess")) { KillExistingProcess(); } if (Arguments.Contains("i")) { Interactive(); } else if (!ExecuteSwitches(Arguments, new ConsoleActions())) { GlooService.RunService <GlooService>(); } } }
static void Main(string[] args) { TryWritePid(); TrooService.SetInfo(TrooService.ServiceInfo); if (!TrooService.ProcessCommandLineArgs(args)) { IsolateMethodCalls = false; AddSwitches(typeof(UtilityActions)); AddConfigurationSwitches(); ArgumentAdder.AddArguments(args); Initialize(args, (a) => { OutLineFormat("Error parsing arguments: {0}", ConsoleColor.Red, a.Message); Environment.Exit(1); }); if (Arguments.Length > 0 && !Arguments.Contains("i")) { ExecuteSwitches(Arguments, typeof(UtilityActions), false, Log.Default); } else if (Arguments.Contains("i")) { Interactive(); } else { TrooService.RunService <TrooService>(); } } }
static void Main(string[] args) { Resolver.Register(); IsolateMethodCalls = false; Type type = typeof(Program); AddSwitches(typeof(Program)); AddSwitches(typeof(BuildClientActions)); AddSwitches(typeof(UserAdministrationActions)); AddSwitches(typeof(UtilityActions)); AddConfigurationSwitches(); ArgumentAdder.AddArguments(); Initialize(args); if (Arguments.Contains("ProcessMode")) { if (Arguments["ProcessMode"].TryToEnum <ProcessModes>(out ProcessModes processMode)) { ProcessMode.Current = ProcessMode.FromEnum(processMode); } } if (Arguments.Length > 0 && !Arguments.Contains("i")) { ExecuteSwitches(Arguments, type, false, Log.Default); ExecuteSwitches(Arguments, typeof(BuildClientActions), false, Log.Default); ExecuteSwitches(Arguments, typeof(UserAdministrationActions), false, Log.Default); ExecuteSwitches(Arguments, typeof(UtilityActions), false, Log.Default); } else { Interactive(); } }