static int Main(string[] args) { if (!ParametersParser.Start(args)) { return(-1); } try { ParametersParser.LoadParameters(); Console.WriteLine("Generating Event Bus Command from..."); Console.WriteLine("Assembly: " + Context.AssemblyFile); Console.WriteLine("Command: " + Context.CommandName); Console.WriteLine("Temp folder: " + Context.TempPath); Context.LoadAssembly(); Context.PrepareOutputDirectory(); new List <ProjectCreator> { new EventBusCommandProjectCreator() }; var eventBusCommandProjectCreator = new EventBusCommandProjectCreator(); eventBusCommandProjectCreator.Build(); new NugetCreator(eventBusCommandProjectCreator).Create(); Console.WriteLine("Add done"); return(0); } catch (Exception ex) { Helper.ShowError(ex); return(-1); } }
static int Main(string[] args) { if (!ParametersParser.Start(args)) { return(-1); } try { ParametersParser.LoadParameters(); Console.WriteLine("Command: " + Context.Command + " nugets "); Console.WriteLine("File: file: " + Context.FileName); Console.WriteLine(); if (Context.Command == Command.Extract) { Extract.Start(); } else { Restore.Start(); } Console.WriteLine("Cashe Nuget was done"); return(0); } catch (Exception ex) { Helper.ShowError(ex); return(-1); } }
static int Main(string[] args) { if (!ParametersParser.Start(args)) { return(-1); } try { ParametersParser.LoadParameters(); Console.WriteLine("Generating Data Endpoint from..."); Console.WriteLine("Assembly: " + Context.AssemblyFile); Console.WriteLine("Endpoint: " + Context.EndpointName); Console.WriteLine("Temp folder: " + Context.TempPath); Context.LoadAssembly(); Context.FindExposedTypes(); Context.PrepareOutputDirectory(); new List <ProjectCreator> { new EndpointProjectCreator() }; var endPointCreator = new EndpointProjectCreator(); endPointCreator.Build(); new NugetCreator(endPointCreator).Create(); if (Context.ExposedTypes.Any()) { var projectCreators = new[] { new MSharpProjectCreator(), new MSharp46ProjectCreator() }; projectCreators.AsParallel().Do(x => x.Build()); new NugetCreator(projectCreators).Create(); } Console.WriteLine("Add done"); return(0); } catch (Exception ex) { Helper.ShowError(ex); return(-1); } }
static bool Initialize(string[] args) { Console.WriteLine("Current directory: " + Environment.CurrentDirectory); if (args.Contains("/debug")) { Console.Write("Waiting for debugger to attach..."); while (!Debugger.IsAttached) { Thread.Sleep(100); } Console.WriteLine("Attached."); } AppDomain.CurrentDomain.ResolveAssemblies(); if (!ParametersParser.Start(args)) { Helper.ShowHelp(); return(false); } return(true); }