Beispiel #1
0
 public ConvertFhirClass(DirectFhirGenerator gen,
                         DirectFhirGenerator.SDefInfo sDefInfo)
 {
     this.sDefInfo = sDefInfo;
     this.gen      = gen;
     this.sDef     = this.sDefInfo.SDef;
 }
Beispiel #2
0
        static Int32 Main(string[] args)
        {
            try
            {
                dfg = new DirectFhirGenerator();
                dfg.StatusErrors   += Dfg_StatusErrors;
                dfg.StatusInfo     += Dfg_StatusInfo;
                dfg.StatusWarnings += Dfg_StatusWarnings;

                if (args.Length != 1)
                {
                    throw new Exception($"Expected single command line arg");
                }
                ParseArgs(File.ReadAllText(args[0]));
                if (String.IsNullOrEmpty(dfg.OutputDir))
                {
                    throw new Exception($"Missing required -o command line argument");
                }
                Int32 retVal = dfg.GenerateBaseClasses();
                return(retVal);
            }
            catch (Exception err)
            {
                Console.WriteLine(err.Message);
                return(-1);
            }
        }