Class for easy logging.
        public override void Run()
        {
            string path = FileService.SaveFile(Res.GetString("TITLE_EXPORT_DATASTORE_XML"), Res.GetString("FILTER_XML_FILES"));

            if (!string.IsNullOrEmpty(path))
            {
                TreeNode             connNode = Workbench.Instance.ObjectExplorer.GetSelectedNode();
                FdoConnectionManager mgr      = ServiceManager.Instance.GetService <FdoConnectionManager>();
                FdoConnection        conn     = mgr.GetConnection(connNode.Name);

                using (new TempCursor(Cursors.WaitCursor))
                {
                    using (var svc = conn.CreateFeatureService())
                    {
                        var scs      = new List <SpatialContextInfo>(svc.GetSpatialContexts()).ToArray();
                        var schemas  = svc.DescribeSchema();
                        var mappings = svc.DescribeSchemaMapping(true);

                        var dstore = new FdoDataStoreConfiguration(schemas, scs, mappings);
                        dstore.Save(path);

                        Log.InfoFormatted("Connection saved to: {0}", path);
                    }
                }
            }
        }
        public override void Run()
        {
            string path = FileService.SaveFile(Res.GetString("TITLE_SAVE_CONNECTION"), Res.GetString("FILTER_CONNECTION_FILE"));

            if (!string.IsNullOrEmpty(path))
            {
                TreeNode             connNode = Workbench.Instance.ObjectExplorer.GetSelectedNode();
                FdoConnectionManager mgr      = ServiceManager.Instance.GetService <FdoConnectionManager>();
                FdoConnection        conn     = mgr.GetConnection(connNode.Name);
                conn.Save(path);
                Log.InfoFormatted("Connection saved to: {0}", path);
            }
        }
        public override void Run()
        {
            TreeNode schemaNode = Workbench.Instance.ObjectExplorer.GetSelectedNode();

            if (schemaNode.Level == 2 && MessageService.AskQuestion("Are you sure you want to delete this schema?"))
            {
                FdoConnectionManager mgr  = ServiceManager.Instance.GetService <FdoConnectionManager>();
                FdoConnection        conn = mgr.GetConnection(schemaNode.Parent.Name);
                using (FdoFeatureService service = conn.CreateFeatureService())
                {
                    try
                    {
                        service.DestroySchema(schemaNode.Name);
                        Msg.ShowMessage(Res.GetString("MSG_SCHEMA_DELETED"), Res.GetString("TITLE_DELETE_SCHEMA"));
                        Log.InfoFormatted(Res.GetString("LOG_SCHEMA_DELETED"), schemaNode.Name, schemaNode.Parent.Name);
                        mgr.RefreshConnection(schemaNode.Parent.Name);
                    }
                    catch (OSGeo.FDO.Common.Exception ex)
                    {
                        Msg.ShowError(ex);
                    }
                }
            }
        }