public HDBWebSeries(TimeSeriesDatabase db, TimeSeriesDatabaseDataSet.SeriesCatalogRow sr) : base(db, sr) { string str = ConnectionStringUtility.GetToken(ConnectionString, "server", ""); m_server = (HDBServer)Enum.Parse(typeof(HDBServer), str); m_sdi = ConnectionStringUtility.GetIntFromConnectionString(ConnectionString, "sdi"); }
/// ctor used by PiscesFactory public EnsembleSeries(TimeSeriesDatabase db, Reclamation.TimeSeries.TimeSeriesDatabaseDataSet.SeriesCatalogRow sr) : base(db, sr) { _timeseries_blobs_id = ConnectionStringUtility.GetIntFromConnectionString(ConnectionString, "timeseries_blobs.id"); _member_length = ConnectionStringUtility.GetIntFromConnectionString(ConnectionString, "member_length"); var strDate = ConnectionStringToken("timeseries_start_date", ""); _timeseries_start_date = DateTime.Parse(strDate); _ensemble_member_index = ConnectionStringUtility.GetIntFromConnectionString(ConnectionString, "ensemble_member_index"); }
/// <summary> /// CreateFromConnectionString is used when calling Update to /// update a portion of the record for this series. /// </summary> /// <returns></returns> protected override Series CreateFromConnectionString() { string svr = ConnectionStringUtility.GetToken(ConnectionString, "server", ""); m_server = (HDBServer)Enum.Parse(typeof(HDBServer), svr); m_sdi = ConnectionStringUtility.GetIntFromConnectionString(ConnectionString, "sdi"); string sinterval = ConnectionStringUtility.GetToken(ConnectionString, "TimeInterval", ""); TimeInterval = (TimeInterval)Enum.Parse(typeof(TimeInterval), sinterval); HDBWebSeries s = new HDBWebSeries(m_sdi, TimeInterval, m_server); return(s); }
private int GetScenarioNumber(TimeSeriesDatabaseDataSet.ScenarioRow scenario) { var sn = ConnectionStringUtility.GetIntFromConnectionString(scenario.Path, "ScenarioNumber"); if (sn >= 0) // scenario number specified (use existing filename) { return(sn); } if (m_scenarioNumber >= 0 && m_db != null) { int idx = Array.IndexOf(m_db.GetScenarios().GetNames(), scenario.Name); if (idx >= 0) { sn = idx + 1; } } else { sn = m_scenarioNumber; } return(sn); }