Example #1
0
 /// <summary>
 ///   Sets "to be version" according to configuration settings.
 /// </summary>
 /// <param name="versionProvider">
 ///   Version provider.
 /// </param>
 public void SetToBecomeVersion(NewVersionProvider versionProvider)
 {
     if (CurrentAssemblyVersions != AssemblyVersions.Empty)
     {
         m_toBecomeAssemblyVersions = versionProvider.ProposeNewVersions(CurrentAssemblyVersions);
     }
 }
 /// <summary>
 ///   Creates a <c>ProjectInfoList</c> containing <c>ProjectInfo</c>
 ///   objects that have passed the filter provided.
 /// </summary>
 /// <param name="projectInfos">
 ///   An array of all <c>ProjectInfo</c> objects.
 /// </param>
 /// <param name="filter">
 ///   A filter used to select <c>ProjectInfo</c> objects.
 /// </param>
 /// <param name="newVersionProvider">
 ///   <c>NewVersionProvider</c> object responsible to propose a new
 ///   version for each <c>ProjectInfo</c> object.
 /// </param>
 /// <param name="assemblyVersionsUpdateMask">
 ///   Mask defining which versions (AssemblyInfo, Informational or
 ///   Product) may be updated.
 /// </param>
 public ProjectInfoList(ProjectInfo[] projectInfos, IProjectFilter filter, NewVersionProvider newVersionProvider, AssemblyVersionType assemblyVersionsUpdateMask)
 {
     m_projectInfos = new ArrayList(projectInfos.Length);
     m_highestToBeAssemblyVersions    = AssemblyVersions.MinValue;
     m_highestProposedAssemblyVersion = AssemblyVersions.MinValue;
     foreach (ProjectInfo projectInfo in projectInfos)
     {
         if (filter.Pass(projectInfo))
         {
             ProjectInfo pi = projectInfo;
             pi.SetToBecomeVersion(newVersionProvider);
             if (pi.Modified)
             {
                 pi.MarkAssemblyVersionsForUpdate(assemblyVersionsUpdateMask);
             }
             m_projectInfos.Add(pi);
             m_highestToBeAssemblyVersions    = AssemblyVersions.Max(m_highestToBeAssemblyVersions, pi);
             m_highestProposedAssemblyVersion = AssemblyVersions.MaxProposed(m_highestProposedAssemblyVersion, pi);
         }
     }
 }
 private void SetNumberingOptions(NumberingOptions options)
 {
     Debug.Assert(options != null);
     m_numberingOptions   = options;
     m_newVersionProvider = new NewVersionProvider(m_numberingOptions);
 }