Example #1
0
        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();
                }
            }
        }
Example #2
0
        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;
        }
Example #3
0
 public GitHubInfo(object obj, AddonInfo addonInfo)
 {
     this.addonInfo = addonInfo;
     ParseJson(obj);
 }