Пример #1
0
        /// <summary>
        /// This is the heart of the global releaser system.
        /// </summary>
        /// <param name="m">The monitor to use.</param>
        /// <param name="versionSelector">The version selector.</param>
        /// <returns>A <see cref="ReleaseInfo"/> that can be invalid.</returns>
        public ReleaseInfo EnsureReleaseInfo(IActivityMonitor m, IReleaseVersionSelector versionSelector)
        {
            if (_releaseInfo.IsValid)
            {
                return(_releaseInfo);
            }
            var newR = ComputeReleaseInfo(m, versionSelector);

            if (newR.IsValid)
            {
                _previouslyResolvedInfo = _releaseInfo;
            }
            return(_releaseInfo = newR);
        }
Пример #2
0
 /// <summary>
 /// Computes the road map for all the solutions.
 /// </summary>
 /// <param name="m">The monitor to use.</param>
 /// <param name="versionSelector">The version selector to use.</param>
 /// <param name="forgetAllExistingRoadmapVersions">
 /// True to automatically skip any previously reolved versions.
 /// <paramref name="versionSelector"/> will not see them.
 /// </param>
 /// <returns>True on success, false on error or cancellation..</returns>
 public bool UpdateRoadmap(IActivityMonitor m, IReleaseVersionSelector versionSelector, bool forgetAllExistingRoadmapVersions)
 {
     if (!forgetAllExistingRoadmapVersions)
     {
         foreach (var info in _infos)
         {
             info.ClearReleaseInfo();
         }
     }
     foreach (var info in _infos)
     {
         if (!info.EnsureReleaseInfo(m, versionSelector).IsValid)
         {
             return(false);
         }
     }
     return(true);
 }