Example #1
0
        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);
        }