private Modification[] GetModificationsWithLogging(ISourceControl sc, IIntegrationResult from, IIntegrationResult to)
 {
     Modification[] modifications = sc.GetModifications(from, to);
     if (modifications == null)
     {
         modifications = new Modification[0];
     }
     Log.Info(GetModificationsDetectedMessage(modifications));
     return(modifications);
 }
Exemple #2
0
        public Modification[] GetModifications(IIntegrationResult from, IIntegrationResult to)
        {
            Modification[] allModifications      = _realScProvider.GetModifications(from, to);
            ArrayList      acceptedModifications = new ArrayList();

            foreach (Modification modification in allModifications)
            {
                if (IsAcceptedByInclusionFilters(modification) &&
                    (!IsAcceptedByExclusionFilters(modification)))
                {
                    acceptedModifications.Add(modification);
                }
            }

            return((Modification[])acceptedModifications.ToArray(typeof(Modification)));
        }
Exemple #3
0
        /// <summary>
        /// Get the list of modifications from the inner source control provider and filter it.
        /// </summary>
        /// <returns>The filtered modification list.</returns>
        /// <remarks>
        /// A modification survives filtering if it is accepted by the inclusion filters and not accepted
        /// by the exclusion filters.
        /// </remarks>
        public override Modification[] GetModifications(IIntegrationResult from, IIntegrationResult to)
        {
            Modification[] allModifications      = _realScProvider.GetModifications(from, to);
            var            acceptedModifications = new List <Modification>();

            foreach (Modification modification in allModifications)
            {
                if (IsAcceptedByInclusionFilters(modification) &&
                    (!IsAcceptedByExclusionFilters(modification)))
                {
                    Log.Debug(string.Format(System.Globalization.CultureInfo.CurrentCulture, "Modification {0} was accepted by the filter specification.",
                                            modification));
                    acceptedModifications.Add(modification);
                }
                else
                {
                    Log.Debug(string.Format(System.Globalization.CultureInfo.CurrentCulture, "Modification {0} was not accepted by the filter specification.",
                                            modification));
                }
            }

            return(acceptedModifications.ToArray());
        }
 private Modification[] GetModificationsWithLogging(ISourceControl sc, IIntegrationResult from, IIntegrationResult to)
 {
     Modification[] modifications = sc.GetModifications(from, to);
     if (modifications == null)
         modifications = new Modification[0];
     Log.Info(GetModificationsDetectedMessage(modifications));
     return modifications;
 }