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); } } } }
internal void SetConfiguration(FdoDataStoreConfiguration conf) { _schemas = conf.Schemas; _mappings = conf.Mappings; if (_schemas == null) _schemas = new FeatureSchemaCollection(null); if (_mappings == null) _mappings = new PhysicalSchemaMappingCollection(); _spatialContexts.Clear(); if (conf.SpatialContexts != null && conf.SpatialContexts.Length > 0) { foreach (var sc in conf.SpatialContexts) { _spatialContexts.Add(sc); } } }
public ImportElementsDialog(FdoDataStoreConfiguration dataStore, SchemaDesignContext context) : this() { _dataStore = dataStore; _context = context; }