672 implementations of Count
Aspire.RabbitMQ.Client (1)
ConfigurationSchemaGenerator (1)
GenerateDocumentationAndConfigFiles (23)
Metrics (23)
Metrics.Legacy (23)
Microsoft.AspNetCore.Components (3)
Microsoft.AspNetCore.Components.Endpoints (1)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (2)
Microsoft.AspNetCore.Hosting (4)
Microsoft.AspNetCore.Http (1)
Microsoft.AspNetCore.Http.Abstractions (2)
Microsoft.AspNetCore.Http.Connections (1)
Microsoft.AspNetCore.Http.Connections.Client (1)
Microsoft.AspNetCore.HttpLogging (1)
Microsoft.AspNetCore.Mvc.Abstractions (2)
Microsoft.AspNetCore.Mvc.Core (2)
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Microsoft.AspNetCore.Routing (1)
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Microsoft.AspNetCore.Shared.Tests (1)
Microsoft.AspNetCore.SignalR.Client.Core (1)
Microsoft.AspNetCore.SignalR.Core (1)
Microsoft.Build.Framework (14)
Microsoft.CodeAnalysis (32)
Microsoft.CodeAnalysis.Analyzers (23)
Microsoft.CodeAnalysis.AnalyzerUtilities (23)
Microsoft.CodeAnalysis.BannedApiAnalyzers (23)
Microsoft.CodeAnalysis.CodeStyle (23)
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (1)
Microsoft.CodeAnalysis.Collections.Package (21)
Microsoft.CodeAnalysis.Debugging.Package (1)
Microsoft.CodeAnalysis.Extensions.Package (21)
Microsoft.CodeAnalysis.InteractiveHost (21)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (23)
Microsoft.CodeAnalysis.PooledObjects.Package (1)
Microsoft.CodeAnalysis.PublicApiAnalyzers (23)
Microsoft.CodeAnalysis.ResxSourceGenerator (23)
Microsoft.CodeAnalysis.Threading.Package (21)
Microsoft.CodeAnalysis.UnitTests (1)
Microsoft.CodeAnalysis.Workspaces (24)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (22)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Microsoft.DotNet.XUnitAssert.Tests (1)
Microsoft.Extensions.AI (2)
Microsoft.Extensions.AI.Abstractions (5)
Microsoft.Extensions.AI.Abstractions.Tests (2)
Microsoft.Extensions.AI.AzureAIInference (2)
Microsoft.Extensions.AI.Ollama (2)
Microsoft.Extensions.AI.OpenAI (2)
Microsoft.Extensions.Diagnostics.HealthChecks (2)
Microsoft.Extensions.Http (1)
Microsoft.Extensions.Http.Diagnostics (2)
Microsoft.Extensions.Logging (1)
Microsoft.Extensions.Logging.Abstractions (8)
Microsoft.Extensions.Primitives (1)
Microsoft.Extensions.Telemetry (3)
Microsoft.Extensions.Telemetry.Abstractions (1)
Microsoft.Gen.ComplianceReports.Unit.Tests (2)
Microsoft.Gen.ContextualOptions.Unit.Tests (2)
Microsoft.Gen.Logging.Unit.Tests (2)
Microsoft.Gen.MetadataExtractor.Unit.Tests (2)
Microsoft.Gen.Metrics.Unit.Tests (2)
Microsoft.Gen.MetricsReports.Unit.Tests (2)
Microsoft.Maui (2)
Microsoft.Maui.Controls (7)
Microsoft.ML.Core (1)
Microsoft.ML.Data (1)
Microsoft.ML.DataView (1)
Microsoft.ML.StandardTrainers (1)
PresentationFramework (2)
Roslyn.Diagnostics.Analyzers (23)
Shared (2)
Shared.Tests (2)
SignalRSamples (1)
SocialWeather (1)
System.Collections (11)
System.Collections.Concurrent (4)
System.Collections.Immutable (16)
System.Diagnostics.DiagnosticSource (1)
System.Formats.Nrbf (1)
System.Linq (4)
System.Linq.AsyncEnumerable (1)
System.Linq.Expressions (1)
System.Net.Http (3)
System.Net.Primitives (1)
System.Net.WebSockets.Client (1)
System.Private.CoreLib (15)
src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentQueue.cs (1)
256public int Count
System.Private.Windows.Core (2)
System.Private.Windows.Core.TestUtilities (2)
System.Reflection.Metadata (25)
System.Security.Cryptography.Cose (1)
System.Text.Json.SourceGeneration (1)
System.Text.RegularExpressions (4)
System.Windows.Forms.Primitives (1)
Test.Utilities (23)
Text.Analyzers (23)
2451 references to Count
AnalyzerRunner (2)
aspire (9)
Aspire.Cli.Tests (4)
Aspire.Dashboard (15)
Aspire.Dashboard.Components.Tests (4)
Aspire.Hosting (10)
Aspire.Hosting.Azure (2)
Aspire.Hosting.Azure.AppContainers (2)
Aspire.Hosting.Azure.AppService (2)
Aspire.Hosting.Azure.CosmosDB (2)
Aspire.Hosting.Azure.WebPubSub (1)
Aspire.Hosting.Docker (2)
Aspire.Hosting.Kubernetes (2)
Aspire.Hosting.Tests (5)
Aspire.Hosting.Yarp (1)
Aspire.RabbitMQ.Client.Tests (2)
Aspire.RabbitMQ.Client.v7.Tests (2)
Aspire.Templates.Tests (1)
Diagnostics.EFCore.FunctionalTests (1)
dotnet-dev-certs (2)
dotnet-svcutil-lib (1)
GenerateDocumentationAndConfigFiles (33)
HttpStress (1)
illink (3)
ILLink.CodeFixProvider (1)
ILLink.RoslynAnalyzer (2)
KeyManagementSample (2)
Metrics (25)
Metrics.Legacy (25)
Microsoft.Analyzers.Extra (1)
Microsoft.Analyzers.Extra.Tests (24)
Microsoft.Analyzers.Local.Tests (11)
Microsoft.AspNetCore.App.Analyzers.Test (3)
Microsoft.AspNetCore.AsyncState (1)
Microsoft.AspNetCore.Authentication.JwtBearer (1)
Microsoft.AspNetCore.Authorization.Policy (4)
Microsoft.AspNetCore.Components (46)
Microsoft.AspNetCore.Components.Endpoints (21)
Microsoft.AspNetCore.Components.Endpoints.Tests (4)
Microsoft.AspNetCore.Components.QuickGrid.Tests (1)
Microsoft.AspNetCore.Components.Server (15)
Microsoft.AspNetCore.Components.Server.Tests (5)
Microsoft.AspNetCore.Components.Tests (6)
Microsoft.AspNetCore.Components.Web (5)
Microsoft.AspNetCore.Components.WebAssembly (3)
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
Microsoft.AspNetCore.DataProtection (1)
Microsoft.AspNetCore.DataProtection.Tests (6)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (40)
Logging\AcceptanceTests.cs (26)
244Assert.Equal(8, state!.Count);
249Assert.Equal(7, state!.Count);
304Assert.Equal(9, state!.Count);
309Assert.Equal(7, state!.Count);
390Assert.Equal(5, logRecords.Count);
402Assert.Equal(6, requestState!.Count);
412Assert.Equal(3, requestBodyState!.Count);
415Assert.Equal(2, responseState!.Count);
419Assert.Equal(2, responseBodyState!.Count);
422Assert.Equal(2, durationState!.Count);
460Assert.Equal(9, state!.Count);
506Assert.Equal(9, state!.Count);
548Assert.Equal(7, state!.Count);
571Assert.Equal(3, logRecords.Count);
580Assert.Equal(5, firstState!.Count);
584Assert.Equal(3, secondState!.Count);
609Assert.Equal(6, logRecords.Count);
622Assert.Equal(5, firstRecord!.Count);
624Assert.Equal(5, fourthRecord!.Count);
638Assert.Equal(2, thirdRecord!.Count);
639Assert.Equal(2, sixthRecord!.Count);
665Assert.Equal(7, state!.Count);
706Assert.Equal(10, state!.Count);
740Assert.Equal(7, state!.Count);
798Assert.Equal(7, logCollector.GetSnapshot()[0].StructuredState!.Count);
991Assert.Equal(7, logCollector.GetSnapshot()[1].StructuredState!.Count);
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Microsoft.AspNetCore.HeaderParsing (1)
Microsoft.AspNetCore.Http (1)
Microsoft.AspNetCore.Http.Connections.Tests (8)
Microsoft.AspNetCore.Http.Extensions (4)
Microsoft.AspNetCore.Http.Extensions.Tests (1)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
Microsoft.AspNetCore.Http.Results (5)
Microsoft.AspNetCore.Identity (1)
Microsoft.AspNetCore.JsonPatch (1)
Microsoft.AspNetCore.JsonPatch.SystemTextJson (1)
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
Microsoft.AspNetCore.Mvc.Core (60)
Microsoft.AspNetCore.Mvc.Core.Test (11)
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (2)
Microsoft.AspNetCore.Mvc.Razor (4)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (5)
Microsoft.AspNetCore.Mvc.RazorPages (7)
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
Microsoft.AspNetCore.Mvc.TagHelpers (6)
Microsoft.AspNetCore.Mvc.Testing (1)
Microsoft.AspNetCore.Mvc.ViewFeatures (13)
Microsoft.AspNetCore.OpenApi (2)
Microsoft.AspNetCore.Owin (1)
Microsoft.AspNetCore.Routing (124)
Microsoft.AspNetCore.Routing.Microbenchmarks (2)
Microsoft.AspNetCore.Routing.Tests (22)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
Microsoft.AspNetCore.Server.HttpSys.Microbenchmarks (2)
Microsoft.AspNetCore.Server.HttpSys.Tests (4)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
Microsoft.AspNetCore.SignalR.Client.Core (1)
Microsoft.AspNetCore.SignalR.Client.Tests (3)
Microsoft.AspNetCore.SignalR.Core (2)
Microsoft.AspNetCore.SignalR.Protocols.Json (1)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (2)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (3)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (7)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
Microsoft.AspNetCore.SignalR.Tests (7)
Microsoft.AspNetCore.StaticAssets (5)
Microsoft.AspNetCore.Testing (1)
Microsoft.AspNetCore.Tests (1)
Microsoft.Build.Framework (4)
Microsoft.CodeAnalysis (75)
PEWriter\MetadataWriter.cs (16)
1961metadata.SetCapacity(TableIndex.AssemblyRef, assemblyRefs.Count);
2212metadata.SetCapacity(TableIndex.Event, eventDefs.Count);
2380metadata.SetCapacity(TableIndex.Field, fieldDefs.Count);
2588metadata.SetCapacity(TableIndex.MemberRef, memberRefs.Count);
2615metadata.SetCapacity(TableIndex.MethodSpec, methodSpecs.Count);
2628metadata.SetCapacity(TableIndex.MethodDef, methodDefs.Count);
2651metadata.SetCapacity(TableIndex.MethodSemantics, propertyDefs.Count * 2 + eventDefs.Count * 2);
2713metadata.SetCapacity(TableIndex.ModuleRef, moduleRefs.Count);
2753metadata.SetCapacity(TableIndex.Param, parameterDefs.Count);
2767metadata.SetCapacity(TableIndex.Property, propertyDefs.Count);
2781metadata.SetCapacity(TableIndex.TypeDef, typeDefs.Count);
2838metadata.SetCapacity(TableIndex.TypeRef, typeRefs.Count);
2898metadata.SetCapacity(TableIndex.TypeSpec, typeSpecs.Count);
2920int[] bodyOffsets = new int[methods.Count];
2952int[] bodyOffsets = new int[methods.Count];
Microsoft.CodeAnalysis.Analyzers (34)
Microsoft.CodeAnalysis.AnalyzerUtilities (29)
Microsoft.CodeAnalysis.BannedApiAnalyzers (33)
Microsoft.CodeAnalysis.CodeStyle (24)
Microsoft.CodeAnalysis.CodeStyle.Fixes (13)
Microsoft.CodeAnalysis.Collections.Package (9)
Microsoft.CodeAnalysis.CSharp (13)
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (6)
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (8)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (10)
Microsoft.CodeAnalysis.CSharp.Features (12)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (10)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (78)
CodeGeneration\SyntaxGeneratorTests.cs (78)
2078Assert.Equal(1, attrsAdded.Count);
2758=> Assert.Equal(0, Generator.GetNamespaceImports(Generator.RemoveNodes(declaration, Generator.GetNamespaceImports(declaration))).Count);
2974=> Assert.Equal(0, Generator.GetMembers(Generator.RemoveNodes(declaration, Generator.GetMembers(declaration))).Count);
3375Assert.Equal(0, Generator.GetParameters(Generator.MethodDeclaration("m")).Count);
3376Assert.Equal(1, Generator.GetParameters(Generator.MethodDeclaration("m", parameters: [Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))])).Count);
3377Assert.Equal(2, Generator.GetParameters(Generator.MethodDeclaration("m", parameters: [Generator.ParameterDeclaration("p", Generator.IdentifierName("t")), Generator.ParameterDeclaration("p2", Generator.IdentifierName("t2"))])).Count);
3379Assert.Equal(0, Generator.GetParameters(Generator.ConstructorDeclaration()).Count);
3380Assert.Equal(1, Generator.GetParameters(Generator.ConstructorDeclaration(parameters: [Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))])).Count);
3381Assert.Equal(2, Generator.GetParameters(Generator.ConstructorDeclaration(parameters: [Generator.ParameterDeclaration("p", Generator.IdentifierName("t")), Generator.ParameterDeclaration("p2", Generator.IdentifierName("t2"))])).Count);
3383Assert.Equal(1, Generator.GetParameters(Generator.IndexerDeclaration([Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))], Generator.IdentifierName("t"))).Count);
3384Assert.Equal(2, Generator.GetParameters(Generator.IndexerDeclaration([Generator.ParameterDeclaration("p", Generator.IdentifierName("t")), Generator.ParameterDeclaration("p2", Generator.IdentifierName("t2"))], Generator.IdentifierName("t"))).Count);
3386Assert.Equal(0, Generator.GetParameters(Generator.ValueReturningLambdaExpression(Generator.IdentifierName("expr"))).Count);
3387Assert.Equal(1, Generator.GetParameters(Generator.ValueReturningLambdaExpression("p1", Generator.IdentifierName("expr"))).Count);
3389Assert.Equal(0, Generator.GetParameters(Generator.VoidReturningLambdaExpression(Generator.IdentifierName("expr"))).Count);
3390Assert.Equal(1, Generator.GetParameters(Generator.VoidReturningLambdaExpression("p1", Generator.IdentifierName("expr"))).Count);
3392Assert.Equal(0, Generator.GetParameters(Generator.DelegateDeclaration("d")).Count);
3393Assert.Equal(1, Generator.GetParameters(Generator.DelegateDeclaration("d", parameters: [Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))])).Count);
3395Assert.Equal(0, Generator.GetParameters(Generator.ClassDeclaration("c")).Count);
3396Assert.Equal(0, Generator.GetParameters(Generator.IdentifierName("x")).Count);
3402Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.MethodDeclaration("m"), [Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))])).Count);
3403Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.ConstructorDeclaration(), [Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))])).Count);
3404Assert.Equal(3, Generator.GetParameters(Generator.AddParameters(Generator.IndexerDeclaration([Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))], Generator.IdentifierName("t")), [Generator.ParameterDeclaration("p2", Generator.IdentifierName("t2")), Generator.ParameterDeclaration("p3", Generator.IdentifierName("t3"))])).Count);
3406Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.ValueReturningLambdaExpression(Generator.IdentifierName("expr")), [Generator.LambdaParameter("p")])).Count);
3407Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.VoidReturningLambdaExpression(Generator.IdentifierName("expr")), [Generator.LambdaParameter("p")])).Count);
3409Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.DelegateDeclaration("d"), [Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))])).Count);
3411Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.ClassDeclaration("c"), [Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))])).Count);
3412Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.StructDeclaration("c"), [Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))])).Count);
3413Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.InterfaceDeclaration("c"), [Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))])).Count);
3414Assert.Equal(0, Generator.GetParameters(Generator.AddParameters(Generator.IdentifierName("x"), [Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))])).Count);
3427Assert.Equal(1, Generator.GetStatements(Generator.ValueReturningLambdaExpression("p", [Generator.IdentifierName("x")])).Count);
3492Assert.Equal(2, Generator.GetAccessors(prop).Count);
3517Assert.Equal(0, Generator.GetStatements(getAccessor).Count);
3518Assert.Equal(0, Generator.GetStatements(setAccessor).Count);
3595Assert.Equal(2, Generator.GetAccessors(x).Count);
3596Assert.Equal(0, Generator.GetAccessors(y).Count);
3601Assert.Equal(0, Generator.GetAccessors(y2).Count);
3618Assert.Equal(2, Generator.GetAccessors(x).Count);
3619Assert.Equal(0, Generator.GetAccessors(y).Count);
3624Assert.Equal(0, Generator.GetAccessors(y2).Count);
3690Assert.Equal(0, Generator.GetStatements(Generator.MethodDeclaration("m")).Count);
3691Assert.Equal(2, Generator.GetStatements(Generator.MethodDeclaration("m", statements: stmts)).Count);
3693Assert.Equal(0, Generator.GetStatements(Generator.ConstructorDeclaration()).Count);
3694Assert.Equal(2, Generator.GetStatements(Generator.ConstructorDeclaration(statements: stmts)).Count);
3696Assert.Equal(0, Generator.GetStatements(Generator.VoidReturningLambdaExpression([])).Count);
3697Assert.Equal(2, Generator.GetStatements(Generator.VoidReturningLambdaExpression(stmts)).Count);
3699Assert.Equal(0, Generator.GetStatements(Generator.ValueReturningLambdaExpression([])).Count);
3700Assert.Equal(2, Generator.GetStatements(Generator.ValueReturningLambdaExpression(stmts)).Count);
3702Assert.Equal(0, Generator.GetStatements(Generator.IdentifierName("x")).Count);
3717Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.MethodDeclaration("m"), stmts)).Count);
3718Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.ConstructorDeclaration(), stmts)).Count);
3719Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.VoidReturningLambdaExpression([]), stmts)).Count);
3720Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.ValueReturningLambdaExpression([]), stmts)).Count);
3722Assert.Equal(0, Generator.GetStatements(Generator.WithStatements(Generator.IdentifierName("x"), stmts)).Count);
3740Assert.Equal(0, Generator.GetGetAccessorStatements(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"))).Count);
3741Assert.Equal(2, Generator.GetGetAccessorStatements(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), getAccessorStatements: stmts)).Count);
3743Assert.Equal(0, Generator.GetGetAccessorStatements(Generator.IndexerDeclaration([p], Generator.IdentifierName("t"))).Count);
3744Assert.Equal(2, Generator.GetGetAccessorStatements(Generator.IndexerDeclaration([p], Generator.IdentifierName("t"), getAccessorStatements: stmts)).Count);
3746Assert.Equal(0, Generator.GetGetAccessorStatements(Generator.IdentifierName("x")).Count);
3749Assert.Equal(0, Generator.GetSetAccessorStatements(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"))).Count);
3750Assert.Equal(2, Generator.GetSetAccessorStatements(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), setAccessorStatements: stmts)).Count);
3752Assert.Equal(0, Generator.GetSetAccessorStatements(Generator.IndexerDeclaration([p], Generator.IdentifierName("t"))).Count);
3753Assert.Equal(2, Generator.GetSetAccessorStatements(Generator.IndexerDeclaration([p], Generator.IdentifierName("t"), setAccessorStatements: stmts)).Count);
3755Assert.Equal(0, Generator.GetSetAccessorStatements(Generator.IdentifierName("x")).Count);
3773Assert.Equal(2, Generator.GetGetAccessorStatements(Generator.WithGetAccessorStatements(Generator.PropertyDeclaration("p", Generator.IdentifierName("t")), stmts)).Count);
3774Assert.Equal(2, Generator.GetGetAccessorStatements(Generator.WithGetAccessorStatements(Generator.IndexerDeclaration([p], Generator.IdentifierName("t")), stmts)).Count);
3775Assert.Equal(0, Generator.GetGetAccessorStatements(Generator.WithGetAccessorStatements(Generator.IdentifierName("x"), stmts)).Count);
3778Assert.Equal(2, Generator.GetSetAccessorStatements(Generator.WithSetAccessorStatements(Generator.PropertyDeclaration("p", Generator.IdentifierName("t")), stmts)).Count);
3779Assert.Equal(2, Generator.GetSetAccessorStatements(Generator.WithSetAccessorStatements(Generator.IndexerDeclaration([p], Generator.IdentifierName("t")), stmts)).Count);
3780Assert.Equal(0, Generator.GetSetAccessorStatements(Generator.WithSetAccessorStatements(Generator.IdentifierName("x"), stmts)).Count);
3795Assert.Equal(2, baseListBI.Count);
3808Assert.Equal(1, baseListB.Count);
4031Assert.Equal(1, Generator.GetAttributes(xAttributed).Count);
4035Assert.Equal(3, membersC.Count);
4381Assert.Equal(3, attrs.Count);
4588Assert.Equal(0, Generator.GetAttributes(declM).Count);
4591Assert.Equal(3, attrs.Count);
4695Assert.Equal(4, attrs.Count);
4714Assert.Equal(4, rattrs.Count);
Microsoft.CodeAnalysis.Debugging.Package (6)
Microsoft.CodeAnalysis.EditorFeatures (15)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (12)
Tagging\TagSpanIntervalTreeTests.cs (7)
87Assert.Equal(50, GetIntersectingSpans(tree, new SnapshotSpan(buffer.CurrentSnapshot, 150, 50)).Count);
90Assert.Equal(26, GetIntersectingSpans(tree, new SnapshotSpan(buffer.CurrentSnapshot, 175, 25)).Count);
101Assert.Equal(1, GetIntersectingSpans(tree, new SnapshotSpan(buffer.CurrentSnapshot, 0, 1)).Count);
102Assert.Equal(1, GetIntersectingSpans(tree, new SnapshotSpan(buffer.CurrentSnapshot, 50, 1)).Count);
105Assert.Equal(2, GetIntersectingSpans(tree, new SnapshotSpan(buffer.CurrentSnapshot, 100, 1)).Count);
119Assert.Equal(51, GetIntersectingSpans(tree, new SnapshotSpan(buffer.CurrentSnapshot, 0, 1)).Count);
133Assert.Equal(51, GetIntersectingSpans(tree, new SnapshotSpan(buffer.CurrentSnapshot, 99, 1)).Count);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (2)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
Microsoft.CodeAnalysis.Extensions.Package (13)
Microsoft.CodeAnalysis.Features (60)
Microsoft.CodeAnalysis.Features.UnitTests (8)
Microsoft.CodeAnalysis.InteractiveHost (9)
Microsoft.CodeAnalysis.LanguageServer.Protocol (7)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (33)
Microsoft.CodeAnalysis.PublicApiAnalyzers (25)
Microsoft.CodeAnalysis.Remote.ServiceHub (3)
Microsoft.CodeAnalysis.ResxSourceGenerator (26)
Microsoft.CodeAnalysis.ResxSourceGenerator.UnitTests (2)
Microsoft.CodeAnalysis.Test.Utilities (1)
Microsoft.CodeAnalysis.Threading.Package (9)
Microsoft.CodeAnalysis.UnitTests (42)
Collections\ImmutableSetTest.cs (12)
226Assert.Equal(1, set.Count);
269Assert.Equal(expectedValues.Length, set.Count);
289Assert.Equal(0, emptySet.Count); //, "Empty set should have a Count of 0");
394int initialCount = set.Count;
400Assert.Equal(initialCount - removedCount, set.Count);
401Assert.Equal(initialCount - removedCount - 1, nextSet.Count);
408Assert.Equal(initialCount - removedCount, set.Count);
490int initialCount = set.Count;
494Assert.Equal(initialCount + uniqueValues.Count, enumerateAddSet.Count);
505Assert.True(nextSet.Count > 0);
506Assert.Equal(initialCount + addedCount, set.Count);
512Assert.Equal(expectedCount, nextSet.Count);
Text\TextChangeTests.cs (10)
100Assert.Equal(1, changes.Count);
685Assert.Equal(1, changes.Count);
741Assert.Equal(1, changes.Count);
755Assert.Equal(1, changes.Count);
769Assert.Equal(1, changes.Count);
875Assert.Equal(1, changes.Count);
889Assert.Equal(2, changes.Count);
905Assert.Equal(2, changes.Count);
922Assert.Equal(1, changes.Count);
940Assert.Equal(1, changes.Count);
Microsoft.CodeAnalysis.VisualBasic (1)
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (3)
Microsoft.CodeAnalysis.VisualBasic.Features (1)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (73)
CodeGeneration\SyntaxGeneratorTests.vb (73)
2292Assert.Equal(1, attrsAdded.Count)
2836Assert.Equal(0, Generator.GetParameters(Generator.MethodDeclaration("m")).Count)
2837Assert.Equal(1, Generator.GetParameters(Generator.MethodDeclaration("m", parameters:={Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))})).Count)
2838Assert.Equal(2, Generator.GetParameters(Generator.MethodDeclaration("m", parameters:={Generator.ParameterDeclaration("p", Generator.IdentifierName("t")), Generator.ParameterDeclaration("p2", Generator.IdentifierName("t2"))})).Count)
2840Assert.Equal(0, Generator.GetParameters(Generator.ConstructorDeclaration()).Count)
2841Assert.Equal(1, Generator.GetParameters(Generator.ConstructorDeclaration(parameters:={Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))})).Count)
2842Assert.Equal(2, Generator.GetParameters(Generator.ConstructorDeclaration(parameters:={Generator.ParameterDeclaration("p", Generator.IdentifierName("t")), Generator.ParameterDeclaration("p2", Generator.IdentifierName("t2"))})).Count)
2844Assert.Equal(0, Generator.GetParameters(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"))).Count)
2846Assert.Equal(1, Generator.GetParameters(Generator.IndexerDeclaration({Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))}, Generator.IdentifierName("t"))).Count)
2847Assert.Equal(2, Generator.GetParameters(Generator.IndexerDeclaration({Generator.ParameterDeclaration("p", Generator.IdentifierName("t")), Generator.ParameterDeclaration("p2", Generator.IdentifierName("t2"))}, Generator.IdentifierName("t"))).Count)
2849Assert.Equal(0, Generator.GetParameters(Generator.ValueReturningLambdaExpression(Generator.IdentifierName("expr"))).Count)
2850Assert.Equal(1, Generator.GetParameters(Generator.ValueReturningLambdaExpression("p1", Generator.IdentifierName("expr"))).Count)
2852Assert.Equal(0, Generator.GetParameters(Generator.VoidReturningLambdaExpression(Generator.IdentifierName("expr"))).Count)
2853Assert.Equal(1, Generator.GetParameters(Generator.VoidReturningLambdaExpression("p1", Generator.IdentifierName("expr"))).Count)
2855Assert.Equal(0, Generator.GetParameters(Generator.DelegateDeclaration("d")).Count)
2856Assert.Equal(1, Generator.GetParameters(Generator.DelegateDeclaration("d", parameters:={Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))})).Count)
2858Assert.Equal(0, Generator.GetParameters(Generator.ClassDeclaration("c")).Count)
2859Assert.Equal(0, Generator.GetParameters(Generator.IdentifierName("x")).Count)
2864Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.MethodDeclaration("m"), {Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))})).Count)
2865Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.ConstructorDeclaration(), {Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))})).Count)
2866Assert.Equal(3, Generator.GetParameters(Generator.AddParameters(Generator.IndexerDeclaration({Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))}, Generator.IdentifierName("t")), {Generator.ParameterDeclaration("p2", Generator.IdentifierName("t2")), Generator.ParameterDeclaration("p3", Generator.IdentifierName("t3"))})).Count)
2868Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.ValueReturningLambdaExpression(Generator.IdentifierName("expr")), {Generator.LambdaParameter("p")})).Count)
2869Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.VoidReturningLambdaExpression(Generator.IdentifierName("expr")), {Generator.LambdaParameter("p")})).Count)
2871Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.DelegateDeclaration("d"), {Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))})).Count)
2873Assert.Equal(0, Generator.GetParameters(Generator.AddParameters(Generator.ClassDeclaration("c"), {Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))})).Count)
2874Assert.Equal(0, Generator.GetParameters(Generator.AddParameters(Generator.IdentifierName("x"), {Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))})).Count)
2875Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.PropertyDeclaration("p", Generator.IdentifierName("t")), {Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))})).Count)
2887Assert.Equal(1, Generator.GetStatements(Generator.ValueReturningLambdaExpression("p", {Generator.IdentifierName("x")})).Count)
2965Assert.Equal(0, Generator.GetStatements(Generator.MethodDeclaration("m")).Count)
2966Assert.Equal(2, Generator.GetStatements(Generator.MethodDeclaration("m", statements:=stmts)).Count)
2968Assert.Equal(0, Generator.GetStatements(Generator.ConstructorDeclaration()).Count)
2969Assert.Equal(2, Generator.GetStatements(Generator.ConstructorDeclaration(statements:=stmts)).Count)
2971Assert.Equal(0, Generator.GetStatements(Generator.VoidReturningLambdaExpression(Generator.IdentifierName("e"))).Count)
2972Assert.Equal(0, Generator.GetStatements(Generator.VoidReturningLambdaExpression({})).Count)
2973Assert.Equal(2, Generator.GetStatements(Generator.VoidReturningLambdaExpression(stmts)).Count)
2975Assert.Equal(0, Generator.GetStatements(Generator.ValueReturningLambdaExpression(Generator.IdentifierName("e"))).Count)
2976Assert.Equal(0, Generator.GetStatements(Generator.ValueReturningLambdaExpression({})).Count)
2977Assert.Equal(2, Generator.GetStatements(Generator.ValueReturningLambdaExpression(stmts)).Count)
2979Assert.Equal(0, Generator.GetStatements(Generator.IdentifierName("x")).Count)
2986Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.MethodDeclaration("m"), stmts)).Count)
2987Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.ConstructorDeclaration(), stmts)).Count)
2989Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.VoidReturningLambdaExpression({}), stmts)).Count)
2990Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.ValueReturningLambdaExpression({}), stmts)).Count)
2992Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.VoidReturningLambdaExpression(Generator.IdentifierName("e")), stmts)).Count)
2993Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.ValueReturningLambdaExpression(Generator.IdentifierName("e")), stmts)).Count)
2995Assert.Equal(0, Generator.GetStatements(Generator.WithStatements(Generator.IdentifierName("x"), stmts)).Count)
3056Assert.Equal(2, _g.GetAccessors(prop).Count)
3082Assert.Equal(0, _g.GetStatements(getAccessor).Count)
3083Assert.Equal(0, _g.GetStatements(setAccessor).Count)
3105Assert.Equal(0, Generator.GetGetAccessorStatements(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"))).Count)
3106Assert.Equal(2, Generator.GetGetAccessorStatements(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), getAccessorStatements:=stmts)).Count)
3108Assert.Equal(0, Generator.GetGetAccessorStatements(Generator.IndexerDeclaration({p}, Generator.IdentifierName("t"))).Count)
3109Assert.Equal(2, Generator.GetGetAccessorStatements(Generator.IndexerDeclaration({p}, Generator.IdentifierName("t"), getAccessorStatements:=stmts)).Count)
3111Assert.Equal(0, Generator.GetGetAccessorStatements(Generator.IdentifierName("x")).Count)
3114Assert.Equal(0, Generator.GetSetAccessorStatements(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"))).Count)
3115Assert.Equal(2, Generator.GetSetAccessorStatements(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), setAccessorStatements:=stmts)).Count)
3117Assert.Equal(0, Generator.GetSetAccessorStatements(Generator.IndexerDeclaration({p}, Generator.IdentifierName("t"))).Count)
3118Assert.Equal(2, Generator.GetSetAccessorStatements(Generator.IndexerDeclaration({p}, Generator.IdentifierName("t"), setAccessorStatements:=stmts)).Count)
3120Assert.Equal(0, Generator.GetSetAccessorStatements(Generator.IdentifierName("x")).Count)
3130Assert.Equal(2, Generator.GetGetAccessorStatements(Generator.WithGetAccessorStatements(Generator.PropertyDeclaration("p", Generator.IdentifierName("t")), stmts)).Count)
3131Assert.Equal(2, Generator.GetGetAccessorStatements(Generator.WithGetAccessorStatements(Generator.IndexerDeclaration({p}, Generator.IdentifierName("t")), stmts)).Count)
3132Assert.Equal(0, Generator.GetGetAccessorStatements(Generator.WithGetAccessorStatements(Generator.IdentifierName("x"), stmts)).Count)
3135Assert.Equal(2, Generator.GetSetAccessorStatements(Generator.WithSetAccessorStatements(Generator.PropertyDeclaration("p", Generator.IdentifierName("t")), stmts)).Count)
3136Assert.Equal(2, Generator.GetSetAccessorStatements(Generator.WithSetAccessorStatements(Generator.IndexerDeclaration({p}, Generator.IdentifierName("t")), stmts)).Count)
3137Assert.Equal(0, Generator.GetSetAccessorStatements(Generator.WithSetAccessorStatements(Generator.IdentifierName("x"), stmts)).Count)
3194Assert.Equal(0, Generator.GetMembers(Generator.RemoveNodes(declaration, Generator.GetMembers(declaration))).Count)
3207Assert.Equal(2, baseListBI.Count)
3219Assert.Equal(2, baseListXY.Count)
3242Assert.Equal(3, baseList.Count)
3533Assert.Equal(1, Generator.GetAttributes(xAttributed).Count)
3537Assert.Equal(3, membersC.Count)
3731Assert.Equal(3, attrs.Count)
3863Assert.Equal(3, imps.Count)
Microsoft.CodeAnalysis.Workspaces (76)
Editing\SyntaxGenerator.cs (10)
1030attributeArguments: args.Count > 0 ? args : null);
1105=> this.InsertAttributes(declaration, this.GetAttributes(declaration).Count, attributes);
1133=> this.InsertReturnAttributes(declaration, this.GetReturnAttributes(declaration).Count, attributes);
1155=> this.InsertAttributeArguments(attributeDeclaration, this.GetAttributeArguments(attributeDeclaration).Count, attributeArguments);
1177=> this.InsertNamespaceImports(declaration, this.GetNamespaceImports(declaration).Count, imports);
1205=> this.InsertMembers(declaration, this.GetMembers(declaration).Count, members);
1278=> this.InsertParameters(declaration, this.GetParameters(declaration).Count, parameters);
1294=> this.InsertSwitchSections(switchStatement, this.GetSwitchSections(switchStatement).Count, switchSections);
1336=> this.InsertAccessors(declaration, this.GetAccessors(declaration).Count, accessors);
1521for (int i = 0, count = list.Count; i < count; i++)
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (10)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (15)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Microsoft.CodeAnalysis.Workspaces.UnitTests (35)
SolutionTests\SolutionTests.cs (14)
3021Assert.Equal(1, actualAnalyzerReferences.Count);
3047Assert.Equal(2, actualAnalyzerReferences.Count);
3053Assert.Equal(1, actualAnalyzerReferences.Count);
3059Assert.Equal(2, actualAnalyzerReferences.Count);
4998Assert.Equal(2, solution.ProjectIds.Count);
5022Assert.Equal(2, solution.ProjectIds.Count);
5050Assert.Equal(2, solution.ProjectIds.Count);
5081Assert.Equal(3, solution.ProjectIds.Count);
5112Assert.Equal(3, solution.ProjectIds.Count);
5144Assert.Equal(3, solution.ProjectIds.Count);
5196Assert.Equal(3, solution.ProjectIds.Count);
5212Assert.Equal(1, solution.ProjectIds.Count);
5241Assert.Equal(3, solution.ProjectIds.Count);
5256Assert.Equal(1, solution.ProjectIds.Count);
Microsoft.Data.Analysis (17)
Microsoft.Data.Analysis.Tests (6)
Microsoft.DotNet.Arcade.Sdk (1)
Microsoft.DotNet.NuGetRepack.Tasks (2)
Microsoft.Extensions.AI (5)
Microsoft.Extensions.AI.Abstractions (5)
Microsoft.Extensions.AI.Abstractions.Tests (2)
Microsoft.Extensions.AI.AzureAIInference (6)
Microsoft.Extensions.AI.Evaluation (3)
Microsoft.Extensions.AI.Evaluation.Console (1)
Microsoft.Extensions.AI.Evaluation.NLP (3)
Microsoft.Extensions.AI.Evaluation.Quality (6)
Microsoft.Extensions.AI.Evaluation.Reporting (1)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
Microsoft.Extensions.AI.Evaluation.Safety (1)
Microsoft.Extensions.AI.Integration.Tests (1)
Microsoft.Extensions.AI.Ollama (5)
Microsoft.Extensions.AI.OpenAI (9)
Microsoft.Extensions.AmbientMetadata.Application (1)
Microsoft.Extensions.AsyncState (1)
Microsoft.Extensions.Caching.Hybrid (1)
Microsoft.Extensions.Compliance.Abstractions (1)
Microsoft.Extensions.Compliance.Redaction (1)
Microsoft.Extensions.Compliance.Testing (1)
Microsoft.Extensions.Compliance.Testing.Tests (2)
Microsoft.Extensions.DependencyInjection.AutoActivation (1)
Microsoft.Extensions.DependencyModel (4)
Microsoft.Extensions.Diagnostics.ExceptionSummarization (2)
Microsoft.Extensions.Diagnostics.HealthChecks (1)
Microsoft.Extensions.Diagnostics.HealthChecks.Common (1)
Microsoft.Extensions.Diagnostics.Probes (1)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (4)
Microsoft.Extensions.Diagnostics.Testing (3)
Microsoft.Extensions.Diagnostics.Testing.Tests (14)
Microsoft.Extensions.FileProviders.Embedded (2)
Microsoft.Extensions.Hosting.Testing (1)
Microsoft.Extensions.Http (1)
Microsoft.Extensions.Http.Diagnostics (9)
Microsoft.Extensions.Http.Diagnostics.Tests (4)
Microsoft.Extensions.Http.Resilience (1)
Microsoft.Extensions.Logging.Console (1)
Microsoft.Extensions.Logging.EventSource (2)
Microsoft.Extensions.Logging.Generators (1)
Microsoft.Extensions.ObjectPool.DependencyInjection (1)
Microsoft.Extensions.Options.Contextual (1)
Microsoft.Extensions.Options.SourceGeneration (1)
Microsoft.Extensions.Primitives (3)
Microsoft.Extensions.Resilience (1)
Microsoft.Extensions.ServiceDiscovery (5)
Microsoft.Extensions.ServiceDiscovery.Dns (6)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (6)
Microsoft.Extensions.ServiceDiscovery.Tests (5)
Microsoft.Extensions.ServiceDiscovery.Yarp (2)
Microsoft.Extensions.ServiceDiscovery.Yarp.Tests (2)
Microsoft.Extensions.Telemetry (3)
Microsoft.Extensions.Telemetry.Abstractions (1)
Microsoft.Extensions.Telemetry.Abstractions.Tests (6)
Microsoft.Extensions.Telemetry.PerformanceTests (1)
Microsoft.Extensions.TimeProvider.Testing (1)
Microsoft.Extensions.Validation (1)
Microsoft.Gen.ComplianceReports (1)
Microsoft.Gen.ComplianceReports.Unit.Tests (4)
Microsoft.Gen.ContextualOptions.Unit.Tests (4)
Microsoft.Gen.Logging (1)
Microsoft.Gen.Logging.Generated.Tests (10)
Microsoft.Gen.Logging.Unit.Tests (6)
Microsoft.Gen.MetadataExtractor (7)
Microsoft.Gen.MetadataExtractor.Unit.Tests (4)
Microsoft.Gen.Metrics (1)
Microsoft.Gen.Metrics.Generated.Tests (2)
Microsoft.Gen.Metrics.Unit.Tests (4)
Microsoft.Gen.MetricsReports (4)
Microsoft.Gen.MetricsReports.Unit.Tests (4)
Microsoft.Interop.LibraryImportGenerator (1)
Microsoft.Maui (3)
Microsoft.Maui.Controls (98)
Microsoft.Maui.Controls.Build.Tasks (1)
Microsoft.Maui.Graphics (5)
Microsoft.ML.AutoML (8)
Microsoft.ML.AutoML.Tests (2)
Microsoft.ML.Core (14)
Microsoft.ML.Data (13)
Microsoft.ML.FastTree (2)
Microsoft.ML.GenAI.Core (1)
Microsoft.ML.IntegrationTests (16)
IntrospectiveTraining.cs (14)
52Assert.Equal(3, treeCollection.Trees.Count);
53Assert.Equal(3, treeCollection.TreeWeights.Count);
59Assert.Equal(tree.SplitGains.Count, tree.NumberOfNodes);
60Assert.Equal(tree.NumericalSplitThresholds.Count, tree.NumberOfNodes);
96Assert.Equal(3, treeCollection.Trees.Count);
97Assert.Equal(3, treeCollection.TreeWeights.Count);
103Assert.Equal(tree.SplitGains.Count, tree.NumberOfNodes);
104Assert.Equal(tree.NumericalSplitThresholds.Count, tree.NumberOfNodes);
160Assert.Equal(shapeFunctionBins.Count, shapeFunctionValues.Count);
161Common.AssertFiniteNumbers(shapeFunctionBins as IList<double>, shapeFunctionBins.Count - 1);
198Assert.Equal(numTopics, ldaDetails.ItemScoresPerTopic.Count);
200Assert.Equal(numTopics, ldaDetails.WordScoresPerTopic.Count);
245Assert.Equal(numFeatures, weights.Count);
Microsoft.ML.Maml (2)
Microsoft.ML.OnnxTransformer (1)
Microsoft.ML.PerformanceTests (1)
Microsoft.ML.Samples (4)
Microsoft.ML.StandardTrainers (2)
Microsoft.ML.Tests (14)
Microsoft.ML.TimeSeries (30)
Microsoft.ML.Tokenizers (24)
Microsoft.ML.Tokenizers.Tests (113)
CodeGenTests.cs (38)
691Assert.Equal(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
696Assert.Equal(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
701Assert.Equal(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
706Assert.Equal(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
715Assert.Equal(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
720Assert.Equal(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
725Assert.NotEqual(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
730Assert.NotEqual(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
735Assert.NotEqual(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
740Assert.NotEqual(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
743Assert.Equal(codeGenTokenizer.EndOfSentenceId.Value, ids[ids.Count - 1]);
745Assert.Equal(codeGenTokenizer.EndOfSentenceId.Value, ids[ids.Count - 1]);
747Assert.Equal(codeGenTokenizer.EndOfSentenceId.Value, ids[ids.Count - 1]);
749Assert.Equal(codeGenTokenizer.EndOfSentenceId.Value, ids[ids.Count - 1]);
751Assert.NotEqual(codeGenTokenizer.EndOfSentenceId.Value, ids[ids.Count - 1]);
753Assert.NotEqual(codeGenTokenizer.EndOfSentenceId.Value, ids[ids.Count - 1]);
755Assert.Equal(codeGenTokenizer.EndOfSentenceId.Value, ids[ids.Count - 1]);
757Assert.Equal(codeGenTokenizer.EndOfSentenceId.Value, ids[ids.Count - 1]);
827Assert.Equal(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
833Assert.Equal(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
839Assert.Equal(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
845Assert.Equal(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
857Assert.Equal(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
863Assert.Equal(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
869Assert.NotEqual(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
875Assert.NotEqual(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
881Assert.NotEqual(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
887Assert.NotEqual(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
891Assert.Equal(codeGenTokenizer.EndOfSentenceId.Value, ids[ids.Count - 1]);
894Assert.Equal(codeGenTokenizer.EndOfSentenceId.Value, ids[ids.Count - 1]);
897Assert.Equal(codeGenTokenizer.EndOfSentenceId.Value, ids[ids.Count - 1]);
900Assert.Equal(codeGenTokenizer.EndOfSentenceId.Value, ids[ids.Count - 1]);
903Assert.NotEqual(codeGenTokenizer.EndOfSentenceId.Value, ids[ids.Count - 1]);
906Assert.NotEqual(codeGenTokenizer.EndOfSentenceId.Value, ids[ids.Count - 1]);
909Assert.Equal(codeGenTokenizer.EndOfSentenceId.Value, ids[ids.Count - 1]);
912Assert.Equal(codeGenTokenizer.EndOfSentenceId.Value, ids[ids.Count - 1]);
998Assert.Equal(expectedTokenCount, ids.Count);
1003Assert.Equal(expectedTokenCount, ids.Count);
TiktokenTests.cs (20)
125Assert.Equal(externalEncoder.Count, encoder.Count);
155Assert.Equal(encoded.Count, idsCount);
209Assert.Equal(encoded.Count, idsCount);
217Assert.Equal(5584, encoded.Count);
219Assert.Equal(encoded.Count, idsCount);
249Assert.Equal(encoded.Count, idsCount);
279Assert.Equal(encoded.Count, idsCount);
291Assert.Equal(5609, encoded.Count);
292Assert.Equal(encoded.Count, idsCount);
314Assert.Equal(encoded.Count, idsCount);
327Assert.Equal(11378, encoded.Count);
328Assert.Equal(encoded.Count, idsCount);
346Assert.Equal(7230, encoded.Count);
347Assert.Equal(encoded.Count, idsCount);
365Assert.Equal(7230, encoded.Count);
366Assert.Equal(encoded.Count, idsCount);
384Assert.Equal(11378, encoded.Count);
385Assert.Equal(encoded.Count, idsCount);
531int entriesCount = GetEncoder((tokenizer as TiktokenTokenizer)!)!.Count;
Microsoft.ML.TorchSharp (10)
Microsoft.ML.Transforms (17)
Microsoft.VisualStudio.LanguageServices (10)
MinimalSample (1)
PresentationBuildTasks (1)
PresentationCore (1)
PresentationFramework (25)
Roslyn.Diagnostics.Analyzers (34)
Roslyn.Test.PdbUtilities (1)
Roslyn.VisualStudio.Next.UnitTests (7)
Sample (2)
SemanticSearch.BuildTask (1)
Shared (6)
Shared.Tests (1)
Swaggatherer (4)
System.Collections.Concurrent (1)
System.Collections.Immutable (20)
System\Collections\Immutable\ImmutableList.cs (10)
149return list.IndexOf(item, 0, list.Count, EqualityComparer<T>.Default);
170return list.IndexOf(item, 0, list.Count, equalityComparer);
195return list.IndexOf(item, startIndex, list.Count - startIndex, EqualityComparer<T>.Default);
243if (list.Count == 0)
249return list.LastIndexOf(item, list.Count - 1, list.Count, EqualityComparer<T>.Default);
270if (list.Count == 0)
276return list.LastIndexOf(item, list.Count - 1, list.Count, equalityComparer);
301if (list.Count == 0 && startIndex == 0)
System.Formats.Nrbf (3)
System.Linq.Expressions (41)
System.Private.CoreLib (6)
System.Private.Windows.Core (17)
System.Reflection.Metadata (8)
System.Windows.Forms (17)
System.Windows.Forms.Design (3)
System.Xaml (2)
Templates.Blazor.WebAssembly.Auth.Tests (1)
Templates.Blazor.WebAssembly.Tests (1)
Templates.Mvc.Tests (1)
Templates.Tests (1)
Test.Utilities (25)
Text.Analyzers (33)
xunit.assert (1)
xunit.console (1)