void OnNewVersion(DogVersion v) { try { lock (_door) { _newDogVersion = v; } if (_versionToIgnore == null || v.Version > _versionToIgnore) { log.Info("New version found: " + v.Version); UpdateNotificator.ChangePeriod(TimerPeriodNewVersinWasDetected); NotifyNewVersionFound(v); } else { log.Info("Same version found: " + v.Version); UpdateNotificator.ChangePeriod(TimerPeriodIfSameVersionDetected); } } catch (Exception ex) { log.Error("On new version failed", ex); } }
private void NotifyNewVersionFound(DogVersion version) { try { if (NewVersionFound != null) { NewVersionFound(version); } } catch (Exception ex) { log.Error("New Version Notification failed", ex); } }
public VersionRetrieverResult(bool isRetrieved, DogVersion version) { IsRetrieved = isRetrieved; RetrievedVersion = version; }