51 references to Sum
AnalyzerRunner (1)
Program.cs (1)
179Console.WriteLine("Number of documents:\t\t" + projects.Sum(x => x.DocumentIds.Count));
Aspire.Dashboard (2)
Otlp\Storage\TelemetryRepository.cs (2)
712context.FailureCount += rm.ScopeMetrics.Sum(s => s.Metrics.Count); 734context.FailureCount += rs.ScopeSpans.Sum(s => s.Spans.Count);
BasketService (1)
Models\CustomerBasket.cs (1)
9public int TotalItemCount => Items.Sum(i => i.Quantity);
Microsoft.AspNetCore.Shared.Tests (1)
runtime\Http2\DynamicTableTest.cs (1)
240Assert.Equal(entries.Sum(e => e.Length), dynamicTable.Size);
Microsoft.Build.Engine.UnitTests (1)
BackEnd\TaskRegistry_Tests.cs (1)
2174return registryRecords?.Values.Sum(recordList => recordList.Count) ?? 0;
Microsoft.CodeAnalysis (1)
Collections\IdentifierCollection.Collection.cs (1)
45_count = this.IdentifierCollection._map.Values.Sum(o => o is string ? 1 : ((ISet<string>)o).Count);
Microsoft.CodeAnalysis.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
89var count = _formattingResults.Sum(r => r.GetTextChanges(cancellationToken).Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
98var charCount = distinctValues.Sum(v => v.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (1)
80var result = ArrayBuilder<T>.GetInstance(builders.Sum(b => b.Count));
Microsoft.CodeAnalysis.CSharp (2)
Symbols\Source\ConstantEvaluationHelpers.cs (2)
365Debug.Assert(graph.Values.Sum(n => n.DependedOnBy.Count) == graph.Values.Sum(n => n.Dependencies.Count));
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (1)
487=> triviaList.Sum(t => t.ToFullString().Replace("\r\n", "\r").Cast<char>().Count(c => SyntaxFacts.IsNewLine(c)));
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (1)
487=> triviaList.Sum(t => t.ToFullString().Replace("\r\n", "\r").Cast<char>().Count(c => SyntaxFacts.IsNewLine(c)));
Microsoft.CodeAnalysis.Features (5)
AddImport\AbstractAddImportFeatureService.cs (1)
146var referenceToCompilation = new ConcurrentDictionary<PortableExecutableReference, Compilation>(concurrencyLevel: 2, capacity: project.Solution.Projects.Sum(p => p.MetadataReferences.Count));
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (1)
142.Select(changes => new TextSpan(changes.Key.Start, changes.Sum(change => change.NewText!.Length)));
Common\TaggedText.cs (1)
137builder.EnsureCapacity(values.Sum(static value => value.Text.Length));
Completion\Utilities.cs (1)
39var sumOfDeltas = changes.Sum(c => c.NewText!.Length - c.Span.Length);
NavigateTo\NavigateToSearcher.cs (1)
240var projectCount = orderedProjects.Sum(g => g.Length);
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Features\UnifiedSuggestions\UnifiedSuggestedActionsSource.cs (1)
721return currentActionCount + actionSets.Sum(a => a.Actions.Count()) > 3
Handler\InlineCompletions\InlineCompletionsHandler.cs (1)
237var amountToAdjust = textChangesBefore.Sum(t => t.NewText!.Length - t.Span.Length);
Microsoft.CodeAnalysis.UnitTests (1)
Collections\SegmentedArrayTests.cs (1)
110Assert.Equal(length, items.Sum(item => item.Length));
Microsoft.CodeAnalysis.Workspaces (6)
CodeFixesAndRefactorings\FixAllLogger.cs (3)
87m[DocumentCount] = fixAllState.Solution.Projects.Sum(p => p.DocumentIds.Count); 162m[TotalDiagnosticsToFix] = documentsAndDiagnosticsToFixMap.Values.Sum(v => v.Length); 172m[TotalDiagnosticsToFix] = projectsAndDiagnosticsToFixMap.Values.Sum(v => v.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
89var count = _formattingResults.Sum(r => r.GetTextChanges(cancellationToken).Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
98var charCount = distinctValues.Sum(v => v.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (1)
80var result = ArrayBuilder<T>.GetInstance(builders.Sum(b => b.Count));
Microsoft.DotNet.Build.Tasks.Packaging (1)
PackageIndex.cs (1)
492public int Count { get { return inboxVersions.Sum(m => m.Value.Count); } }
Microsoft.Extensions.Diagnostics.Testing (1)
Metrics\MeasurementExtensions.cs (1)
73IEnumerable<CollectedMeasurement<int>> l => (T)(object)l.Sum(m => m.Value),
Microsoft.ML.Data (2)
Transforms\ValueToKeyMappingTransformer.cs (2)
611e.SetMetric(0, trainer.Sum(t => t.Count)); 631pch.Checkpoint(trainer.Sum(t => t.Count), rowCur);
Microsoft.ML.FastTree (9)
Dataset\Dataset.cs (3)
65Contracts.Assert(numFeatures == _flocks.Sum(f => f.Count)); 700int concatNumDocs = parts.Sum(x => x.NumDocs); 701int concatNumQueries = parts.Sum(x => x.NumQueries);
Dataset\Feature.cs (1)
331int length = parts.Sum(x => x.Length);
GamModelParameters.cs (2)
177int diff = _binEffects.Sum(e => e.Take(e.Length - 1).Select((ef, i) => ef != e[i + 1] ? 1 : 0).Sum()); 178int bound = _binEffects.Sum(e => e.Length - 1);
Training\RegressionTreeNodeDocuments.cs (1)
34_documentCount = Tree.GetNodesLeaves(NodeIndex).Sum(leaf => Partitioning.NumDocsInLeaf(leaf));
Utils\Algorithms.cs (1)
151int maxLength = arrays.Sum(x => x.Length);
Utils\ToByteArrayExtensions.cs (1)
625return sizeof(int) + array.Sum(x => x.SizeInBytes());
Microsoft.ML.TimeSeries (2)
SrCnnEntireAnomalyDetector.cs (2)
942double sumX = values.Sum(item => item.Item1); 944double sumXX = values.Sum(item => item.Item1 * item.Item1);
Microsoft.ML.Transforms (1)
Text\NgramTransform.cs (1)
301pch.Checkpoint(counts.Sum(c => c.Sum()), totalDocs);
Microsoft.VisualStudio.LanguageServices (1)
CodeCleanup\AbstractCodeCleanUpFixer.cs (1)
201progressTracker.AddItems(projects.Sum(static p => p.DocumentIds.Count));
MSBuild (4)
TerminalLogger\TerminalLogger.cs (4)
424var total = _testRunSummaries.Sum(t => t.Total); 425var failed = _testRunSummaries.Sum(t => t.Failed); 426var passed = _testRunSummaries.Sum(t => t.Passed); 427var skipped = _testRunSummaries.Sum(t => t.Skipped);
MyFrontend (1)
playground\TestShop\BasketService\Models\CustomerBasket.cs (1)
9public int TotalItemCount => Items.Sum(i => i.Quantity);
xunit.console (1)
ConsoleRunner.cs (1)
315return failed ? 1 : completionMessages.Values.Sum(summary => summary.Failed);