10 references to Sum
Microsoft.CodeAnalysis.Features (5)
Common\TaggedText.cs (1)
140
builder.EnsureCapacity(values.
Sum
(static value => value.Text.Length));
Completion\Utilities.cs (1)
39
var sumOfDeltas = changes.
Sum
(c => c.NewText!.Length - c.Span.Length);
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.cs (1)
115
var labelCount = sections.
Sum
(section => section.Labels.IsDefault ? 1 : section.Labels.Length);
NavigateTo\NavigateToSearcher.cs (1)
241
var projectCount = orderedProjects.
Sum
(g => g.Length);
Wrapping\ChainedExpression\ChainedExpressionCodeActionComputer.cs (1)
175
=> chunk.
Sum
(s => s.IsNode ? s.AsNode().Width() : s.AsToken().Width());
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Features\UnifiedSuggestions\UnifiedSuggestedActionsSource.cs (1)
721
return currentActionCount + actionSets.
Sum
(a => a.Actions.Length) > 3
Handler\Configuration\DidChangeConfigurationNotificationHandler.cs (1)
93
RoslynDebug.Assert(configurationsFromClient.Length == SupportedOptions.
Sum
(option => option is IPerLanguageValuedOption ? 2 : 1));
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
Configuration\DidChangeConfigurationNotificationHandlerTest.cs (2)
164
Assert.Equal(supportedOptions.
Sum
(option => option is IPerLanguageValuedOption ? 2 : 1), expectedValues.Count);
212
var expectConfigurationItemsNumber = DidChangeConfigurationNotificationHandler.SupportedOptions.
Sum
(option => option is IPerLanguageValuedOption ? 2 : 1);
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (1)
293
runResult.Results.
Sum
(r => r.GeneratedSources.IsDefaultOrEmpty ? 0 : r.GeneratedSources.Length);