示例#1
0
        public static void Generate(string sourcedir, string targetdir, string mask, string loglevel)
        {
            Log.Level = Log.ParseLevel(loglevel, LogLevel.Info);
            
            Log.Info("Fhir publisher tool 0.9.5 BETA");

            Root root = new Root(sourcedir, targetdir);
            Context context = root.Context();

            Document document = FileFilter.GetDocument(context, mask);
            IWork work = Make.InterpretDocument(document.Text, document.Context);
            
            work.Execute();
            
            Log.Info("Rendering complete. Output to directory {0}", targetdir);
            
        }
示例#2
0
 public static Context CreateFromSource(Root root, string path)
 {
     path = Path.GetDirectoryName(path);
     var location = Location.RelativeFrom(root.Source, path);
     return new Context(root, location);
 }
示例#3
0
 public Context(Root root, Location location = null)
 {
     this.Root = root;
     this.Location = location ?? new Location();
 }