示例#1
0
        public static Series Read(string cbtt, string pcode, DateTime t1, DateTime t2,
                                  TimeInterval interval, HydrometHost hydrometServer)
        {
            Series s = new Series();

            if (interval == TimeInterval.Daily)
            {
                s = HydrometDailySeries.Read(cbtt, pcode, t1, t2, hydrometServer);
            }
            else if (interval == TimeInterval.Irregular)
            {
                s = HydrometInstantSeries.Read(cbtt, pcode, t1, t2, hydrometServer);
            }
            else if (interval == TimeInterval.Monthly)
            {
                s = new HydrometMonthlySeries(cbtt, pcode, hydrometServer);
                s.Read(t1, t2);
            }
            else
            {
                throw new ArgumentException("Undefined TimeInterval", interval.ToString());
            }

            return(s);
        }
示例#2
0
        /// <summary>
        /// Creates series and reads data from hydromet web site.
        /// </summary>
        public static HydrometInstantSeries Read(string cbtt, string pcode,
                                                 DateTime t1, DateTime t2, HydrometHost server)
        {
            HydrometInstantSeries s = new HydrometInstantSeries(cbtt, pcode, server);

            s.Read(t1, t2);
            return(s);
        }
示例#3
0
        protected override Series CreateFromConnectionString()
        {
            HydrometHost svr;
            string       scbtt, spcode;

            HydrometInfoUtility.ParseConnectionString(ConnectionString, out svr, out scbtt, out spcode);

            HydrometInstantSeries s = new HydrometInstantSeries(scbtt, spcode, svr);

            return(s);
        }