예제 #1
0
        private void BuildWatcherStatusChecked(object sender, StatusCheckedEventArgsArgs args)
        {
            ApplyUserMappings(args);
            SendCiServerConnectedEvents();
            TryToGetAndSendNewSosOnlineAlerts();
            BuildStatus[]       allBuildStatuses     = BuildStatusUtil.Merge(_previousBuildStatuses, args.BuildStatuses);
            IList <BuildStatus> changedBuildStatuses = GetChangedBuildStatuses(allBuildStatuses);

            if (!changedBuildStatuses.Any())
            {
                return;
            }
            InvokeSetTrayIcon(changedBuildStatuses);
            InvokeRefreshStatusIfAnythingChanged(allBuildStatuses, changedBuildStatuses);
            AddAnyNewPeopleToSettings(changedBuildStatuses);
            UpdateBuildNamesInSettingsIfAnyChanged(changedBuildStatuses);
            IList <ChangedBuildStatusesAndTheirPreviousState> changedBuildStatusesAndTheirPreviousState = GetChangedBuildStatusesAndTheirPreviousState(changedBuildStatuses);

            FireApplicableRulesEngineEvents(changedBuildStatusesAndTheirPreviousState);
            WriteNewBuildsToSosDb(changedBuildStatusesAndTheirPreviousState);
            NotifyIfNewAchievements(changedBuildStatuses);
            InvokeStatsChanged(changedBuildStatuses);
            SyncNewBuildsToSos(changedBuildStatuses);
            InvokeNewNewsItemIfAny(changedBuildStatusesAndTheirPreviousState);
            CacheBuildStatuses(changedBuildStatuses);
        }
예제 #2
0
 private void ApplyUserMappings(StatusCheckedEventArgsArgs args)
 {
     foreach (var buildStatus in args.BuildStatuses)
     {
         string requestedBy = buildStatus.RequestedBy;
         var    userMapping = _settings.UserMappings.FirstOrDefault(i => i.WhenISee == requestedBy);
         bool   userMappingExistsForThisUser = userMapping != null;
         if (userMappingExistsForThisUser)
         {
             buildStatus.RequestedBy = userMapping.PretendItsActually;
         }
     }
 }
예제 #3
0
        private void ApplyUserMappings(StatusCheckedEventArgsArgs args)
        {
            foreach (var buildStatus in args.BuildStatuses)
            {
                if (buildStatus == null)
                {
                    _log.Warn("There was a BuildStatus that was null, this should never happen.");
                    continue;
                }

                string requestedBy = buildStatus.RequestedBy;
                var    userMapping = _settings.UserMappings.FirstOrDefault(i => i.WhenISee == requestedBy);
                bool   userMappingExistsForThisUser = userMapping != null;
                if (userMappingExistsForThisUser)
                {
                    buildStatus.RequestedBy = userMapping.PretendItsActually;
                }
            }
        }
예제 #4
0
 private void BuildWatcherStatusChecked(object sender, StatusCheckedEventArgsArgs args)
 {
     ApplyUserMappings(args);
     SendCiServerConnectedEvents();
     TryToGetAndSendNewSosOnlineAlerts();
     BuildStatus[] allBuildStatuses = BuildStatusUtil.Merge(_previousBuildStatuses, args.BuildStatuses);
     IList<BuildStatus> changedBuildStatuses = GetChangedBuildStatuses(allBuildStatuses);
     if (!changedBuildStatuses.Any()) return;
     InvokeSetTrayIcon(changedBuildStatuses);
     InvokeRefreshStatusIfAnythingChanged(allBuildStatuses, changedBuildStatuses);
     AddAnyNewPeopleToSettings(changedBuildStatuses);
     UpdateBuildNamesInSettingsIfAnyChanged(changedBuildStatuses);
     IList<ChangedBuildStatusesAndTheirPreviousState> changedBuildStatusesAndTheirPreviousState = GetChangedBuildStatusesAndTheirPreviousState(changedBuildStatuses);
     FireApplicableRulesEngineEvents(changedBuildStatusesAndTheirPreviousState);
     WriteNewBuildsToSosDb(changedBuildStatusesAndTheirPreviousState);
     NotifyIfNewAchievements(changedBuildStatuses);
     InvokeStatsChanged(changedBuildStatuses);
     SyncNewBuildsToSos(changedBuildStatuses);
     InvokeNewNewsItemIfAny(changedBuildStatusesAndTheirPreviousState);
     CacheBuildStatuses(changedBuildStatuses);
 }
예제 #5
0
 private void ApplyUserMappings(StatusCheckedEventArgsArgs args)
 {
     foreach (var buildStatus in args.BuildStatuses)
     {
         string requestedBy = buildStatus.RequestedBy;
         var userMapping = _settings.UserMappings.FirstOrDefault(i => i.WhenISee == requestedBy);
         bool userMappingExistsForThisUser = userMapping != null;
         if (userMappingExistsForThisUser)
         {
             buildStatus.RequestedBy = userMapping.PretendItsActually;
         }
     }
 }
예제 #6
0
 private void BuildWatcherStatusChecked(object sender, StatusCheckedEventArgsArgs args)
 {
     ExecuteNewBuilds(args.BuildStatuses);
 }
예제 #7
0
 private void BuildWatcherStatusChecked(object sender, StatusCheckedEventArgsArgs args)
 {
     ExecuteNewBuilds(args.BuildStatuses);
 }