Ejemplo n.º 1
0
        private void InstrumentNode(CNode node)
        {
            if (!instrument || node.Token == null || node.Token.Filename.ToUpper() == "ccodecoverage.asp".ToUpper() ||
                node.Token.Filename.ToUpper() == "codecoveragereport.asp".ToUpper())
            {
                return;
            }

            int num = instrumentnumber.intValue();

            instrumentnumber.increment();

            visitor.InstrumentNode(node, num);

            instrumentdb.Write(node.Token.Filename + "," + classname + "," + funcname + "," + node.Token.LineNumber +
                               "," + num +
                               ",");
            bool printeddb = false;

            if ((dbtype & DbMsSql) != 0)
            {
                instrumentdb.Write("DbMsSql");
                printeddb = true;
            }
            if ((dbtype & DbAccess) != 0)
            {
                if (printeddb)
                {
                    instrumentdb.Write("|");
                }
                instrumentdb.Write("DbAccess");
                printeddb = true;
            }
            if ((dbtype & DbMySql) != 0)
            {
                if (printeddb)
                {
                    instrumentdb.Write("|");
                }
                instrumentdb.Write("DbMySql");
                printeddb = true;
            }
            instrumentdb.WriteLine();
        }