private VersionChecker CreateVersionChecker(ICoolConfiguration coolConfiguration) { return new VersionChecker { MinCheckTime = TimeSpan.FromSeconds(1), CurrentVersion = Version.Parse(textBoxAzzulVersion.Text), AppInfoProvider = new HttpAppVersionInfoProvider { Url = GetRepositoryUrl(coolConfiguration), AppName = "Azzul" } }; }
private static string GetRepositoryUrl(ICoolConfiguration coolConfiguration) { bool existsCustomUrl = coolConfiguration.CoolConfig != null && !string.IsNullOrEmpty(coolConfiguration.CoolConfig.Update.Url); return existsCustomUrl ? coolConfiguration.CoolConfig.Update.Url : DefaultCheckUrl; }
public VersioningOptions(ICoolConfiguration coolConfiguration) { if (coolConfiguration == null) throw new ArgumentNullException("coolConfiguration"); this.coolConfiguration = coolConfiguration; }