public static int Main(string[] args) { try { ProgramArguments programArguments = ProgramArguments.Parse(args); // nothing passed in, show usage if (args.Length == 0) { Console.Write(programArguments.GetUsageString()); return 0; } if (!programArguments.IsValid()) { Console.Write(programArguments.Error.Message); return programArguments.Error.Severity; } SpecBuilder builder = new SpecBuilder(programArguments); builder.Render(); } catch (CmdException cmdEx) { Console.WriteLine(cmdEx.Message); Console.WriteLine("Note: For a usage summary, use -?"); } catch (Exception ex) { Console.WriteLine("Oops! We got a problem dave! Error: " + ex.Message); } return 0; }
public string GetProjectFullpath() { this.GetProjectFile(); var args = new ProgramArguments(this._fileInfo.FullName, false, null); SpecBuilder projectSpec = new SpecBuilder(args); return projectSpec.SelfAssembly.GetFullpath; }
public string RenderProjectAndChildren() { this.GetProjectFile(); var args = new ProgramArguments(this._fileInfo.FullName, true, this._args.O); SpecBuilder projectSpec = new SpecBuilder(args); projectSpec.Render(); return args.O + "\\" + args.SpecName; }