Exemple #1
0
        private void Load(System.Data.DataRow row)
        {
            _rowid = row.GetLong("rowid");

            _path = row.GetString("path");
            if (string.IsNullOrWhiteSpace(_path))
            {
                throw new SettingsException("No location specified.");
            }

            _type           = row.GetEnum <LocationType>("type", LocationType.Directory);
            _updateFreq     = row.GetInt("update_freq", k_defaultUpdateInterval);
            _updatePeriod   = row.GetEnum <Period>("update_period", k_defaultUpdatePeriod);
            _updateInterval = TimeSpanUtil.CalcInterval(_updateFreq, _updatePeriod);

            _disabled = row.GetBoolean("disabled", false);

            _lastUpdate = row.GetDateTime("last_update", DateTime.MinValue);
        }