public void Render(Context context, Stream input, Stream output)
 {
     var reader = new StreamReader(input);
     var writer = new StreamWriter(output);
     Render(context, reader, writer);
     writer.Flush();
 }
 public override void Render(Context context, StreamReader reader, StreamWriter writer)
 {
     var generator = new ProfileTableGenerator(context.TargetDir, context.Name, false, new ProfileKnowledgeProvider("http://www.hl7.org/implement/standards/fhir/"));
     string s = reader.ReadToEnd();
     var profile = (Profile)FhirParser.ParseResourceFromXml(s);
     var xmldoc = generator.generate(profile, false);
     writer.Write(xmldoc.ToString(SaveOptions.DisableFormatting));
 }
        public override void Render(Context context, StreamReader reader, StreamWriter writer)
        {
            string content = reader.ReadToEnd();
            StringBuilder builder = new StringBuilder();
            builder.Append(context.FileName);
            builder.Append("==");
            builder.Append(content);

            writer.Write(content);
        }
        public override void Render(Context context, StreamReader reader, StreamWriter writer)
        {
            var mark = new Markdown();

            //set preferences of your markdown
            mark.SafeMode = true;
            mark.ExtraMode = true;
            
            string mdtext = reader.ReadToEnd();
            string htmlmd = mark.Transform(mdtext);

            writer.Write(htmlmd);            
        }
 public void Render(Context context, Stream input, Stream output)
 {
     Stream source = input;
     Stream target = null;
     foreach (IRenderer renderer in Renderers)
     {
         source.Seek(0, SeekOrigin.Begin);
         target = new MemoryStream();
         renderer.Render(context, source, target);
         source = target;
     }
     target.Seek(0, SeekOrigin.Begin);
     target.CopyTo(output);
     output.Flush();
     output.Close();
 }
 public abstract void Render(Context context, StreamReader reader, StreamWriter writer);
 public Context Clone()
 {
     Context context = new Context();
     context.RootDir = this.RootDir;
     context.TargetRootDir = this.TargetRootDir;
     return context;
 }
        public static Context Root(string source, string target)
        {
            Context context = new Context();
            context.RootDir = source;
            context.TargetRootDir = target;
            return context;

        }
 public void Render(Context context, Stream input, Stream output)
 {
     //Razor.Render(context, input, output);
 }
Exemple #10
0
 public Render(Context context, IRenderer renderer)
 {
     this.Context = context;
     this.renderer = renderer;
 }