private void FetchLocalInfo(string path) { using (var stream = new StreamReader(File.OpenRead(path))) { LocalInfo = new AddonInfo(path, stream.ReadToEnd()); IsLocalReady = true; if (LocalInfo.ParseError) { SetHasError(); } } }
private void SetRemoteInfo(string json) { RemoteInfo = new AddonInfo(LocalInfo.Url, json); RemoteInfo.FetchRemoteData(); #if true if (LocalInfo.Version == RemoteInfo.Version) { Logger.Log("Identical remote version found: Using remote version information only."); Logger.Log(RemoteInfo); Logger.Blank(); LocalInfo = RemoteInfo; } else #endif { Logger.Log(LocalInfo); Logger.Log(RemoteInfo + "\n\tUpdateAvailable: " + IsUpdateAvailable); Logger.Blank(); } IsRemoteReady = true; IsProcessingComplete = true; }
public GitHubInfo(object obj, AddonInfo addonInfo) { this.addonInfo = addonInfo; ParseJson(obj); }