public Merger(PreFhirGenerator preFhir, ProcessItem baseItem, ProcessItem mergeItem) { this.preFhir = preFhir; this.baseItem = baseItem; this.mergeItem = mergeItem; }
Int32 Execute(string[] args) { try { if (String.IsNullOrEmpty(this.output) == true) { throw new Exception($"Output not set"); } this.preFhir = new PreFhirGenerator(null, "."); this.ParseArgs(args); String optionsFile = Path.Combine(DirHelper.FindParentDir("PreFhir"), "Options.txt"); if (File.Exists(optionsFile)) { String optionsTxt = File.ReadAllText(optionsFile); String[] optionsArr = optionsTxt.ToArgs(); this.ParseArgs(optionsArr); } this.preFhir.StatusErrors += this.Dfg_StatusErrors; this.preFhir.StatusInfo += this.Dfg_StatusInfo; this.preFhir.StatusWarnings += this.Dfg_StatusWarnings; if (this.preFhir.HasErrors == false) { this.preFhir.Process(); } if (this.preFhir.HasErrors) { throw new Exception($"Program failesd with {this.preFhir.Errors.Count()} errors"); } return(0); } catch (Exception err) { Console.WriteLine(err.Message); return(-1); } }