JustAProgrammer.TeamPilgrim.VisualStudio.Model.VersionControl.ShelveServiceModel.PopulateSelectedPendingChangesSummary C# (CSharp) Method

PopulateSelectedPendingChangesSummary() private method

private PopulateSelectedPendingChangesSummary ( ) : void
return void
        private void PopulateSelectedPendingChangesSummary()
        {
            if (_backgroundFunctionPreventDataUpdate)
                return;

            this.Logger().Trace("PopulateSelectedPendingChangesSummary");

            if (PendingChanges.Count == 0)
            {
                PendingChangesSummary = CollectionSelectionSummaryEnum.None;
                return;
            }

            var includedCount = PendingChanges.Count(model => model.IncludeChange);
            if (includedCount == 0)
            {
                PendingChangesSummary = CollectionSelectionSummaryEnum.None;
                return;
            }

            PendingChangesSummary = PendingChanges.Count == includedCount
                                        ? CollectionSelectionSummaryEnum.All
                                        : CollectionSelectionSummaryEnum.Some;
        }