Exemple #1
0
        private static void testGetEntries(ISuperLoggingConnection conn, bool printEntries)
        {
            int counter = 0;
            ISuperLoggingCookie cookie = new SuperLoggingCookie();
            uint pageSize = 100;
            ISuperLogEntryList list;

            do
            {
                list     = conn.getPagedEntries(cookie, pageSize);
                counter += list.getCount();
            } while (list.getCount() == pageSize);

            list = conn.getAllEntries();

            if (printEntries)
            {
                foreach (ISuperLogEntry e in list)
                {
                    Console.WriteLine(e);
                }
            }

            Console.WriteLine("GetPagedEntries: " + counter + ", GetAllEntries: " + list.getCount());
            return;
        }
        private static void testGetEntries(ISuperLoggingConnection conn, bool printEntries)
        {
            int counter = 0;
            ISuperLoggingCookie cookie = new SuperLoggingCookie();
            uint pageSize = 100;
            ISuperLogEntryList list;

            do
            {
                list = conn.getPagedEntries(cookie, pageSize);
                counter += list.getCount();
            } while (list.getCount() == pageSize);

            list = conn.getAllEntries();

            if (printEntries)
            {
                foreach (ISuperLogEntry e in list)
                {
                    Console.WriteLine(e);
                }
            }

            Console.WriteLine("GetPagedEntries: " + counter + ", GetAllEntries: " + list.getCount());
            return;
        }
Exemple #3
0
        private static void testClear(ISuperLoggingConnection conn)
        {
            conn.clear();
            ISuperLogEntryList list = conn.getAllEntries();

            Console.WriteLine("GetAllEntries after clear: " + list.getCount());

            conn.clear();
            ISuperLoggingCookie cookie = new SuperLoggingCookie();
            uint pageSize = 100;

            list = conn.getPagedEntries(cookie, pageSize);
            Console.WriteLine("GetPagedEntries after clear: " + list.getCount());

            return;
        }
        private static void testGetTable(ISuperLoggingConnection conn)
        {
            conn.enable();
            ISuperLogEntryList list = conn.getAllEntries();
            SuperLogTableColumnSet colSet = new SuperLogTableColumnSet();
            colSet[SuperLogTableColumn.LOGIN_DN] = true;
            colSet[SuperLogTableColumn.OPERATION] = true;
            colSet[SuperLogTableColumn.STRING] = true;
            colSet[SuperLogTableColumn.ERROR_CODE] = true;
            colSet[SuperLogTableColumn.AVG_TIME] = true;
            ISuperLogTable table = conn.aggregate(list, colSet);

            foreach (ISuperLogTableRow r in table)
            {
                Console.WriteLine(r.ToString());
            }
            return;
        }
Exemple #5
0
        private static void testGetTable(ISuperLoggingConnection conn)
        {
            conn.enable();
            ISuperLogEntryList     list   = conn.getAllEntries();
            SuperLogTableColumnSet colSet = new SuperLogTableColumnSet();

            colSet[SuperLogTableColumn.LOGIN_DN]   = true;
            colSet[SuperLogTableColumn.OPERATION]  = true;
            colSet[SuperLogTableColumn.STRING]     = true;
            colSet[SuperLogTableColumn.ERROR_CODE] = true;
            colSet[SuperLogTableColumn.AVG_TIME]   = true;
            ISuperLogTable table = conn.aggregate(list, colSet);

            foreach (ISuperLogTableRow r in table)
            {
                Console.WriteLine(r.ToString());
            }
            return;
        }
        private static void testClear(ISuperLoggingConnection conn)
        {
            conn.clear();
            ISuperLogEntryList list = conn.getAllEntries();
            Console.WriteLine("GetAllEntries after clear: " + list.getCount());

            conn.clear();
            ISuperLoggingCookie cookie = new SuperLoggingCookie();
            uint pageSize = 100;
            list = conn.getPagedEntries(cookie, pageSize);
            Console.WriteLine("GetPagedEntries after clear: " + list.getCount());

            return;
        }