internal int Gc([NotNull] SnapApp snapApp) { if (snapApp == null) { throw new ArgumentNullException(nameof(snapApp)); } return(Releases.RemoveAll(x => x.Id == snapApp.Id && x.Target.Rid == snapApp.Target.Rid)); }
public int Demote(ISnapAppReleases releases) { var releasesRemoved = Releases.RemoveAll(snapRelease => releases.Any(snapDemotedRelease => snapDemotedRelease.Filename == snapRelease.Filename)); if (releasesRemoved <= 0) { return(0); } Releases = Releases.OrderBy(x => x.Version, new VersionComparer(VersionComparison.Default)).ToList(); return(releasesRemoved); }