Example #1
0
        public void RenderAndShow(Transaction tx, TableBase table, int showEntries = 25)
        {
            if (Debugger.IsAttached == false)
                return;

            var tree = tx.State.GetTree(tx, table.TableName);

            var path = Path.Combine(System.Environment.CurrentDirectory, "test-tree.dot");
            var rootPageNumber = tree.State.RootPageNumber;
            TreeDumper.Dump(tx, path, tx.GetReadOnlyPage(rootPageNumber), showEntries);

            var output = Path.Combine(System.Environment.CurrentDirectory, "output.svg");
            var p = Process.Start(@"c:\Program Files (x86)\Graphviz2.32\bin\dot.exe", "-Tsvg  " + path + " -o " + output);
            p.WaitForExit();
            Process.Start(output);
        }
Example #2
0
 public long GetEntriesCount(TableBase table)
 {
     using (var tx = env.NewTransaction(TransactionFlags.Read))
     {
         return tx.State.GetTree(tx, table.TableName).State.EntriesCount;
     }
 }
Example #3
0
        public void RenderAndShow(TableBase table, int showEntries = 25)
        {
            if (Debugger.IsAttached == false)
                return;

            using (var tx = env.NewTransaction(TransactionFlags.Read))
            {
                RenderAndShow(tx, table, showEntries);
            }
        }