public static void Main(string[] argv) { ArgumentParser args = new ArgumentParser(argv); args.Register("url", true, false, "server URL"); args.Register("dll", true, false, "library to make visible on the CLR bridge"); Logger.Parse(args); var url = new Uri(args.Or("url", "svc://127.0.0.1:56789")); if (args.Contains("dll")) { LoadDlls(args["dll"].ValueList); } _log.Info("starting CLR bridge server"); var svr = new CLRBridgeServer(url); svr.Start(blocking: true); Environment.Exit(0); }
// naming for different configurations //clean and rebuild //find installed tool version static int Main(string[] Args) { EnvironmentHelper.Initialize(); ArgumentParser arguments = ArgumentParser.Parse(Args); if (arguments.Contains("Action")) { BuildSystem.Actions action = arguments.Get <BuildSystem.Actions>("Action"); if (action == BuildSystem.Actions.BuildProjectFile) { if (EngineProjectFileCreator.Create()) { return(0); } #if DEBUG Console.Read(); #endif return(1); } else if (arguments.Contains("Architecture")) { BuildSystem.PlatformArchitectures architecture = arguments.Get <BuildSystem.PlatformArchitectures>("Architecture"); if (arguments.Contains("Configuration")) { ProjectBase.ProfileBase.BuildConfigurations buildConfiguration = arguments.Get <ProjectBase.ProfileBase.BuildConfigurations>("Configuration"); BuildSystem builder = new BuildSystem(action, architecture, buildConfiguration); switch (action) { case BuildSystem.Actions.BuildEngine: if (builder.Build()) { return(0); } break; case BuildSystem.Actions.RebuildEngine: if (builder.Rebuild()) { return(0); } break; case BuildSystem.Actions.CleanEngine: if (builder.Clean()) { return(0); } break; } #if DEBUG Console.Read(); #endif return(1); } } } ConsoleHelper.WriteError("Parameters should be like -Action {Param} -Architecture {Param} -Configuration {Param}"); #if DEBUG Console.Read(); #endif return(1); }