337 references to Take
AnalyzerRunner (1)
DiagnosticAnalyzerRunner.cs (1)
139foreach (var pair in projectGroup.Take(5))
Aspire.Dashboard (3)
Components\Dialogs\FilterDialog.razor.cs (1)
133_filteredValues = newValues.Take(1000).ToList();
Components\Pages\Resources.razor.cs (1)
472var tooltipBuilder = new StringBuilder(string.Join(", ", displayedEndpoints.Take(maxShownEndpoints).Select(endpoint => endpoint.Text)));
Otlp\Model\OtlpHelpers.cs (1)
405query = query.Take(count.Value);
CatalogService (1)
CatalogApi.cs (1)
28itemsOnPage.Take(pageSize));
installer.tasks (4)
StaticFileRegeneration\TpnDocument.cs (2)
34.Take(linesUntilNext) 54lines.Take(sections.First().Header.StartLine)),
StaticFileRegeneration\TpnSectionHeader.cs (2)
106if (nameLines.Take(nameLines.Length - 1).Any(IsSeparatorLine)) 132.Take(i)
Microsoft.AspNetCore.Antiforgery.Test (1)
DefaultAntiforgeryTokenSerializerTest.cs (1)
171return data.Take(data.Length - 1).ToArray();
Microsoft.AspNetCore.Components.Endpoints (2)
FormMapping\Converters\CollectionAdapters\ImmutableQueueBufferAdapter.cs (1)
16return ImmutableQueue.CreateRange(buffer.Take(size));
FormMapping\Converters\CollectionAdapters\ImmutableStackBufferAdapter.cs (1)
16return ImmutableStack.CreateRange(buffer.Take(size));
Microsoft.AspNetCore.Components.Web (2)
Virtualization\Virtualize.cs (2)
255.Take(lastItemIndex - _loadedItemsStartIndex); 453Items!.Skip(request.StartIndex).Take(request.Count),
Microsoft.AspNetCore.Components.WebAssembly.Tests (3)
PullFromJSDataStreamTest.cs (3)
130return ValueTask.FromResult((TValue)(object)_data.Skip((int)offset).Take(bytesToRead).ToArray()); 149return ValueTask.FromResult((TValue)(object)_data.Skip((int)offset).Take(bytesToRead - 1).ToArray()); 163return ValueTask.FromResult((TValue)(object)_data.Skip((int)offset).Take(bytesToRead + 1).ToArray());
Microsoft.AspNetCore.Cryptography.Internal.Tests (1)
Cng\BCryptUtilTests.cs (1)
44Guid newGuid = new Guid(bytes.Skip(3).Take(sizeof(Guid)).ToArray());
Microsoft.AspNetCore.DataProtection.Tests (1)
KeyManagement\KeyRingBasedDataProtectorTests.cs (1)
150badProtectedPayload = badProtectedPayload.Take(badProtectedPayload.Length - 1).ToArray(); // chop off the last byte
Microsoft.AspNetCore.Diagnostics (3)
src\Shared\StackTrace\ExceptionDetails\ExceptionDetailsProvider.cs (3)
153.Take(postErrorLineNumberInFile - preErrorLineNumberInFile + 1) 160frame.PreContextCode = codeBlock.Take(errorStartLineNumberInArray).ToArray(); 163.Take(numOfErrorLines)
Microsoft.AspNetCore.Hosting (3)
src\Shared\StackTrace\ExceptionDetails\ExceptionDetailsProvider.cs (3)
153.Take(postErrorLineNumberInFile - preErrorLineNumberInFile + 1) 160frame.PreContextCode = codeBlock.Take(errorStartLineNumberInArray).ToArray(); 163.Take(numOfErrorLines)
Microsoft.AspNetCore.Http.Extensions (2)
src\Components\Endpoints\src\FormMapping\Converters\CollectionAdapters\ImmutableQueueBufferAdapter.cs (1)
16return ImmutableQueue.CreateRange(buffer.Take(size));
src\Components\Endpoints\src\FormMapping\Converters\CollectionAdapters\ImmutableStackBufferAdapter.cs (1)
16return ImmutableStack.CreateRange(buffer.Take(size));
Microsoft.AspNetCore.Localization (1)
AcceptLanguageHeaderRequestCultureProvider.cs (1)
40languages = languages.Take(MaximumAcceptLanguageHeaderValuesToTry);
Microsoft.AspNetCore.Mvc.Core.Test (9)
ApplicationModels\ControllerActionDescriptorProviderTests.cs (2)
1416.Take(unorderedLineCount) 1422.Take(unorderedLineCount)
Infrastructure\ActionSelectionTableTest.cs (2)
334var expected = actions.Take(2).ToArray(); 383var expected = actions.Take(2).ToArray();
Infrastructure\ActionSelectorTest.cs (2)
254var expected = actions.Take(2).ToArray(); 306var expected = actions.Take(2).ToArray();
ModelBinding\Metadata\DefaultModelMetadataProviderTest.cs (1)
234defaultMetadata.Attributes.Attributes.Take(2),
ModelBinding\Metadata\ModelAttributesTest.cs (2)
207attributes.Attributes.Take(2), 217attributes.TypeAttributes.Take(1),
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (7)
Buffers\PagedCharBufferTest.cs (6)
59Assert.Equal(new[] { 'a', 'b', 'c', 't' }, page.Take(4)); 145Assert.Equal(new[] { 'a', 'b', 'c' }, page.Take(buffer.Length)); 274Assert.Equal(new[] { 'a', 'b', 'c', 'd', 'e', 'f' }, page.Take(buffer.Length)); 290Assert.Equal(new[] { 'b', 'c', 'd' }, page.Take(buffer.Length)); 423Assert.Equal(new[] { 'A', 'b', 'c', 'd', 'e' }, page.Take(buffer.Length)); 478Assert.Equal(new[] { 'e', 'f', 'g', 'h' }, buffer.Pages[0].Take(buffer.Length));
ViewDataDictionaryTest.cs (1)
163{ model.Take(2) },
Microsoft.AspNetCore.Routing.Tests (1)
RouteCollectionTest.cs (1)
509var first = routeNames.Take(index).ToArray();
Microsoft.AspNetCore.Server.IIS (3)
src\Shared\StackTrace\ExceptionDetails\ExceptionDetailsProvider.cs (3)
153.Take(postErrorLineNumberInFile - preErrorLineNumberInFile + 1) 160frame.PreContextCode = codeBlock.Take(errorStartLineNumberInArray).ToArray(); 163.Take(numOfErrorLines)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (10)
BufferWriterTests.cs (1)
87Assert.Equal(array.Skip(offset).Take(length).ToArray(), Read());
src\Shared\test\Shared.Tests\runtime\Http2\HuffmanDecodingTests.cs (9)
77Assert.Equal(input, decoded.Take(decodedByteCount)); 148yield return destination.Take(encodedByteCount - 1).ToArray(); 151yield return destination.Take(encodedByteCount - 2).ToArray(); 154yield return destination.Take(encodedByteCount - 3).ToArray(); 170yield return destination.Take(encodedByteCount).Concat(pad1).ToArray(); 171yield return destination.Take(encodedByteCount).Concat(pad2).ToArray(); 172yield return destination.Take(encodedByteCount).Concat(pad3).ToArray(); 173yield return destination.Take(encodedByteCount).Concat(pad4).ToArray(); 186yield return destination.Take(encodedByteCount).ToArray();
Microsoft.AspNetCore.Shared.Tests (9)
runtime\Http2\HuffmanDecodingTests.cs (9)
77Assert.Equal(input, decoded.Take(decodedByteCount)); 148yield return destination.Take(encodedByteCount - 1).ToArray(); 151yield return destination.Take(encodedByteCount - 2).ToArray(); 154yield return destination.Take(encodedByteCount - 3).ToArray(); 170yield return destination.Take(encodedByteCount).Concat(pad1).ToArray(); 171yield return destination.Take(encodedByteCount).Concat(pad2).ToArray(); 172yield return destination.Take(encodedByteCount).Concat(pad3).ToArray(); 173yield return destination.Take(encodedByteCount).Concat(pad4).ToArray(); 186yield return destination.Take(encodedByteCount).ToArray();
Microsoft.AspNetCore.SignalR.Common.Tests (1)
Internal\Protocol\MemoryBufferWriterTests.cs (1)
113Assert.Equal(input, data.Take(16));
Microsoft.AspNetCore.SignalR.Core (1)
Internal\TypedClientBuilder.cs (1)
161paramTypes = paramTypes.Take(paramTypes.Length - 1).ToArray();
Microsoft.AspNetCore.TestHost.Tests (2)
TestClientTests.cs (2)
628Assert.True(hello.SequenceEqual(buffer.Take(hello.Length))); 633Assert.True(world.SequenceEqual(buffer.Take(world.Length)));
Microsoft.AspNetCore.WebSockets.Tests (2)
SendReceiveTests.cs (2)
57Assert.Equal(sendBuffer, receiveBuffer.Take(result.Count).ToArray()); 72Assert.Equal(sendBuffer, receiveBuffer.Take(result.Count).ToArray());
Microsoft.Build.Engine.OM.UnitTests (1)
Definition\Project_Tests.cs (1)
2317project.RemoveItems(project.GetItems("j").Take(2));
Microsoft.CodeAnalysis.CodeStyle (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
74return words.Take(1).Select(DecapitalizeFirstLetter).Concat(words.Skip(1).Select(CapitalizeFirstLetter)); 76return words.Take(1).Select(CapitalizeFirstLetter).Concat(words.Skip(1).Select(DecapitalizeFirstLetter));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\FileBannerFacts\AbstractFileBannerFacts.cs (4)
89strippedTrivia = leadingTriviaToKeep.Take(index).ToImmutableArray(); 138leadingTriviaToStrip = new List<SyntaxTrivia>(leadingTrivia.Take(ppIndex + 1)); 158leadingTriviaToStrip.AddRange(leadingTriviaToKeep.Take(index)); 178return ImmutableArray.CreateRange(leadingTrivia.Take(index));
Microsoft.CodeAnalysis.CSharp (2)
Symbols\TypeUnification.cs (2)
212t1.CustomModifiers.SequenceEqual(t2.CustomModifiers.Take(t1.CustomModifiers.Length))) 231t2.CustomModifiers.SequenceEqual(t1.CustomModifiers.Take(t2.CustomModifiers.Length)))
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxListExtensions.cs (1)
23=> [.. list.Take(index).Concat(item).Concat(list.Skip(index))];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (1)
264var numberOfLinesBeforeComment = GetNumberOfLines(triviaList.Take(triviaList.IndexOf(firstNonWhitespaceTrivia)));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (8)
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (1)
376trailingTrivia.Take(trailingTrivia.Count - 1));
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
404return allNamespaces.Take(2).Count() == 1;
src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (2)
68.WithLeadingTrivia(leadingTrivia.Take(skippedTriviaIndex)) 69.WithTrailingTrivia(SyntaxFactory.TriviaList(remainingLeadingTrivia.Take(trailingTriviaTakeUntil)));
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
865: nodeOrToken.WithTrailingTrivia(trivia.Take(index));
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
322leadingTrivia.Take(leadingTrivia.Count - 1).Concat(Whitespace(elementLeadingWhitespace[..^indentation.Length])));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\QueryExpressionSyntaxExtensions.cs (1)
44var clauses = SyntaxFactory.List(allClauses.Take(allClauses.Count() - 1).Cast<QueryClauseSyntax>());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (1)
139openBrace.TrailingTrivia.Concat(closeBrace.LeadingTrivia.Take(index + 1)));
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenCapturing.cs (1)
98.Take(numToCapture));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Semantics\ParamsCollectionTests.cs (1)
119var nodes = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Take(3).ToArray();
Microsoft.CodeAnalysis.CSharp.Features (9)
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider_DocumentationComments.cs (1)
104content[^1] = xmlText.WithTextTokens([.. tokens.Take(lastIndex)]);
ConvertProgram\ConvertProgramTransform_ProgramMain.cs (1)
138triviaToMove = [.. triviaToMove.Take(triviaToMove.Count - 2)];
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
440newStatement.WithLeadingTrivia(nextStatementLeading.Take(endOfLineIndex)),
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (1)
376trailingTrivia.Take(trailingTrivia.Count - 1));
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
404return allNamespaces.Take(2).Count() == 1;
src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (2)
68.WithLeadingTrivia(leadingTrivia.Take(skippedTriviaIndex)) 69.WithTrailingTrivia(SyntaxFactory.TriviaList(remainingLeadingTrivia.Take(trailingTriviaTakeUntil)));
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
865: nodeOrToken.WithTrailingTrivia(trivia.Take(index));
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
322leadingTrivia.Take(leadingTrivia.Count - 1).Concat(Whitespace(elementLeadingWhitespace[..^indentation.Length])));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\UnsafeTests.cs (3)
10177var declarators = tree.GetCompilationUnitRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Reverse().Take(3).Reverse().ToArray(); 10223var declarators = tree.GetCompilationUnitRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Reverse().Take(numSymbols).Reverse().ToArray(); 10297var declarators = tree.GetCompilationUnitRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Reverse().Take(numSymbols).Reverse().ToArray();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\LookupSymbolsInfoTests.cs (1)
78return string.Format("<{0}>", string.Join(",", TemplateArgEnumerable.Instance.Take(arity)));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
Parsing\ParserErrorMessageTests.cs (1)
1653var firstDiag = parsedTree.GetDiagnostics().Take(1);
Parsing\ParsingTests.cs (1)
75actualErrors.Take(1).Verify(expectedFirstError);
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (2)
PdbTests.cs (2)
98AssertEx.Equal(new byte[] { 0x12, (byte)'M', (byte)'i', (byte)'c', (byte)'r', (byte)'o' }, pdbStream.GetBuffer().Take(6).ToArray()); 99AssertEx.Equal(new byte[] { 0x12, (byte)'M', (byte)'Z' }, peStream.GetBuffer().Take(3).ToArray());
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
2970=> RemoveNodes(declaration, GetSubDeclarations(declaration).Skip(index).Take(count));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxListExtensions.cs (1)
23=> [.. list.Take(index).Concat(item).Concat(list.Skip(index))];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (1)
264var numberOfLinesBeforeComment = GetNumberOfLines(triviaList.Take(triviaList.IndexOf(firstNonWhitespaceTrivia)));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\QueryExpressionSyntaxExtensions.cs (1)
44var clauses = SyntaxFactory.List(allClauses.Take(allClauses.Count() - 1).Cast<QueryClauseSyntax>());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (1)
139openBrace.TrailingTrivia.Concat(closeBrace.LeadingTrivia.Take(index + 1)));
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Rename\RenamerTests.cs (1)
119return splitPath.Take(splitPath.Length - 1).ToArray();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Utilities\BloomFilterTests.cs (2)
48var strings = new HashSet<string>(GenerateStrings(2000).Skip(500).Take(1000), comparer); 168var longs = CreateLongs(GenerateStrings(2000).Skip(500).Take(1000).Select(s => s.GetHashCode()).ToList());
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
InlineRename\UI\SmartRename\SmartRenameViewModel.cs (1)
223foreach (var name in _smartRenameSession.SuggestedNames.Take(3))
Microsoft.CodeAnalysis.Features (17)
AddPackage\InstallPackageDirectlyCodeActionOperation.cs (1)
53_projectsWithMatchingVersion.AddRange(otherProjects.Take(projectsToShow).Select(p => p.Name));
ChangeSignature\AbstractChangeSignatureService.cs (1)
477var argumentsToPermute = arguments.Take(declarationParametersToPermute.Length).ToList();
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (1)
392builder.Add(string.Join(".", parts.Take(i)));
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.MoveFileCodeAction.cs (1)
92.Select(i => (foldername: string.Join(".", parts.Take(i)), index: i))
FullyQualify\AbstractFullyQualifyService.cs (1)
101.Take(MaxResults)
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.State.cs (1)
107let symbolTypes = parameters.Take(c.Parameters.Length).Select(p => p.Type)
IntroduceUsingStatement\AbstractIntroduceUsingStatementCodeRefactoringProvider.cs (3)
139.Take(declarationStatementIndex) 168.Take(declarationStatementIndex) 255.Take(lastUsageStatementIndex + 1)
InvertIf\AbstractInvertIfCodeRefactoringProvider.cs (5)
476var statementsBeforeIf = statements.Take(index); 528var statementsBeforeIf = statements.Take(index); 554var statementsBeforeIf = statements.Take(index); 569var statementsBeforeIf = statements.Take(index); 592var statementsBeforeIf = statements.Take(index);
MoveStaticMembers\MoveStaticMembersOptions.cs (1)
65NamespaceDisplay = string.Join(separator: ".", namespacesAndType.Take(namespacesAndType.Length - 1));
Snippets\SnippetProviders\AbstractSnippetProvider.cs (1)
131var nodeWithTrivia = node.ReplaceTokens(allTokens.Skip(1).Take(allTokens.Count - 2),
SplitOrMergeIfStatements\Nested\AbstractMergeNestedIfStatementsCodeRefactoringProvider.cs (1)
216if (!remainingStatements.SequenceEqual(remainingOuterStatements.Take(statements.Count - 1), syntaxFacts.AreEquivalent))
Microsoft.CodeAnalysis.Rebuild (1)
CompilationOptionsReader.cs (1)
180foreach (var documentHandle in PdbReader.Documents.Take(sourceFileCount))
Microsoft.CodeAnalysis.Test.Utilities (2)
Assert\AssertEx.cs (2)
688var expectedString = string.Join(itemSeparator, expected.Take(10).Select(itemInspector)); 847File.WriteAllLines(actualFile, testFileLines.Take(expectedValueSourceLine));
Microsoft.CodeAnalysis.UnitTests (20)
Collections\ImmutableListTestBase.cs (1)
100Assert.Equal(enumerable.Take(array.Length), array);
Collections\ImmutablesTestBase.nonnetstandard.cs (2)
43var shorterSequence = equivalentSequence.Take(equivalentSequence.Count() - 1); 46var nonUniqueSubsetSequenceOfSameLength = shorterSequence.Concat(shorterSequence.Take(1));
Collections\List\ICollection.Generic.Tests.cs (1)
546Assert.True(Enumerable.SequenceEqual(collection, array.Take(count)));
CryptoBlobParserTests.cs (14)
36var expectedModulus = key.Skip(HEADER_LEN).Take(MOD_LEN).ToArray(); 40var expectedP = key.Skip(HEADER_LEN + MOD_LEN).Take(HALF_LEN).ToArray(); 44var expectedQ = key.Skip(HEADER_LEN + MOD_LEN + HALF_LEN).Take(HALF_LEN).ToArray(); 48var expectedDP = key.Skip(HEADER_LEN + MOD_LEN + HALF_LEN * 2).Take(HALF_LEN).ToArray(); 52var expectedDQ = key.Skip(HEADER_LEN + MOD_LEN + HALF_LEN * 3).Take(HALF_LEN).ToArray(); 56var expectedInverseQ = key.Skip(HEADER_LEN + MOD_LEN + HALF_LEN * 4).Take(HALF_LEN).ToArray(); 60var expectedD = key.Skip(HEADER_LEN + MOD_LEN + HALF_LEN * 5).Take(MOD_LEN).ToArray(); 79var expectedModulus = key.Skip(HEADER_LEN).Take(MOD_LEN).ToArray(); 83var expectedP = key.Skip(HEADER_LEN + MOD_LEN).Take(HALF_LEN).ToArray(); 87var expectedQ = key.Skip(HEADER_LEN + MOD_LEN + HALF_LEN).Take(HALF_LEN).ToArray(); 91var expectedDP = key.Skip(HEADER_LEN + MOD_LEN + HALF_LEN * 2).Take(HALF_LEN).ToArray(); 95var expectedDQ = key.Skip(HEADER_LEN + MOD_LEN + HALF_LEN * 3).Take(HALF_LEN).ToArray(); 99var expectedInverseQ = key.Skip(HEADER_LEN + MOD_LEN + HALF_LEN * 4).Take(HALF_LEN).ToArray(); 103var expectedD = key.Skip(HEADER_LEN + MOD_LEN + HALF_LEN * 5).Take(MOD_LEN).ToArray();
Text\SourceTextStreamTests.cs (2)
55Assert.True(buffer.Take(baseText.Length).SequenceEqual(encoding.GetBytes(baseText))); 58Assert.True(buffer.Take(3).SequenceEqual(encoding.GetBytes(new[] { '\u2019' })));
Microsoft.CodeAnalysis.Workspaces (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
74return words.Take(1).Select(DecapitalizeFirstLetter).Concat(words.Skip(1).Select(CapitalizeFirstLetter)); 76return words.Take(1).Select(CapitalizeFirstLetter).Concat(words.Skip(1).Select(DecapitalizeFirstLetter));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\FileBannerFacts\AbstractFileBannerFacts.cs (4)
89strippedTrivia = leadingTriviaToKeep.Take(index).ToImmutableArray(); 138leadingTriviaToStrip = new List<SyntaxTrivia>(leadingTrivia.Take(ppIndex + 1)); 158leadingTriviaToStrip.AddRange(leadingTriviaToKeep.Take(index)); 178return ImmutableArray.CreateRange(leadingTrivia.Take(index));
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildProjectLoader.Worker.cs (1)
467? pathNames.Take(pathNames.Length - 1).ToImmutableArray()
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
UtilityTest\EditDistanceTests.cs (1)
267var top = Top1000.Take(50).ToArray();
Microsoft.Data.Analysis.Tests (1)
DataFrameTests.Utils.cs (1)
225IEnumerable<int> trainIndices = randomIndices.Take((int)(input.Rows.Count * testRatio));
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
Vsix\GetPkgDefAssemblyDependencyGuid.cs (1)
62byte[] reducedHash = fullHash.Take(targetBlockSize).Zip(fullHash.Skip(targetBlockSize), (b1, b2) => (byte)(b1 ^ b2)).ToArray();
Microsoft.DotNet.Deployment.Tasks.Links (1)
Microsoft.ML.AutoML (7)
ColumnInference\TextFileSample.cs (1)
294if (buffer.Take(sniffLim).Any(x => x == 0))
PipelineSuggesters\PipelineSuggester.cs (2)
98history = history.Take(availableTrainers.Count()).Where(x => x.RunSucceeded); 106var topTrainers = sortedHistory.Take(TopKTrainers).Select(r => r.Pipeline.Trainer);
Sweepers\SmacSweeper.cs (1)
212return retainedConfigs.Take(numOfCandidates).ToArray();
Tuner\SmacTuner.cs (2)
172var bestKParamSets = _histories.OrderBy(i => i.Loss).Take(_localSearchParentCount).Select(r => r.TrialSettings.Parameter); 219return retainedConfigs.Take(numOfCandidates).ToArray();
Utils\BestResultUtil.cs (1)
91return orderedResults.Take(n);
Microsoft.ML.AutoML.Tests (2)
GetNextPipelineTests.cs (1)
76var stage1Runs = history.Take(allAvailableTrainers.Count());
TunerTests.cs (1)
135var newCfo = new CostFrugalTuner(searchSpace, Parameter.FromObject(initValues), history.Take(99), seed);
Microsoft.ML.Data (10)
Data\DataViewUtils.cs (1)
1401var stringRep = string.Join(",", vbuf.Items(true).Take(previewValues)
Deprecated\Instances\HeaderSchema.cs (1)
94int cnn = names.Take(size).Count(x => x != null);
Dirty\PredictionUtils.cs (1)
83res = new List<string>(args.Take(i));
Evaluators\AnomalyDetectionEvaluator.cs (5)
165names.AddRange(agg.Names.Take(agg.NumTopExamples)); 166scores.AddRange(agg.Scores.Take(agg.NumTopExamples)); 167labels.AddRange(agg.Labels.Take(agg.NumTopExamples)); 262drAtNumPos = sorted.Take((int)NumAnomalies).Count(result => result.Label > 0) / (Double)NumAnomalies; 263thresholdAtNumPos = sorted.Take((int)NumAnomalies).Last().Score;
Evaluators\MulticlassClassificationEvaluator.cs (1)
312public double[] AllTopKAccuracy => CumulativeSum(_seenRanks.Take(OutputTopKAcc ?? 0).Select(l => l / _numInstances)).ToArray();
Prediction\Calibrator.cs (1)
1399return _data.Take(_itemsSeen).GetEnumerator();
Microsoft.ML.Ensemble (1)
Selector\SubModelSelector\BaseBestPerformanceSelector.cs (1)
42return sortedModels.Where(m => m != null).Take(modelCountToBeSelected).ToList();
Microsoft.ML.FastTree (4)
GamModelParameters.cs (2)
177int diff = _binEffects.Sum(e => e.Take(e.Length - 1).Select((ef, i) => ef != e[i + 1] ? 1 : 0).Sum()); 820UpperBounds = up.Take(up.Length - 1);
Training\DocumentPartitioning.cs (1)
106var cumulativeLength = _leafCount.CumulativeSum<int>().Take(tree.NumLeaves - 1);
TreeEnsemble\InternalTreeEnsemble.cs (1)
321FeatureToGainMap gainMap = new FeatureToGainMap(_trees.Take(prefix).ToList(), normalize);
Microsoft.ML.GenAI.Core (1)
Extension\ModuleExtension.cs (1)
224var topK = layerSizeMap.Take(count).ToList();
Microsoft.ML.GenAI.Mistral (1)
Mistral_7B_0_3ChatTemplateBuilder.cs (1)
40var firstSequence = messages.Take(messages.ToList().FindLastIndex(m => m.GetRole() == Role.User));
Microsoft.ML.Mkl.Components (1)
VectorWhitening.cs (1)
660var modelName = ctx.AddInitializer(model.Take(rank * dimension), modelDimension, "model");
Microsoft.ML.Parquet (3)
PartitionedFileLoader.cs (1)
398_subActive = _active.Take(SubColumnCount).ToArray();
PartitionedPathParser.cs (2)
193return dirs.Take(dirs.Count() - 1); // Ignore last directory which is the file name. 340dirs = dirs.Take(dirs.Count() - 1); // Ignore last directory which is the file name.
Microsoft.ML.Samples (64)
Dynamic\ModelOperations\OnnxConversion.cs (2)
24foreach (var value in values.Take(numRows)) 30foreach (var value in values.Take(numRows))
Dynamic\TensorFlow\ImageClassification.cs (1)
60foreach (var classScore in prediction.output.Take(3))
Dynamic\Trainers\BinaryClassification\AveragedPerceptron.cs (1)
47foreach (var p in predictions.Take(5))
Dynamic\Trainers\BinaryClassification\AveragedPerceptronWithOptions.cs (1)
58foreach (var p in predictions.Take(5))
Dynamic\Trainers\BinaryClassification\Calibrators\FixedPlatt.cs (2)
78foreach (var value in values.Take(numRows)) 86foreach (var value in values.Take(numRows))
Dynamic\Trainers\BinaryClassification\Calibrators\Isotonic.cs (2)
78foreach (var value in values.Take(numRows)) 86foreach (var value in values.Take(numRows))
Dynamic\Trainers\BinaryClassification\Calibrators\Naive.cs (2)
78foreach (var value in values.Take(numRows)) 86foreach (var value in values.Take(numRows))
Dynamic\Trainers\BinaryClassification\Calibrators\Platt.cs (2)
78foreach (var value in values.Take(numRows)) 86foreach (var value in values.Take(numRows))
Dynamic\Trainers\BinaryClassification\FactorizationMachine.cs (1)
55foreach (var p in predictions.Take(5))
Dynamic\Trainers\BinaryClassification\FastForest.cs (1)
50foreach (var p in predictions.Take(5))
Dynamic\Trainers\BinaryClassification\FastForestWithOptions.cs (1)
62foreach (var p in predictions.Take(5))
Dynamic\Trainers\BinaryClassification\FastTree.cs (1)
50foreach (var p in predictions.Take(5))
Dynamic\Trainers\BinaryClassification\FastTreeWithOptions.cs (1)
62foreach (var p in predictions.Take(5))
Dynamic\Trainers\BinaryClassification\FieldAwareFactorizationMachine.cs (1)
84foreach (var dataPoint in data.Take(5))
Dynamic\Trainers\BinaryClassification\FieldAwareFactorizationMachineWithOptions.cs (1)
95foreach (var dataPoint in data.Take(5))
Dynamic\Trainers\BinaryClassification\LbfgsLogisticRegression.cs (1)
47foreach (var p in predictions.Take(5))
Dynamic\Trainers\BinaryClassification\LbfgsLogisticRegressionWithOptions.cs (1)
56foreach (var p in predictions.Take(5))
Dynamic\Trainers\BinaryClassification\LdSvm.cs (1)
47foreach (var p in predictions.Take(5))
Dynamic\Trainers\BinaryClassification\LdSvmWithOptions.cs (1)
56foreach (var p in predictions.Take(5))
Dynamic\Trainers\BinaryClassification\LightGbm.cs (1)
50foreach (var p in predictions.Take(5))
Dynamic\Trainers\BinaryClassification\LightGbmWithOptions.cs (1)
61foreach (var p in predictions.Take(5))
Dynamic\Trainers\BinaryClassification\LinearSvm.cs (1)
47foreach (var p in predictions.Take(5))
Dynamic\Trainers\BinaryClassification\LinearSvmWithOptions.cs (1)
56foreach (var p in predictions.Take(5))
Dynamic\Trainers\BinaryClassification\PriorTrainer.cs (1)
47foreach (var p in predictions.Take(5))
Dynamic\Trainers\BinaryClassification\SdcaLogisticRegression.cs (1)
55foreach (var p in predictions.Take(5))
Dynamic\Trainers\BinaryClassification\SdcaLogisticRegressionWithOptions.cs (1)
67foreach (var p in predictions.Take(5))
Dynamic\Trainers\BinaryClassification\SdcaNonCalibrated.cs (1)
55foreach (var p in predictions.Take(5))
Dynamic\Trainers\BinaryClassification\SdcaNonCalibratedWithOptions.cs (1)
69foreach (var p in predictions.Take(5))
Dynamic\Trainers\BinaryClassification\SgdCalibrated.cs (1)
47foreach (var p in predictions.Take(5))
Dynamic\Trainers\BinaryClassification\SgdCalibratedWithOptions.cs (1)
59foreach (var p in predictions.Take(5))
Dynamic\Trainers\BinaryClassification\SgdNonCalibrated.cs (1)
47foreach (var p in predictions.Take(5))
Dynamic\Trainers\BinaryClassification\SgdNonCalibratedWithOptions.cs (1)
56foreach (var p in predictions.Take(5))
Dynamic\Trainers\BinaryClassification\SymbolicSgdLogisticRegression.cs (1)
50foreach (var p in predictions.Take(5))
Dynamic\Trainers\BinaryClassification\SymbolicSgdLogisticRegressionWithOptions.cs (1)
59foreach (var p in predictions.Take(5))
Dynamic\Trainers\Clustering\KMeans.cs (3)
47foreach (var p in predictions.Take(2)) 81string.Join(", ", centroids[0].GetValues().ToArray().Take(3))); 85string.Join(", ", centroids[1].GetValues().ToArray().Take(3)));
Dynamic\Trainers\Clustering\KMeansWithOptions.cs (3)
55foreach (var p in predictions.Take(2)) 89string.Join(", ", centroids[0].GetValues().ToArray().Take(3))); 93string.Join(", ", centroids[1].GetValues().ToArray().Take(3)));
Dynamic\Trainers\MulticlassClassification\LbfgsMaximumEntropy.cs (1)
52foreach (var p in predictions.Take(5))
Dynamic\Trainers\MulticlassClassification\LbfgsMaximumEntropyWithOptions.cs (1)
60foreach (var p in predictions.Take(5))
Dynamic\Trainers\MulticlassClassification\LightGbm.cs (1)
55foreach (var p in predictions.Take(5))
Dynamic\Trainers\MulticlassClassification\LightGbmWithOptions.cs (1)
65foreach (var p in predictions.Take(5))
Dynamic\Trainers\MulticlassClassification\NaiveBayes.cs (1)
58foreach (var p in predictions.Take(5))
Dynamic\Trainers\MulticlassClassification\OneVersusAll.cs (1)
53foreach (var p in predictions.Take(5))
Dynamic\Trainers\MulticlassClassification\PairwiseCoupling.cs (1)
53foreach (var p in predictions.Take(5))
Dynamic\Trainers\MulticlassClassification\SdcaMaximumEntropy.cs (1)
60foreach (var p in predictions.Take(5))
Dynamic\Trainers\MulticlassClassification\SdcaMaximumEntropyWithOptions.cs (1)
69foreach (var p in predictions.Take(5))
Dynamic\Trainers\MulticlassClassification\SdcaNonCalibrated.cs (1)
60foreach (var p in predictions.Take(5))
Dynamic\Trainers\MulticlassClassification\SdcaNonCalibratedWithOptions.cs (1)
69foreach (var p in predictions.Take(5))
Dynamic\Trainers\Recommendation\MatrixFactorization.cs (1)
48reuseRowObject: false).Take(5).ToList();
Dynamic\Trainers\Recommendation\MatrixFactorizationWithOptions.cs (1)
72reuseRowObject: false).Take(5).ToList();
Dynamic\Trainers\Recommendation\OneClassMatrixFactorizationWithOptions.cs (2)
81foreach (var pred in results.Take(15)) 114.OrderByDescending(element => element.Score).Take(2);
Dynamic\Transforms\ApplyOnnxModel.cs (1)
39foreach (var classScore in prediction.softmaxout_1.Take(3))
Dynamic\Transforms\ImageAnalytics\ConvertToImage.cs (2)
78features.DenseValues().Take(5)) + "...", 80string.Join(",", pixels.DenseValues().Take(5)) + "...");
Dynamic\Transforms\ImageAnalytics\ExtractPixels.cs (1)
113string.Join(",", pixels.DenseValues().Take(5)) + "...");
Microsoft.ML.Samples.GPU (1)
docs\samples\Microsoft.ML.Samples\Dynamic\TensorFlow\ImageClassification.cs (1)
60foreach (var classScore in prediction.output.Take(3))
Microsoft.ML.SearchSpace (2)
Option\NestOption.cs (1)
56var feature = values.Skip(startIndex).Take(dim).ToArray();
SearchSpace.cs (1)
118var input = feature.Skip(cur).Take(option.FeatureSpaceDim).ToArray();
Microsoft.ML.StandardTrainers (2)
Standard\ModelStatistics.cs (1)
467var order = GetUnorderedCoefficientStatistics().OrderByDescending(stat => stat.ZScore).Take(paramCountCap - 1);
Standard\MulticlassClassification\MulticlassNaiveBayesTrainer.cs (1)
444var labelHistogram = ctx.AddInitializer(labelHistogramExpanded.Take(_labelHistogram.Length), new long[] { _labelHistogram.Length, 1 }, "labelHistogram");
Microsoft.ML.Sweeper (1)
Algorithms\SmacSweeper.cs (1)
219foreach (Tuple<double, ParameterSet> t in bestConfigurations.Take(numOfCandidates))
Microsoft.ML.Tests (18)
Scenarios\Api\CookbookSamples\CookbookSamplesDynamicApi.cs (8)
58.Take(4).ToArray(); 65.Take(20).ToArray(); 516var messageTexts = data.GetColumn<string>(data.Schema["Message"]).Take(20).ToArray(); 550var embeddings = transformedData.GetColumn<float[]>(transformedData.Schema["Embeddings"]).Take(10).ToArray(); 551var unigrams = transformedData.GetColumn<float[]>(transformedData.Schema["BagOfWords"]).Take(10).ToArray(); 590var catColumns = data.GetColumn<string[]>(data.Schema["CategoricalFeatures"]).Take(10).ToArray(); 606var categoricalBags = transformedData.GetColumn<float[]>(transformedData.Schema["CategoricalBag"]).Take(10).ToArray(); 607var workclasses = transformedData.GetColumn<float[]>(transformedData.Schema["WorkclassOneHotTrimmed"]).Take(10).ToArray();
Scenarios\Api\Estimators\DecomposableTrainAndPredict.cs (1)
44foreach (var input in testData.Take(20))
Scenarios\Api\Estimators\Extensibility.cs (1)
53foreach (var input in testData.Take(20))
Scenarios\Api\Estimators\PredictAndMetadata.cs (1)
62foreach (var input in testData.Take(20))
Scenarios\Api\Estimators\SimpleTrainAndPredict.cs (2)
43foreach (var input in testData.Take(5)) 82foreach (var input in testData.Take(5))
TrainerEstimators\MatrixFactorizationTests.cs (1)
701var topColumns = results.Where(element => element.MatrixRowIndex == 1).OrderByDescending(element => element.Score).Take(2);
TrainerEstimators\SymSgdClassificationTests.cs (3)
47var col1 = data.GetColumn<float>(data.Schema["Score"]).Take(numExamples).ToArray(); 48var col2 = outInitData.GetColumn<float>(outInitData.Schema["Score"]).Take(numExamples).ToArray(); 49var col3 = outNoInitData.GetColumn<float>(outNoInitData.Schema["Score"]).Take(numExamples).ToArray();
Transformers\TextFeaturizerTests.cs (1)
764foreach (var input in testData.Take(5))
Microsoft.ML.Tokenizers.Tests (21)
BpeTests.cs (2)
449Assert.Equal(expectedIds.Take(expectedIds.Length - 2), tokenizer.EncodeToIds(text, expectedIds.Length - 2, out normalizedText, out length)); 453Assert.Equal(expectedIds.Take(expectedIds.Length - 2), tokenizer.EncodeToIds(text.AsSpan(), expectedIds.Length - 2, out normalizedText, out length));
CodeGenTests.cs (8)
401Assert.Equal(ids.Take(ids.Length - expectedTokensToExclude), codeGenTokenizer.EncodeToIds(text, ids.Length - 1, out normalizedText, out length)); 406Assert.Equal(ids.Take(ids.Length - expectedTokensToExclude), codeGenTokenizer.EncodeToIds(text.AsSpan(), ids.Length - 1, out normalizedText, out length)); 410Assert.Equal(expectedIds.Take(expectedIds.Length - expectedTokensToExclude), codeGenTokenizer.EncodeToIds(text, expectedIds.Length - 1, addPrefixSpace: false, addBeginningOfSentence: false, addEndOfSentence: false, out normalizedText, out length)); 413Assert.Equal(expectedIds.Take(expectedIds.Length - expectedTokensToExclude), codeGenTokenizer.EncodeToIds(text.AsSpan(), expectedIds.Length - 1, addPrefixSpace: false, addBeginningOfSentence: false, addEndOfSentence: false, out normalizedText, out length)); 417Assert.Equal(expectedIdsWithSpace.Take(expectedIdsWithSpace.Length - expectedTokensToExclude), codeGenTokenizer.EncodeToIds(text, expectedIdsWithSpace.Length - 1, addPrefixSpace: true, addBeginningOfSentence: false, addEndOfSentence: false, out normalizedText, out length)); 420Assert.Equal(expectedIdsWithSpace.Take(expectedIdsWithSpace.Length - expectedTokensToExclude), codeGenTokenizer.EncodeToIds(text.AsSpan(), expectedIdsWithSpace.Length - 1, addPrefixSpace: true, addBeginningOfSentence: false, addEndOfSentence: false, out normalizedText, out length)); 1000Assert.Equal(encodingIds.Take(expectedTokenCount), ids); 1005Assert.Equal(encodingIds.Take(expectedTokenCount), ids);
EnglishRobertaTests.cs (2)
201Assert.Equal(expectedIds.Take(expectedIds.Length - 2), tokenizer.EncodeToIds(text, expectedIds.Length - 2, out normalizedText, out length)); 205Assert.Equal(expectedIds.Take(expectedIds.Length - 2), tokenizer.EncodeToIds(text.AsSpan(), expectedIds.Length - 2, out normalizedText, out length));
LlamaTests.cs (4)
596Assert.Equal(expectedIds1.Take(expectedIds1.Length - 6), sentencePieceBpe.EncodeToIds( 606(int Index, int Length)[] expectedOffsets1 = addBeginningOfSentence ? expectedOffsets.Take(expectedIds1.Length - 6).ToArray() : expectedOffsets.Skip(1).Take(expectedIds1.Length - 6).ToArray(); 611Assert.Equal(expectedIds1.Take(expectedIds1.Length - 6), sentencePieceBpe.EncodeToIds(
TiktokenTests.cs (2)
588Assert.Equal(expectedIds.Take(expectedIds.Length - 4), tokenizer.EncodeToIds(text, expectedIds.Length - 4, out normalizedText, out length)); 592Assert.Equal(expectedIds.Take(expectedIds.Length - 4), tokenizer.EncodeToIds(text.AsSpan(), expectedIds.Length - 4, out normalizedText, out length));
TokenizerTests.cs (2)
144Assert.Equal(fullIdsList.Take(partialIdsList.Count), partialIdsList); 166Assert.Equal(prefixIds, fullIdsList.Take(prefixIds.Count));
WordPieceTests.cs (1)
93Assert.Equal(ids.Take(expectedTokenCount[i - 1]).ToArray(), tokenizer.EncodeToIds(text, maxTokenCount: i, normalizedText: out _, out tokenCount));
Microsoft.ML.TorchSharp (1)
Utils\MetricUtils.cs (1)
48topK = topK.OrderByDescending(tuple => tuple.score).Take(k).ToList();
Microsoft.ML.Vision (1)
ImageClassificationTrainer.cs (1)
873validationSetCount, featureLength, featurizedImages.Take(validationSetCount));
Microsoft.NET.StringTools (1)
WeakStringCacheInterner.cs (1)
153.Take(15)
Microsoft.NET.StringTools.net35 (1)
WeakStringCacheInterner.cs (1)
153.Take(15)
Microsoft.VisualStudio.LanguageServices (1)
PreviewPane\PreviewPane.xaml.cs (1)
165previewItems = previewItems.Take(MaxItems).Concat("...").ToList();
PresentationFramework (1)
MS\Internal\WindowsRuntime\Generated\WinRT\GuidGenerator.cs (1)
126return new Guid(data.Take(16).ToArray());
System.ComponentModel.Composition (1)
System\ComponentModel\Composition\Hosting\TypeCatalog.cs (1)
375foreach (ReflectionComposablePartDefinition definition in PartsInternal.Take(displayCount))
System.Drawing.Common.Tests (1)
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (1)
536Assert.Equal(colors.Take(2).Select(c => Color.FromArgb(c.ToArgb())), brush.LinearColors);
System.Linq.Parallel (1)
System\Linq\Parallel\QueryOperators\Unary\TakeOrSkipQueryOperator.cs (1)
321return Child.AsSequentialQuery(token).Take(_count);
System.Windows.Forms.Tests (10)
System\Windows\Forms\ListBindingHelperTests.cs (10)
323yield return new object[] { new MultiListDataClass { ParentListProperty = [new() { ListProperty = [new()] }] }, TypeDescriptor.GetProperties(typeof(MultiListDataClass)).Cast<PropertyDescriptor>().Take(0).ToArray(), new string[] { "ParentListProperty" } }; 326yield return new object[] { new MultiListDataClass { ParentListProperty = [new() { ListProperty = [new()] }] }, inner.Take(2).ToArray(), new string[] { "Property" } }; 337yield return new object[] { new IEnumerableWrapper(new object[] { new MultiListDataClass() }), inner.Take(2).ToArray(), new string[] { "Property" } }; 344yield return new object[] { new ArrayList { new MultiListDataClass() }, inner.Take(0).ToArray(), new string[] { "ParentListProperty" } }; 345yield return new object[] { new ArrayList { new MultiListDataClass() }, inner.Take(2).ToArray(), new string[] { "Property" } }; 346yield return new object[] { new ArrayList { new MultiListDataClass { ParentListProperty = [] } }, inner.Take(0).ToArray(), new string[] { "ParentListProperty" } }; 347yield return new object[] { new ArrayList { new MultiListDataClass { ParentListProperty = [] } }, inner.Take(2).ToArray(), new string[] { "Property" } }; 348yield return new object[] { new ArrayList { new MultiListDataClass { ParentListProperty = [new() { ListProperty = [new()] }] } }, inner.Take(0).ToArray(), new string[] { "ParentListProperty" } }; 349yield return new object[] { new ArrayList { new MultiListDataClass { ParentListProperty = [new() { ListProperty = [new()] }] } }, inner.Take(2).ToArray(), new string[] { "Property" } }; 350yield return new object[] { new ArrayList { new MultiListDataClass { ParentListProperty = [new() { ListProperty = [new()] }] } }, inner.Take(3).ToArray(), Array.Empty<string>() };
TagHelpersWebSite (1)
TagHelpers\TagCloudViewComponentTagHelper.cs (1)
81return Tags.Take(count).ToArray();
xunit.assert (7)
Sdk\ArgumentFormatter.cs (7)
254 .Take(MAX_OBJECT_PARAMETER_COUNT + 1) 260 var formattedParameters = string.Join(", ", parameters.Take(MAX_OBJECT_PARAMETER_COUNT).Select(p => $"{p.name} = {p.value}")); 295 var leftValues = enumeratedValues.Skip(startIndex).Take(leftCount).ToList(); 296 var rightValues = enumeratedValues.Skip(startIndex + leftCount).Take(MAX_ENUMERABLE_LENGTH - leftCount + 1).ToList(); 310 printedValues += string.Join(", ", rightValues.Take(MAX_ENUMERABLE_LENGTH - leftCount).Select(x => FormatInner(x, depth + 1))); 316 var values = enumerableValues.Take(MAX_ENUMERABLE_LENGTH + 1).ToList(); 317 printedValues += string.Join(", ", values.Take(MAX_ENUMERABLE_LENGTH).Select(x => FormatInner(x, depth + 1)));