/// <summary> /// The run once. /// </summary> public override void RunOnce() { try { using (var reg = new RegisterV2()) { reg.Timeout = 30000; // load the latest info -- but only provide the current version information and the user's two-letter language information. Nothing trackable.)) var latestInfo = reg.LatestInfo(YafForumInfo.AppVersionCode, this.Culture); if (latestInfo != null) { this.Get<HttpApplicationStateBase>().Set("YafRegistrationLatestInformation", latestInfo); } } } catch (Exception x) { LegacyDb.eventlog_create(null, _taskName, "Exception In {1}: {0}".FormatWith(x, _taskName)); } }
/// <summary> /// Gets the latest version information. /// </summary> /// <returns>Returns the LatestVersionInformation</returns> public LatestVersionInformation GetLatestVersionInformation() { var latestInfo = this.Get<HttpApplicationStateBase>()["YafRegistrationLatestInformation"] as LatestVersionInformation; if (latestInfo != null) { return latestInfo; } try { using (var reg = new RegisterV2()) { reg.Timeout = 30000; // load the latest info -- but only provide the current version information and the user's two-letter language information. Nothing trackable.)) latestInfo = reg.LatestInfo(YafForumInfo.AppVersionCode, "US"); if (latestInfo != null) { this.Get<HttpApplicationStateBase>().Set("YafRegistrationLatestInformation", latestInfo); } } } #if DEBUG catch (Exception x) { this.Get<ILogger>().Error(x, "Exception In LatestInformationService"); #else catch (Exception) { #endif return null; } return latestInfo; }
/// <summary> /// The run once. /// </summary> public override void RunOnce() { try { using (var reg = new RegisterV2()) { reg.Timeout = 30000; // load the latest info -- but only provide the current version information and the user's two-letter language information. Nothing trackable.)) var latestInfo = reg.LatestInfo(YafForumInfo.AppVersionCode, this.Culture); if (latestInfo != null) { this.Get<HttpApplicationStateBase>().Set("YafRegistrationLatestInformation", latestInfo); } } } catch (Exception x) { #if DEBUG this.Logger.Error(x, "Exception In {0}", _taskName); #endif } }