Ejemplo n.º 1
0
        public TOutput RenderUrl <TOutput> (string url, IDocGenerator <TOutput> generator, out Node node)
        {
            node = null;
            string     internalId = null;
            HelpSource hs         = GetHelpSourceAndIdForUrl(url, out internalId, out node);

            return(generator.Generate(hs, internalId));
        }
Ejemplo n.º 2
0
        public TOutput RenderUrl <TOutput> (string url, IDocGenerator <TOutput> generator, out Node node, HelpSource hintSource = null)
        {
            node = null;
            string internalId = null;
            Dictionary <string, string> context = null;
            HelpSource hs = GetHelpSourceAndIdForUrl(url, hintSource, out internalId, out context, out node);

            return(generator.Generate(hs, internalId, context));
        }
Ejemplo n.º 3
0
 public Documenter(IFileLoader fl, ISourceCodeParser dp, IDocGenerator gen, IOutputWriter ow, ILogger <Documenter> logger)
 {
     this.loader     = fl;
     this.parser     = dp;
     this.generator  = gen;
     this.writer     = ow;
     this.OutputDocs = null;
     this.logger     = logger;
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Construit l'objet Generator permettant la génération de document en fonction de l'objet DocGenerator
        /// Puis Génère le document en fonction des inputs
        /// </summary>
        /// <param name="docgenerator">param/model de génération</param>
        /// <param name="inputs">Données Inputs en direct</param>
        /// <param name="OutputFile">fichier de sortie</param>
        /// <returns>résultat et fichier de sortie</returns>
        public IDocGeneratorItem Generate(IDocGenerator docgenerator, Dictionary <string, object> inputs = null, FileInfo OutputFile = null)
        {
            if (docgenerator == null)
            {
                throw new Exception("Generate : DocGenerator null ");
            }
            IGeneratorEngine generator = NGLib.COMPONENTS.DOCUMENT.DOCGENERATOR.GeneratorEngineFactory.BuildGeneratorEngine(docgenerator);


            return(generator.RunGenerate(docgenerator, inputs, OutputFile));
        }
Ejemplo n.º 5
0
        public IDocGeneratorItem Generate(IDocGenerator docgenerator, NGLib.DATA.DATAPO.DataPO modelpo, FileInfo OutputFile = null)
        {
            if (docgenerator == null)
            {
                throw new Exception("Generate : DocGenerator null ");
            }
            IGeneratorEngine generator = NGLib.COMPONENTS.DOCUMENT.DOCGENERATOR.GeneratorEngineFactory.BuildGeneratorEngine(docgenerator);


            //if(docgenerator.InputPath.Contains("{!appdirectory}"))
            //    docgenerator.InputPath=docgenerator.InputPath.Replace("{!appdirectory}","");

            if (docgenerator.InputPath.Contains("{!invoiceviewdirectory}"))
            {
                string filename = docgenerator.InputPath.Replace("{!invoiceviewdirectory}", "");
                ((DocGeneratorPO)docgenerator).InputPath = System.Web.HttpContext.Current.Server.MapPath("~/Views/Invoices/" + filename);
            }

            Dictionary <string, object> inputs = new Dictionary <string, object>();

            inputs.Add("model", modelpo);

            return(generator.RunGenerate(docgenerator, inputs, OutputFile));
        }
Ejemplo n.º 6
0
        public TOutput RenderUrl <TOutput> (string url, IDocGenerator <TOutput> generator, HelpSource hintSource = null)
        {
            Node dummy;

            return(RenderUrl <TOutput> (url, generator, out dummy, hintSource));
        }
Ejemplo n.º 7
0
 public DataSet ExecuteSql(IDocGenerator docgenerator)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 8
0
 public FileInfo GetDefaultOutputFile(IDocGenerator docgenerator)
 {
     throw new NotImplementedException();
 }