private void doDataLiftWork() { try { _log.Debug("+doDataLiftWork()"); this._registry = new LocalRegistryService(); if (this._registry.isRegistry()) { if (this.isGreaterThanADay(_registry.getLastRunDateFromRegistry()) || this._registry.getRunNowBooleanFromRegistry()) { this._readingDao = new ReadingDao(); this._deviceDao = new DeviceDao(); this._run = new ScheduledRun(this._registry, this._readingDao, this._deviceDao); this._run.getDataAndPostToWebService(); //After use, set date to now and run now to false this._registry.setRegistryValueLastRunDateToNow(); this._registry.setRegistryValueRunNowBoolean(); } } else { this._registry.CreateRegistryPathAndAllValues(); } _log.Debug("-doDataLiftWork()"); } catch (Exception ex) { _log.Error("-doDataLiftWork() Message: " + ex.Message + " InnerException: " + ex.InnerException); } }
public ScheduledRun(LocalRegistryService registry, IReadingDao readingDao, IDeviceDao deviceDao) { _log.Debug("+ScheduledRun()"); this._registry = registry; this._readingDao = readingDao; this._deviceDao = deviceDao; _log.Debug("-ScheduledRun()"); }
public void Update(ReadingDto[] newReadings) { Debug.Assert(newReadings.Length <= this.maxSize); foreach (ReadingDto reading in newReadings) { IReadingDao dao = AllocateReading(); dao.Update(reading); } UpdateCurrentSize(); }
internal void FixupFromDto(ReadingDto dto) { this.dao = dto.Dao; this.value = dto.Value; this.timestamp = dto.Timestamp; }