예제 #1
0
        public static ctrl_TableList add_Jint_Stats_Row(this ctrl_TableList tableList, int index, string url, string html, HtmlAgilityPack.HtmlDocument htmlDocument, List <KeyValuePair <string, string> > javaScripts)
        {
            var links  = htmlDocument.select("//a");
            var images = htmlDocument.select("//img");
            var forms  = htmlDocument.select("//form");
            var allJavaScriptsCompileOk  = javaScripts.allJavaScriptsCompileOk();
            var allJavaScriptCompiledAst = javaScripts.jint_Compile();
            var sizeOfJointJavaScripts   = javaScripts.getStringWithJointJavascripts().size();

            //var scripts =  htmlDocument.select("//script");
            tableList.add_Row(
                "{0:00}".format(index),                                            //(mapped++).str(),
                url,
                "{0:000}".format(links.size()),
                "{0:000}".format(images.size()),
                "{0:000}".format(forms.size()),
                "{0:000}".format(javaScripts.size()),
                allJavaScriptsCompileOk.str(),
                "{0:0000}".format(allJavaScriptCompiledAst.functions().size()),
                "{0:0000}".format(allJavaScriptCompiledAst.values().size()),
                sizeOfJointJavaScripts.kBytesStr(),
                javaScripts.totalValueSize().kBytesStr(),
                html.size().kBytesStr()
                );
            tableList.lastRow().textColor((allJavaScriptsCompileOk) ?  Color.DarkGreen : Color.DarkRed);
            return(tableList);
        }