public static int Main(string[] args) { int exitCode = 0; try { Dictionary <string, string> parsedArgs = parseArguments(args); if (parsedArgs.ContainsKey("json-schema")) { Console.WriteLine(Application.Experimenter.getCurrentJsonSchema()); } else { String jsonContent = parseJsonContent(parsedArgs.Where(x => { return((String.Compare(x.Key, "-e") == 0) || (String.Compare(x.Key, "--experiment-data") == 0)); }).First().Value); String pluginPath = parsePluginFilePath(parsedArgs.Where(x => { return((String.Compare(x.Key, "-p") == 0) || (String.Compare(x.Key, "--plugin-path") == 0)); }).FirstOrDefault().Value); ExecutorPluginProxy proxy = ExecutorPluginProxy.create(pluginPath); Application.Experimenter experimenter = Application.Experimenter.create(); experimenter.executeExperimentation(jsonContent, proxy); } } catch (Exception e) { Console.WriteLine(e.Message); exitCode = -1; } return(exitCode); }
static void Main(string[] args) { try { Dictionary <string, string> parsedArgs = parseArguments(args); String pluginPath = getPluginFilePath("ExecutorPlugin", Directory.GetCurrentDirectory()); ExecutorPluginProxy proxy = ExecutorPluginProxy.create(pluginPath); Application.Experimenter experimenter = Application.Experimenter.create(); experimenter.executeExperimentation(parsedArgs["--experiment-data"], proxy); } catch (Exception e) { Console.WriteLine(e.Message); } }