コード例 #1
0
ファイル: spiderTools.cs プロジェクト: gorangrubic/imbWEM
        public static void DescribeModule(this ISpiderModuleBase module, ITextRender output)
        {
            output.open("p", "Module [" + module.name + "]", module.description);

            output.AppendPair("Class name", module.GetType().Name, true, ": ");

            output.AppendPair("Description", module.description, true, ": ");


            if (module is spiderLayerModuleBase)
            {
                spiderLayerModuleBase module_spiderLayerModuleBase = (spiderLayerModuleBase)module;
                foreach (var l in module_spiderLayerModuleBase.layers)
                {
                    l.DescribeLayer(output);
                }
            }


            output.AppendPair("Active rules", module.CountRules(spiderEvalRuleResultEnum.active), true, ": ");

            output.AppendPair("Passive rules", module.CountRules(spiderEvalRuleResultEnum.passive), true, ": ");

            foreach (IRuleBase md in module.rules)
            {
                md.DescribeRule(output);
            }

            module.GetUserManual(output, "", false, true);

            output.close();
        }
コード例 #2
0
 public void Describe(ITextRender output)
 {
     output.AppendHeading("Document selection query", 2);
     //  if (ApplyDomainLevelLimits) output.AppendLabel("Apply limit on domain level");
     output.AppendPair("Size limit", SizeLimit, true, "");
     output.AppendPair("Trashold limit", TrasholdLimit, true, "");
     output.AppendPair("Query Terms", QueryTerms, true, "");
 }
コード例 #3
0
ファイル: HtmlExtensions.cs プロジェクト: gorangrubic/imbACE
        /// <summary>
        /// Ubacuje opis HtmlNode-a u izvestaj prema ugradjenom sablonu
        /// </summary>
        /// <param name="node">HtmlNode objekat koji se opisuje</param>
        /// <param name="report">Izvestaj u kome se opisuje</param>
        /// <param name="isExpandedMode">Da li je rec o prosirenom ili skracenom izvestaju</param>
        public static void htmlNodeReport(this HtmlNode node, ITextRender report, Boolean isExpandedMode)
        {
            report.open(nameof(htmlTagName.div));
            Int32 childs = node.ChildNodes.Count;

            //report.AppendPairs(node, node.XPath + " " + node.Name + " (ch:" + childs + ")", "NodeType");
            report.AppendPair("Inner text", node.InnerText.toWidthMaximum(100));
            report.AppendPair("Inner HTML", node.InnerHtml.toWidthMaximum(100));
            report.close();
        }
コード例 #4
0
        public void Describe(ITextRender output)
        {
            if (classes > 1)
            {
                output.AppendPair("Classes", classes);
                output.AppendPair("Sites per class", sitesPerClass.ToString("F3"));
            }

            output.AppendPair("Sites", sites);
            output.AppendPair("Pages", pages);

            output.AppendPair("Pages per site", pagesPerSite.ToString("F3"));
        }
コード例 #5
0
 public void Report(rangeFinder ranger, ITextRender output, String rangeName, String prefix)
 {
     output.AppendLine("Range [" + rangeName + "]");
     output.nextTabLevel();
     foreach (var pair in ranger.GetDictionary(prefix))
     {
         output.AppendPair(pair.Key, pair.Value.ToString("F3"));
     }
     output.prevTabLevel();
 }
コード例 #6
0
ファイル: spiderTools.cs プロジェクト: gorangrubic/imbWEM
        public static void Describe(this ISpiderEvaluatorBase evaluator, ITextRender output)
        {
            output.AppendHeading("Crawler [" + evaluator.name + "]");

            output.AppendPair("Class name", evaluator.GetType().Name, true, ": ");

            output.AppendPair("Description", evaluator.description, true, ": ");



            if (evaluator is spiderModularEvaluatorBase)
            {
                spiderModularEvaluatorBase evaluator_spiderModularEvaluatorBase = (spiderModularEvaluatorBase)evaluator;

                foreach (var md in evaluator_spiderModularEvaluatorBase.modules)
                {
                    md.DescribeModule(output);
                }
            }



            if (evaluator is spiderEvaluatorSimpleBase)
            {
                spiderEvaluatorSimpleBase evaluator_spiderEvaluatorSimpleBase = (spiderEvaluatorSimpleBase)evaluator;

                evaluator_spiderEvaluatorSimpleBase.linkActiveRules.ToList().ForEach(x => x.DescribeRule(output));
            }


            output.AppendHorizontalLine();

            output.open("div", "General configuration", "Crawler configuration properties declared in common settings class");

            evaluator.settings.GetUserManual(output, "", true, true);

            output.close();
        }
コード例 #7
0
 public void Describe(ITextRender textRender)
 {
     textRender.AppendPair(nameof(Count), Count);
     textRender.AppendPair(nameof(Mean), Mean);
     textRender.AppendPair(nameof(Variance), Variance);
     textRender.AppendPair(nameof(StandardDeviation), StandardDeviation);
     textRender.AppendPair(nameof(Maximum), Maximum);
     textRender.AppendPair(nameof(Minimum), Minimum);
 }
コード例 #8
0
        /// <summary>
        /// Generates content for <see cref="settingsPropertyEntry"/>
        /// </summary>
        /// <param name="spec">The spec.</param>
        /// <param name="output">The output.</param>
        public static void GetUserManualSPE(this settingsPropertyEntry spec, ITextRender output)
        {
            output.AppendHeading(imbSciStringExtensions.add(spec.categoryName, spec.displayName, ": "), 3);
            output.AppendPair("Property name: ", spec.name);
            output.AppendPair("Type: ", spec.type.Name);

            if (!spec.description.isNullOrEmpty())
            {
                output.AppendParagraph(spec.description);
            }

            if (!spec.letter.isNullOrEmpty())
            {
                output.AppendPair("Annotation: ", spec.letter);
            }
            if (!spec.unit.isNullOrEmpty())
            {
                output.AppendPair("Unit: ", spec.unit);
            }
            if (spec.aggregation != null)
            {
                output.AppendPair("Aggregation: ", spec.aggregation.multiTableType.ToString());
            }

            //if (showValue)
            //{
            //    if (spec.value != null)
            //    {
            //        output.AppendPair("Value: ", spec.value.toStringSafe(spec.format));
            //    }
            //}

            if (spec.type.IsEnum)
            {
                output.AppendPair("Possible values: ", spec.type.GetEnumNames().toCsvInLine());
            }
            else if (spec.type == typeof(Int32))
            {
            }

            if (!spec.info_helpTitle.isNullOrEmpty())
            {
                output.AppendLabel(spec.info_helpTitle);
                output.AppendQuote(spec.info_helpTips);
            }

            if (!spec.info_link.isNullOrEmpty())
            {
                output.AppendLink(spec.info_link, "More", "More");
            }

            output.AppendHorizontalLine();
        }
コード例 #9
0
ファイル: spiderTools.cs プロジェクト: gorangrubic/imbWEM
        public static void DescribeRule(this IRuleBase rule, ITextRender output)
        {
            output.open("p", "Rule: " + rule.name, rule.description);
            output.AppendPair("Class", rule.GetType().Name, true, ": ");
            output.AppendPair("Role", rule.role, true, ": ");
            output.AppendPair("Subject", rule.subject, true, ": ");
            output.AppendPair("Priority", rule.priority, true, ": ");
            output.AppendPair("Mode", rule.mode, true, ": ");
            output.AppendPair("Tag", rule.tagName, true, ": ");

            output.close();
        }
コード例 #10
0
        /// <summary>
        /// Generates property manual
        /// </summary>
        /// <param name="dataObject">The data object.</param>
        /// <param name="output">The output.</param>
        public static void GetUserManual(this Object dataObject, ITextRender output, String directInfo = "", Boolean skipUnDescribed = true, Boolean showValue = true)
        {
            settingsEntriesForObject seo = new settingsEntriesForObject(dataObject, false, false);

            String heading = "";

            if (!seo.Category.isNullOrEmpty())
            {
                heading += seo.Category + ": ";
            }

            output.AppendHeading(heading + seo.DisplayName, 2);

            List <String> description = new List <string>();

            if (!seo.Description.isNullOrEmpty())
            {
                output.AppendSection(seo.Description, "Class: " + dataObject.GetType().Name, dataObject.GetType().Namespace, seo.additionalInfo);
            }

            if (!directInfo.isNullOrEmpty())
            {
                output.AppendComment(directInfo);
            }

            var list = seo.spes.Values.ToList().OrderBy(x => x.categoryName);

            foreach (settingsPropertyEntryWithContext spec in list)
            {
                if (spec.description.isNullOrEmpty() && skipUnDescribed)
                {
                }
                else
                {
                    output.AppendHeading(imbSciStringExtensions.add(spec.categoryName, spec.displayName, ": "), 3);
                    output.AppendPair("Property name: ", spec.pi.Name);
                    output.AppendPair("Type: ", spec.pi.PropertyType.Name);

                    if (!spec.description.isNullOrEmpty())
                    {
                        output.AppendParagraph(spec.description);
                    }

                    if (!spec.letter.isNullOrEmpty())
                    {
                        output.AppendPair("Annotation: ", spec.letter);
                    }
                    if (!spec.unit.isNullOrEmpty())
                    {
                        output.AppendPair("Unit: ", spec.unit);
                    }
                    if (spec.aggregation != null)
                    {
                        output.AppendPair("Aggregation: ", spec.aggregation.multiTableType.ToString());
                    }

                    if (showValue)
                    {
                        if (spec.value != null)
                        {
                            output.AppendPair("Value: ", spec.value.toStringSafe(spec.format));
                        }
                    }

                    if (spec.type.IsEnum)
                    {
                        output.AppendPair("Possible values: ", spec.type.GetEnumNames().toCsvInLine());
                    }
                    else if (spec.type == typeof(Int32))
                    {
                    }

                    if (!spec.info_helpTitle.isNullOrEmpty())
                    {
                        output.AppendLabel(spec.info_helpTitle);
                        output.AppendQuote(spec.info_helpTips);
                    }

                    if (!spec.info_link.isNullOrEmpty())
                    {
                        output.AppendLink(spec.info_link, "More", "More");
                    }

                    output.AppendHorizontalLine();
                }
            }

            if (!seo.info_helpTitle.isNullOrEmpty())
            {
                output.AppendLabel(seo.info_helpTitle);
                output.AppendQuote(seo.info_helpTips);
            }

            if (!seo.info_link.isNullOrEmpty())
            {
                output.AppendLink(seo.info_link, "More", "More");
            }
        }
コード例 #11
0
ファイル: spiderTools.cs プロジェクト: gorangrubic/imbWEM
 public static void DescribeLayer(this layerCollection layer, ITextRender output)
 {
     output.open("li", "Layer: " + layer.name, layer.description);
     output.AppendPair("Slot", layer.id.ToString("D3"), true, ": ");
     output.close();
 }
コード例 #12
0
 /// <summary>
 /// Describes the specified output.
 /// </summary>
 /// <param name="output">The output.</param>
 public void Describe(ITextRender output)
 {
     output.AppendPair("Current", currentlyUsed.ToString("F2") + "mb", true, ":");
     output.AppendLine("Limits N(" + limit_normal.ToString("#,###") + "mb" + ") C(" + limit_critical.ToString("#,###") + ")");
     output.AppendPair("Directive", currentMode.ToString(), true, ":");
 }
コード例 #13
0
        public static void ReportCommandDesc(this commandTreeDescription item, ITextRender output, String cTitlePrefix = "")
        {
            String cTitle = cTitlePrefix;

            cTitle = cTitle.add(item.name, ".").Trim('.');
            //node.item.menuMeta[aceMenuItemAttributeRole.Category]
            //  cTitle = node.item.menuMeta.getEntrySafe(aceMenuItemAttributeRole.Category).add(cTitle, ".");

            String k = item.menuMeta.getEntrySafe(aceMenuItemAttributeRole.Key);

            if (!k.isNullOrEmpty())
            {
                if (k.Length < 5)
                {
                    cTitle = cTitle.add(" [" + k + "]");
                }
            }
            //node.item.menuMeta.getp
            output.open("div", cTitle, item.description);
            //output.AppendPair("Caption", node.item.name, true, ": ");
            foreach (var pair in item.menuMeta)
            {
                if (imbSciStringExtensions.isNullOrEmpty(pair.Value))
                {
                }
                else
                {
                    switch (pair.Key)
                    {
                    case aceMenuItemAttributeRole.aliasNames:
                        output.AppendPair("Alias", pair.Value, true, ": ");
                        break;

                    case aceMenuItemAttributeRole.Description:
                    case aceMenuItemAttributeRole.ExpandedHelp:
                        output.AppendComment(pair.Value);
                        break;

                    case aceMenuItemAttributeRole.Key:
                        // output.AppendPair("Shortcut / key", pair.Value, true, ": ");
                        break;

                    case aceMenuItemAttributeRole.Category:
                    case aceMenuItemAttributeRole.DisplayName:
                    case aceMenuItemAttributeRole.CmdParamList:
                        break;

                    default:
                        output.AppendPair(pair.Key.ToString(), pair.Value, true, ": ");
                        break;
                    }
                }
            }

            String example = item.name + " ";

            if (item.menuMeta.cmdParams != null)
            {
                if (item.menuMeta.cmdParams.Any())
                {
                    output.AppendLabel("Command arguments: ");
                    String parLine = "";
                    Int32  pi      = 1;

                    List <String> prl = new List <string>();
                    parLine = item.menuMeta.cmdParams.ToString(false, true, true);

                    //foreach (typedParam cmdpar in node.item.menuMeta.cmdParams)
                    //{
                    //    parLine = parLine.add(cmdpar.getString(false), ";");
                    //}

                    output.AppendTable(item.menuMeta.cmdParams.getParameterTable());

                    example = example + parLine;
                }
            }

            output.AppendLabel("Example : ");
            output.AppendCode(example);

            output.close();
        }
コード例 #14
0
        /// <summary>
        /// Reports the command tree.
        /// </summary>
        /// <param name="tree">The tree.</param>
        /// <param name="output">The output.</param>
        public static void ReportCommandTree(this commandTree tree, ITextRender output, Boolean paginate, Int32 lastPageLine = 0, aceCommandConsoleHelpOptions option = aceCommandConsoleHelpOptions.full)
        {
            output.AppendHeading(tree.name.ToUpper(), 1);

            output.AppendParagraph(tree.description);

            if (tree.helpLines.Any())
            {
                output.AppendHeading("Description", 2);
                foreach (String ln in tree.helpLines)
                {
                    output.AppendLine(ln);
                }
            }

            if (option.HasFlag(aceCommandConsoleHelpOptions.parameters))
            {
                output.AppendHeading("Properties", 2);

                foreach (var pair in tree.properties)
                {
                    output.AppendPair(pair.Value.Name, pair.Value.PropertyType.Name, true, ":");
                }

                output.AppendHorizontalLine();
            }

            if (option.HasFlag(aceCommandConsoleHelpOptions.plugins))
            {
                output.AppendHeading("Plugins", 2);

                foreach (var pair in tree.plugins)
                {
                    output.AppendPair(pair.Key.Trim('.'), pair.Value.GetType().Name, true, ":");

                    var methods = pair.Value.GetType().GetMethods(BindingFlags.Instance | BindingFlags.Public);
                    if (Enumerable.Any <MethodInfo>(methods))
                    {
                        List <String> lst = new List <string>();
                        foreach (MemberInfo mInfo in Enumerable.Where <MethodInfo>(methods, x => x.Name.StartsWith(aceMenuItemMeta.METHOD_PREFIX)))
                        {
                            lst.Add(pair.Key.add(mInfo.Name.removeStartsWith(aceMenuItemMeta.METHOD_PREFIX), ".").Trim('.'));
                        }

                        output.AppendList(lst);
                    }
                }

                output.AppendHorizontalLine();
            }

            if (option.HasFlag(aceCommandConsoleHelpOptions.modules))
            {
                output.AppendHeading("Modules", 2);

                foreach (var pair in tree.modules)
                {
                    output.AppendPair(pair.Value.Name, pair.Value.PropertyType.Name, true, ":");
                }

                output.AppendHorizontalLine();
            }

            //if (option.HasFlag(aceCommandConsoleHelpOptions.brief))
            //{
            //    output.AppendHeading("Overview", 2);

            //    foreach (var pair in tree.flatAccess)
            //    {
            //        output.AppendPair(pair.Value.path.Trim('.'), pair.Value.menuMeta.cmdParams.ToString(false, true, true), true, " ");
            //    }

            //    output.AppendHorizontalLine();
            //}

            if (option.HasFlag(aceCommandConsoleHelpOptions.commands))
            {
                foreach (commandTreeDescription node in tree)
                {
                    node.ReportCommandNode(output, paginate, lastPageLine);
                }
            }
        }
コード例 #15
0
        public static void ReportCommandNode(this commandTreeDescription node, ITextRender output, Boolean paginate, Int32 lastPageLine = 0)
        {
            // output.open("div", node.item.name, node.item.description);
            if (lastPageLine == 0)
            {
                lastPageLine = Convert.ToInt32(output.Length);
            }

            switch (node.nodeLevel)
            {
            case commandTreeNodeLevel.parameter:
                output.AppendPair(node.path.Trim('.'), node.memberMeta.relevantTypeName);

                break;

            case commandTreeNodeLevel.module:
                output.AppendPair(node.path.Trim('.'), node.memberMeta.relevantTypeName);
                foreach (commandTreeDescription snode in node)
                {
                    snode.ReportCommandNode(output, paginate, lastPageLine);
                }
                break;

            case commandTreeNodeLevel.group:
                output.open("div", "Group: " + node.path.Trim('.'), node.description);

                foreach (commandTreeDescription snode in node)
                {
                    snode.ReportCommandNode(output, paginate, lastPageLine);
                }

                output.close();
                output.AppendHorizontalLine();
                break;

            case commandTreeNodeLevel.plugin:
                output.open("div", "Plugin: " + node.path.Trim('.'), node.description);

                foreach (commandTreeDescription tnode in node)
                {
                    node.ReportCommandNode(output, paginate, lastPageLine);
                }
                output.close();
                output.AppendHorizontalLine();
                break;

            case commandTreeNodeLevel.type:
                output.open("div", "Console: " + node.path.Trim('.'), node.description);

                foreach (commandTreeDescription tnode in node)
                {
                    node.ReportCommandNode(output, paginate, lastPageLine);
                }
                output.close();
                output.AppendHorizontalLine();
                break;

            case commandTreeNodeLevel.command:

                String cTitle = "";

                if (node.parent != null)
                {
                    cTitle = node.parent.path + " [" + node.name.toStringSafe() + "]";
                }

                ReportCommandDesc(node, output, cTitle);

                if (paginate)
                {
                    if ((lastPageLine - output.lastLength) >= output.zone.innerBoxedHeight)
                    {
                        lastPageLine = (int)output.lastLength;
                        Paginate();
                    }
                }
                break;
            }

            if (node.helpLines.Any())
            {
                output.open("div", "Additional help:");
                foreach (String ln in node.helpLines)
                {
                    output.AppendLine(ln);
                }
                output.close();
            }

            if (paginate)
            {
                if ((lastPageLine - output.lastLength) >= output.zone.innerBoxedHeight)
                {
                    lastPageLine = (int)output.lastLength;
                    Paginate();
                }
            }
        }
コード例 #16
0
        /// <summary>
        /// Compiles complex appends. Returns <c>appendType</c> if it is no match for this <c>runner</c>.
        /// </summary>
        /// <param name="ins">The ins.</param>
        /// <remarks>OK for multimpleruns</remarks>
        /// <returns><c>appendType.none</c> if executed, other <c>appendType</c> if no match for this run method</returns>
        protected appendType runComplexInstruction(IRenderExecutionContext context, docScriptInstruction ins)
        {
            ITextRender render = outputRender; //builder.documentBuilder;

            switch (ins.type)
            {
            //// ****************************** External executable
            case appendType.exe:

                IExeAppend exe = (IExeAppend)ins[d.dsa_value];
                exe.execute(context, render);

                break;

            /////////////////////// ---------------------------------
            case appendType.button:

                string          btn_caption = (string)ins[d.dsa_title];                  //.getProperString(d.dsa_title);
                string          btn_url     = (string)ins[d.dsa_url];                    //.getProperString(d.dsa_url);
                bootstrap_color btn_color   = (bootstrap_color)ins[d.dsa_styleTarget];   // ins.getProperEnum<bootstrap_color>(bootstrap_color.info, d.dsa_styleTarget);
                bootstrap_size  btn_size    = (bootstrap_size)ins[d.dsa_stylerSettings]; // ins.getProperEnum<bootstrap_size>(bootstrap_size.md, d.dsa_stylerSettings);

                render.AppendDirect(render.converter.GetButton(btn_caption, btn_url, btn_color.ToString(), btn_size.ToString()));

                break;

            case appendType.attachment:
                string att_caption = (string)ins[d.dsa_title]; //.getProperString(d.dsa_title);
                string att_url     = (string)ins[d.dsa_url];   //.getProperString(d.dsa_url);

                string filename = ins[d.dsa_title].toStringSafe().getFilename();
                att_url = att_url.or(filename);

                bootstrap_color att_color = (bootstrap_color)ins[d.dsa_styleTarget];    //.getProperEnum<bootstrap_color>(bootstrap_color.primary, d.dsa_styleTarget);
                bootstrap_size  att_size  = (bootstrap_size)ins[d.dsa_stylerSettings];  // ins.getProperEnum<bootstrap_size>(bootstrap_size.sm, d.dsa_stylerSettings);

                string output = "";
                if (ins.containsKey(d.dsa_content))
                {
                    DataTable dt = ins[d.dsa_content] as DataTable;     //.getProperObject<DataTable>(d.dsa_content);
                    if (dt != null)
                    {
                        dataTableExportEnum format = (dataTableExportEnum)ins[d.dsa_format];     //>(dataTableExportEnum.excel, d.dsa_format);
                        if (imbSciStringExtensions.isNullOrEmpty(att_url))
                        {
                            att_url = dt.TableName.getFilename().getCleanPropertyName().Replace(" ", "").ToLower();
                        }

                        att_url = dt.serializeDataTable(format, att_url, context.directoryScope);
                    }
                    else
                    {
                        output = ins[d.dsa_content] as string;
                    }
                }

                if (ins.containsAllOfTypes(typeof(FileInfo)))
                {
                    FileInfo fi = ins.getProperObject <FileInfo>();
                    att_url = fi.Name;
                    fi.CopyTo(att_url);
                }

                att_url = att_url.removeStartsWith(context.directoryScope.FullName).Trim('\\').removeStartsWith("/");

                string bootstrapButton = render.converter.GetButton(att_caption, att_url, att_color.toString(), att_size.toString());

                render.AppendDirect(bootstrapButton);
                break;

            case appendType.i_chart:
                List <object> parameters = (List <object>)ins[d.dsa_value];   //.getProperObject<List<Object>>(d.dsa_value);

                string chstr = charts.chartTools.buildChart((chartTypeEnum)parameters[0], (chartFeatures)parameters[1], (DataTable)parameters[2], (chartSizeEnum)parameters[3], ins.getProperEnum <chartTypeEnum>(chartTypeEnum.none, d.dsa_format));
                render.AppendDirect(chstr);
                break;

            case appendType.direct:
                render.AppendDirect((string)ins[d.dsa_contentLine]);
                break;

            case appendType.toFile:
                string toFile_outputpath = ins.getProperString(d.dsa_path);
                toFile_outputpath = context.directoryScope.FullName.add(toFile_outputpath, "\\");
                render.AppendToFile(toFile_outputpath, ins.getProperString(d.dsa_contentLine));
                break;

            case appendType.fromFile:
                string fromFile_sourcepath           = ins[d.dsa_path].toStringSafe();
                bool   fromFile_isLocalSource        = (bool)ins[d.dsa_on];
                templateFieldSubcontent fromFile_key = (templateFieldSubcontent)ins[d.dsa_key];
                if (fromFile_isLocalSource)
                {
                    fromFile_sourcepath = context.directoryScope.FullName.add(fromFile_sourcepath, "\\");
                }

                if (File.Exists(fromFile_sourcepath))
                {
                    render.AppendFromFile(fromFile_sourcepath, fromFile_key, fromFile_isLocalSource);
                }
                else
                {
                    render.AppendLabel("File " + fromFile_sourcepath + " not found", true, bootstrap_style.style_warning);
                }

                break;

            case appendType.file:
                string file_sourcepath     = ins.getProperString(d.dsa_path);
                string file_outputpath     = ins.getProperString(d.dsa_name);
                bool   file_isDataTemplate = (bool)ins.getProperField(d.dsa_on);
                bool   file_isLocalSource  = (bool)ins.getProperField(d.dsa_relative);
                file_outputpath = context.directoryScope.FullName.add(file_outputpath, "\\");

                if (file_isLocalSource)
                {
                    fromFile_sourcepath = context.directoryScope.FullName.add(file_sourcepath, "\\");
                }

                string templateNeedle = ins.getProperString("none", d.dsa_styleTarget);
                if (templateNeedle != "none")
                {
                    deliveryUnit dUnit = (deliveryUnit)context.dUnit;
                    deliveryUnitItemContentTemplated templateItem = dUnit.findDeliveryUnitItemWithTemplate(templateNeedle);

                    string __filecontent = openBase.openFileToString(file_sourcepath, true, false);
                    templateItem.saveOutput(context, __filecontent, context.data, file_outputpath, file_isDataTemplate);
                }
                else
                {
                    render.AppendFile(file_sourcepath, file_outputpath, file_isDataTemplate);
                }

                break;

            case appendType.image:
                diagramModel            model  = ins.getProperObject <diagramModel>(d.dsa_value);
                diagramOutputEngineEnum engine = ins.getProperEnum <diagramOutputEngineEnum>(diagramOutputEngineEnum.mermaid, d.dsa_format);
                if (model != null)
                {
                    deliveryUnit      dUnit     = (deliveryUnit)context.dUnit;
                    diagramOutputBase diaOutput = null;
                    if (outputRender is builderForMarkdown)
                    {
                        diaOutput = engine.getOutputEngine();
                    }
                    if (diaOutput == null)
                    {
                        diaOutput = new diagramMermaidOutput();
                    }
                    string diaString = diaOutput.getOutput(model, dUnit.theme.palletes);
                    render.AppendDirect(diaString);
                }
                else
                {
                    render.AppendImage(ins.getProperString(d.dsa_path), ins.getProperString(d.dsa_contentLine), ins.getProperString(d.dsa_name));
                }

                break;

            case appendType.math:
                render.AppendMath(ins.getProperString(d.dsa_contentLine), ins.getProperString(d.dsa_format));
                break;

            case appendType.label:
                render.AppendLabel(ins.getProperString(d.dsa_contentLine), !ins.isHorizontal, ins.getProperString(d.dsa_styleTarget));
                break;

            case appendType.panel:
                render.AppendPanel(ins.getProperString(d.dsa_contentLine), ins.getProperString(d.dsa_title), ins.getProperString(d.dsa_description), ins.getProperString(d.dsa_styleTarget));
                break;

            case appendType.frame:
                render.AppendFrame(ins.getProperString(d.dsa_contentLine), ins.getProperInt32(-1, d.dsa_w), ins.getProperInt32(-1, d.dsa_h), ins.getProperString(d.dsa_title), ins.getProperString(d.dsa_description), (IEnumerable <string>)ins.getProperField(d.dsa_content));
                break;

            case appendType.placeholder:
                render.AppendPlaceholder(ins.getProperField(d.dsa_name), ins.isHorizontal);
                break;

            case appendType.list:
                render.AppendList((IEnumerable <object>)ins.getProperField(d.dsa_content), (bool)ins.getProperField(d.dsa_on));
                break;

            case appendType.footnote:
                throw new NotImplementedException("No implementation for: " + ins.type.ToString());
                break;

            case appendType.c_line:

                render.AppendHorizontalLine();

                break;

            case appendType.c_data:
                object dataSource = ins.getProperField(d.dsa_dataPairs, d.dsa_dataList, d.dsa_value);
                string _head      = ins.getProperString("", d.dsa_title, d.dsa_name);
                string _foot      = ins.getProperString("", d.dsa_footer, d.dsa_description);
                if (dataSource is PropertyCollection)
                {
                    PropertyCollection pairs = dataSource as PropertyCollection;
                    string             sep   = ins.getProperString(d.dsa_separator);
                    if (imbSciStringExtensions.isNullOrEmpty(_foot))
                    {
                        _foot = pairs.getAndRemoveProperString(d.dsa_footer, d.dsa_description);
                    }
                    if (imbSciStringExtensions.isNullOrEmpty(_head))
                    {
                        _head = pairs.getAndRemoveProperString(d.dsa_title, d.dsa_description);
                    }

                    if (!imbSciStringExtensions.isNullOrEmpty(_foot))
                    {
                        pairs.Add(d.dsa_footer.ToString(), _foot);
                    }
                    if (!imbSciStringExtensions.isNullOrEmpty(_head))
                    {
                        pairs.Add(d.dsa_title.ToString(), _head);                                                   // list.Insert(0, _head);
                    }
                    render.AppendPairs(pairs, ins.isHorizontal, sep);
                    // pair
                }
                else if (dataSource is IList <object> )
                {
                    IList <object> list = dataSource as IList <object>;
                    if (!imbSciStringExtensions.isNullOrEmpty(_foot))
                    {
                        list.Add(_foot);
                    }
                    if (!imbSciStringExtensions.isNullOrEmpty(_head))
                    {
                        list.Insert(0, _head);
                    }

                    render.AppendList(list, false);
                }
                break;

            case appendType.c_pair:
                render.AppendPair(ins.getProperString(d.dsa_key, d.dsa_name, d.dsa_title),
                                  ins.getProperField(d.dsa_value, d.dsa_contentLine, d.dsa_dataField, d.dsa_content),
                                  true,
                                  ins.getProperString(" ", d.dsa_separator)
                                  );
                break;

            case appendType.c_table:
                try
                {
                    DataTable dt2 = (DataTable)ins[d.dsa_dataTable];     // .getProperObject<DataTable>(d.dsa_dataTable);
                    if (dt2.Rows.Count == 0)
                    {
                    }
                    dt2.ExtendedProperties.add(templateFieldDataTable.data_tablename, ins[d.dsa_title], true);
                    dt2.ExtendedProperties.add(templateFieldDataTable.data_tabledesc, ins[d.dsa_description], true);
                    dt2 = dt2.CompileTable(context as deliveryInstance, reportOutputFormatName.htmlViaMD, levelsOfNewDirectory);     //  <------------- privremeni hack

                    render.AppendTable(dt2, true);
                }
                catch (Exception ex)
                {
                }
                break;

            case appendType.c_link:
                render.AppendLink(ins.getProperString(d.dsa_url, d.dsa_value),
                                  ins.getProperString(d.dsa_name, d.dsa_contentLine, d.dsa_key), ins.getProperString(d.dsa_title, d.dsa_description, d.dsa_footer),
                                  ins.getProperEnum <appendLinkType>(appendLinkType.link));
                break;

            case appendType.section:
                render.AppendSection(
                    ins.getProperString(d.dsa_contentLine),
                    ins.getProperString(d.dsa_title, d.dsa_name),
                    ins.getProperString(d.dsa_description),
                    ins.getProperField(d.dsa_content) as IEnumerable <string>);
                break;

            case appendType.c_section:
                render.AppendSection(
                    ins.getProperString(d.dsa_contentLine),
                    ins.getProperString(d.dsa_title, d.dsa_name),
                    ins.getProperString(d.dsa_description),
                    ins.getProperField(d.dsa_content) as IEnumerable <string>);
                break;

            case appendType.c_open:
                render.open(ins.getProperString("section", d.dsa_contentLine, d.dsa_name, d.dsa_key), ins.getProperString(d.dsa_title), ins.getProperString(d.dsa_description));
                break;

            case appendType.c_close:
                render.close(ins.getProperString("none", d.dsa_contentLine, d.dsa_name, d.dsa_key));
                break;

            case appendType.source:
                string        sourcecode = "";
                List <string> scode      = ins.getProperObject <List <string> >(d.dsa_content);

                sourcecode = scode.toCsvInLine(Environment.NewLine);
                string sc_name     = ins.getProperString("code", d.dsa_name);
                string sc_desc     = ins.getProperString("", d.dsa_description, d.dsa_footer);
                string sc_title    = ins.getProperString("", d.dsa_title);
                string sc_typename = ins.getProperString("html", d.dsa_class_attribute);

                render.open(sc_name, sc_title, sc_desc);
                render.AppendCode(sourcecode, sc_typename);
                render.close();
                //render.close(ins.getProperString("none", d.dsa_contentLine, d.dsa_name, d.dsa_key));
                break;

            default:
                //executionError(String.Format("Instruction ({0}) not supported by runComplexInstruction() method", ins.type.ToString()), ins);
                return(ins.type);

                break;
            }

            return(appendType.none);
        }