Ejemplo n.º 1
0
        private static async Task DocumentCell(IDocumentationCell cell, string path, CancellationToken cancelToken)
        {
            List <Task> tasks = new List <Task>();

            foreach (IDocumentationFile file in cell.Files)
            {
                tasks.Add(DocumentFile(file, path, cancelToken));
            }
            foreach (Task task in tasks)
            {
                await task.ConfigureAwait(false);
            }
        }
Ejemplo n.º 2
0
        private static IDocumentationRow ClemDocsRow()
        {
            string             clem                = Path.Combine(examples, "CLEM");
            string             croppingFile        = Path.Combine(clem, "CLEM_Example_Cropping.apsimx");
            string             grazingFile         = Path.Combine(clem, "CLEM_Example_Grazing.apsimx");
            IDocumentationFile scienceDocs         = new ExternalDocument("Science Documentation", "https://www.apsim.info/clem");
            IDocumentationFile croppingExample     = new DocsFromFile(croppingFile, "CLEM_Example_Cropping.pdf", options);
            IDocumentationFile grazingExample      = new DocsFromFile(grazingFile, "CLEM_Example_Grazing.pdf", options);
            IEnumerable <IDocumentationCell> cells = new IDocumentationCell[3]
            {
                new DocumentationCell(new[] { scienceDocs }),
                new DocumentationCell(new[] { croppingExample }),
                new DocumentationCell(new[] { grazingExample })
            };

            return(new DocumentationRow("CLEM", cells));
        }