public ConnectionFactory CreateConnectionFactory() { if (connectionString.Length == 0 || providerName.Length == 0) { return(null); } GmProviderFactory prov = GmProviders.Get(providerName); return(prov.CreateConnectionFactory(connectionString)); }
public static ConnectionInfo CreateGisDb(DbCreationProperties props) { string providerName = props.providerName; GmProviderFactory pr = GmProviders.Get(providerName); if (pr == null) { throw new GeoLibException("MapCreator. Provider not found: " + providerName); } string connStr = pr.CreateDatabase(props); UpdateDb(pr.CreateConnectionFactory(connStr)); return(new ConnectionInfo(props.dbName, providerName, connStr, "")); }
public App(MainForm mainForm, Config config) { if (instance != null) { throw new WinMapException("App instance already initialized."); } instance = this; SetAttr(ControlsAttr.AutoSave, true); SetAttr(ControlsAttr.ShowPropertiesOnSelect, true); Log.Info("Application started."); this.mainForm = mainForm; this.config = config; connConfig = ConnectionsConfig.DeserializeFile(ConnectionsFilePath); GmProviders.Add(new OracleProvider()); }