using System;
using ESRI.ArcGISExplorer.Data;

namespace MyExtension
{
    public class TestExtension : ESRI.ArcGISExplorer.Application.Extension
    {
        public override void OnStartup()
        {
            using (System.IO.StreamWriter sw = System.IO.File.CreateText(@"C:\Temp\FGDB.txt"))
            {
                Geodatabase gdb = new Geodatabase(@"C:\Users\sstanton\Data\Data.gdb");
                sw.WriteLine("gdb opened");

                foreach (Table t in gdb.GetTables())
                {
                    RowCollection rc = t.GetRows();
                    string msg = String.Format("Name={0} IsSpatial={1} GeomType={2} RowCount={3}",
                                        t.Name, t.IsSpatial, t.GeometryType, rc.Count);
                    sw.WriteLine(msg);
                }
            }

            System.Windows.Forms.Application.Exit();
        }
    }
}
