471 references to Take
AnalyzerRunner (1)
Aspire.Dashboard (7)
CatalogService (1)
GenerateDocumentationAndConfigFiles (6)
installer.tasks (4)
Metrics (6)
Metrics.Legacy (6)
Microsoft.AspNetCore.Antiforgery.Test (1)
Microsoft.AspNetCore.Components.Endpoints (2)
Microsoft.AspNetCore.Components.Tests (10)
Rendering\ArrayBuilderTest.cs (10)
43Assert.Equal(new[] { value1, value2, value3 }, builder.Buffer.Take(3));
61Assert.Equal(Enumerable.Repeat(5, capacity), builder.Buffer.Take(capacity));
76Assert.Equal(new[] { 8, 8 }, builder.Buffer.Take(2));
91Assert.Equal(array, builder.Buffer.Take(array.Length));
107Assert.Equal(new[] { 118, 8, 8 }, builder.Buffer.Take(3));
126Assert.Equal(array, builder.Buffer.Take(array.Length));
143Assert.Equal(new[] { 7, 2, 9 }, builder.Buffer.Take(3));
160Assert.Equal(new[] { 7, 2, 3, 9 }, builder.Buffer.Take(4));
175Assert.Equal(new[] { 1, 2, 3 }, builder.Buffer.Take(3));
192Assert.Equal(new[] { 1, 2, }, builder.Buffer.Take(2));
Microsoft.AspNetCore.Components.Web (2)
Microsoft.AspNetCore.Components.WebAssembly.Tests (3)
Microsoft.AspNetCore.Cryptography.Internal.Tests (1)
Microsoft.AspNetCore.DataProtection.Tests (1)
Microsoft.AspNetCore.Diagnostics (3)
Microsoft.AspNetCore.Hosting (3)
Microsoft.AspNetCore.Http.Extensions (2)
Microsoft.AspNetCore.Localization (1)
Microsoft.AspNetCore.Mvc.Core.Test (9)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (11)
Buffers\PagedCharBufferTest.cs (10)
59Assert.Equal(new[] { 'a', 'b', 'c', 't' }, page.Take(4));
78Assert.Equal(stringToAppend.ToCharArray(), page.Take(PagedCharBuffer.PageSize - 1));
128Assert.Equal(stringToAppend.ToCharArray(), page.Take(2 * PagedCharBuffer.PageSize - 1));
145Assert.Equal(new[] { 'a', 'b', 'c' }, page.Take(buffer.Length));
197page => Assert.Equal(expected2, page.Take(PagedCharBuffer.PageSize + 1)));
274Assert.Equal(new[] { 'a', 'b', 'c', 'd', 'e', 'f' }, page.Take(buffer.Length));
290Assert.Equal(new[] { 'b', 'c', 'd' }, page.Take(buffer.Length));
347page => Assert.Equal(expected2, page.Take(PagedCharBuffer.PageSize + 1)));
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));
Microsoft.AspNetCore.Routing.Tests (1)
Microsoft.AspNetCore.Server.IIS (3)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (23)
Http2\Http2FrameWriterTests.cs (3)
47Assert.Equal(new byte[] { 0x00, 0x00, 0x00, 0x01 }, payload.Skip(Http2FrameReader.HeaderLength).Take(4).ToArray());
69Assert.Equal(new byte[] { 0x00, 0x00, 0x00, 0x01 }, payload.Skip(Http2FrameReader.HeaderLength).Take(4).ToArray());
87Assert.Equal(new byte[] { 0x00, 0x00, 0x00, 0x00 }, payload.Skip(5).Take(4).ToArray());
Microsoft.AspNetCore.Shared.Tests (9)
Microsoft.AspNetCore.SignalR.Common.Tests (2)
Microsoft.AspNetCore.SignalR.Core (1)
Microsoft.AspNetCore.TestHost.Tests (2)
Microsoft.AspNetCore.WebSockets.Tests (2)
Microsoft.Build.Engine.OM.UnitTests (1)
Microsoft.CodeAnalysis.Analyzers (7)
Microsoft.CodeAnalysis.AnalyzerUtilities (6)
Microsoft.CodeAnalysis.BannedApiAnalyzers (6)
Microsoft.CodeAnalysis.CodeStyle (6)
Microsoft.CodeAnalysis.CSharp (2)
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (11)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Features (11)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
Microsoft.CodeAnalysis.EditorFeatures (1)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Microsoft.CodeAnalysis.Features (19)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (6)
Microsoft.CodeAnalysis.PublicApiAnalyzers (6)
Microsoft.CodeAnalysis.Rebuild (1)
Microsoft.CodeAnalysis.ResxSourceGenerator (6)
Microsoft.CodeAnalysis.Test.Utilities (2)
Microsoft.CodeAnalysis.UnitTests (20)
Microsoft.CodeAnalysis.Workspaces (6)
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Microsoft.Data.Analysis.Tests (1)
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
Microsoft.DotNet.Deployment.Tasks.Links (1)
Microsoft.Extensions.AI.Evaluation.NLP (2)
Microsoft.Extensions.AI.Evaluation.Reporting (1)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (3)
Microsoft.Maui.Controls (2)
Microsoft.Maui.Controls.Build.Tasks (2)
Microsoft.ML.AutoML (7)
Microsoft.ML.AutoML.Tests (2)
Microsoft.ML.Data (10)
Microsoft.ML.Ensemble (1)
Microsoft.ML.FastTree (4)
Microsoft.ML.GenAI.Core (2)
Microsoft.ML.GenAI.Mistral (1)
Microsoft.ML.Mkl.Components (1)
Microsoft.ML.Parquet (3)
Microsoft.ML.Samples (64)
Microsoft.ML.Samples.GPU (1)
Microsoft.ML.SearchSpace (2)
Microsoft.ML.StandardTrainers (2)
Microsoft.ML.Sweeper (1)
Microsoft.ML.Tests (18)
Microsoft.ML.Tokenizers.Tests (28)
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);
Microsoft.ML.TorchSharp (1)
Microsoft.ML.Vision (1)
Microsoft.NET.StringTools (1)
Microsoft.NET.StringTools.net35 (1)
Microsoft.VisualStudio.LanguageServices (1)
PresentationFramework (1)
Roslyn.Diagnostics.Analyzers (6)
Roslyn.Diagnostics.CSharp.Analyzers (5)
System.ComponentModel.Composition (1)
System.Drawing.Common.Tests (1)
System.Linq (1)
System.Linq.Parallel (1)
System.Windows.Forms.Tests (10)
TagHelpersWebSite (1)
Test.Utilities (6)
Text.Analyzers (6)
xunit.assert (2)