Example #1
0
 public void AddVersion(PackageItemDocument version)
 {
     if (!Versions.Contains(version))
     {
         Versions.Add(version);
         if (string.Compare(LatestVersion, version.Version) < 0)
         {
             LatestVersion = version.Version;
             RaisePropertyChanged(nameof(LatestVersion));
         }
     }
 }
Example #2
0
        private void LoadPackages()
        {
            PackagesList.Clear();

            foreach (XmlNode packageNode in _root.GetElementsByTagName("package"))
            {
                var item = new PackageItemDocument(packageNode);

                if (item.HasVersion)
                {
                    PackagesList.Add(item);
                }
            }

            RaisePropertyChanged(nameof(PackagesList));
        }
Example #3
0
 public VersionedPackage(PackageItemDocument package)
 {
     this.Package = package;
     this.Versions.Add(package);
     this.LatestVersion = package.Version;
 }