public static bool IsMatchingVersion(
            this FeedVersion version,
            string tag,
            bool isStrict
            )
        {
            var releaseLabels = version?.Version?.ReleaseLabels;

            if (tag.IsNullOrEmpty() || tag == "stable")
            {
                return(releaseLabels?.None() ?? true);                //Stable versions have no release labels
            }

            var hasTag = ContainsTag(releaseLabels, tag);

            return(isStrict
                                ? releaseLabels?.Count() == 2 && hasTag // Check strictly for packages with versions "dev.XXXX"
                                : hasTag);                              // Allow packages with versions "dev.XXXX.XXXX"
        }
 private UpdateOperation(string packageId, NuGetVersion previousVersion, FeedVersion updatedVersion, string filePath, bool canDowngrade)
     : this(packageId, previousVersion, updatedVersion.Version, updatedVersion.FeedUri, filePath, canDowngrade)
 {
 }
 public UpdateOperation(string packageId, FeedVersion updatedVersion, bool canDowngrade)
     : this(packageId, previousVersion : null, updatedVersion, filePath : null, canDowngrade)
 {
 }
Exemple #4
0
 public UpdaterPackage(PackageReference reference, FeedVersion version)
 {
     Reference = reference;
     PackageId = reference.Identity.Id;
     Version   = version;
 }
Exemple #5
0
 public Feed(Feed feed)
 {
     this.authors = feed.authors;
     this.categories = feed.categories;
     this.cloud = feed.cloud;
     this.contributors = feed.contributors;
     this.copyright = feed.copyright;
     this.description = feed.description;
     this.generator = feed.generator;
     this.icon = feed.icon;
     this.id = feed.id;
     this.image = feed.image;
     this.items = feed.items;
     this.language = feed.language;
     this.modules = feed.modules;
     this.published = feed.published;
     this.rssDocumentation = feed.rssDocumentation;
     this.skipDays = feed.skipDays;
     this.skipHours = feed.skipHours;
     this.title = feed.title;
     this.ttl = feed.ttl;
     this.updated = feed.updated;
     this.version = feed.version;
     this.webMaster = feed.webMaster;
     this.webUri = feed.webUri;
     this.xmlUri = feed.xmlUri;
 }