54 types derived from List
dotnet-svcutil-lib (1)
GenerateDocumentationAndConfigFiles (1)
IIS.Common.TestLib (1)
illink (1)
Metrics (1)
Metrics.Legacy (1)
Microsoft.AspNetCore.Http (1)
Microsoft.AspNetCore.Mvc.Abstractions.Test (1)
Microsoft.AspNetCore.Mvc.Core (1)
Microsoft.AspNetCore.Mvc.Core.Test (7)
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (2)
Microsoft.AspNetCore.Mvc.IntegrationTests (1)
Microsoft.AspNetCore.Routing (1)
Microsoft.AspNetCore.Shared.Tests (1)
Microsoft.CodeAnalysis.Analyzers (1)
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
Microsoft.CodeAnalysis.CodeStyle (1)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (1)
Microsoft.CodeAnalysis.PublicApiAnalyzers (1)
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
Microsoft.CodeAnalysis.Workspaces (1)
Microsoft.DotNet.Helix.Client (1)
Microsoft.DotNet.SignCheckLibrary (1)
Microsoft.Maui (1)
Microsoft.Maui.Controls (2)
Microsoft.ML.CodeGenerator (2)
Microsoft.ML.Data (1)
PresentationCore (1)
PresentationFramework (1)
Roslyn.Diagnostics.Analyzers (1)
System.Private.Xml (2)
System.Windows.Forms (1)
System.Windows.Forms.Tests (6)
System.Xaml (1)
System.Xaml.Tests (2)
Test.Utilities (1)
Text.Analyzers (1)
12837 instantiations of List
AnalyzerRunner (3)
ApiExplorerWebSite (5)
aspire (126)
Aspire.Azure.AI.Inference (1)
Aspire.Azure.Messaging.EventHubs (1)
Aspire.Azure.Messaging.EventHubs.Tests (3)
Aspire.Azure.Messaging.ServiceBus (1)
Aspire.Azure.Messaging.WebPubSub (1)
Aspire.Azure.Security.KeyVault.Tests (3)
Aspire.Azure.Storage.Queues (1)
Aspire.Cli.EndToEnd.Tests (1)
Aspire.Cli.Tests (90)
Projects\ProjectUpdaterTests.cs (28)
54var packages = new List<NuGetPackageCli>();
156var packagesAddsExecuted = new List<(FileInfo ProjectFile, string PackageId, string PackageVersion, string? PackageSource, bool NoRestore)>();
165var packages = new List<NuGetPackageCli>();
287var packagesAddsExecuted = new List<(FileInfo ProjectFile, string PackageId, string PackageVersion, string? PackageSource, bool NoRestore)>();
296var packages = new List<NuGetPackageCli>();
440var packagesAddsExecuted = new List<(FileInfo ProjectFile, string PackageId, string PackageVersion, string? PackageSource, bool NoRestore)>();
449var packages = new List<NuGetPackageCli>();
599var updatedFiles = new List<string>();
609var packages = new List<NuGetPackageCli>();
728var packages = new List<NuGetPackageCli>();
830var packages = new List<NuGetPackageCli>();
964var packages = new List<NuGetPackageCli>();
1080var packages = new List<NuGetPackageCli>();
1201var packages = new List<NuGetPackageCli>();
1314var packages = new List<NuGetPackageCli>();
1410var packages = new List<NuGetPackageCli>();
1519var packages = new List<NuGetPackageCli>();
1604var packages = new List<NuGetPackageCli>();
1680var packages = new List<NuGetPackageCli>();
1764var packages = new List<NuGetPackageCli>();
1847var packages = new List<NuGetPackageCli>();
1927var packages = new List<NuGetPackageCli>();
2017var packages = new List<NuGetPackageCli>();
2096var packages = new List<NuGetPackageCli>();
2164var packagesUpdated = new List<string>();
2174var packages = new List<NuGetPackageCli>();
2292var packagesAddsExecuted = new List<(FileInfo ProjectFile, string PackageId, string PackageVersion, string? PackageSource, bool NoRestore)>();
2302var packages = new List<NuGetPackageCli>();
Aspire.Components.Common.TestUtilities (3)
Aspire.Confluent.Kafka.Tests (2)
Aspire.Dashboard (137)
Aspire.Dashboard.Components.Tests (29)
Aspire.Dashboard.Tests (77)
Model\AIAssistant\AIHelpersTests.cs (9)
17var items = new List<int> { 1, 2, 3, 4, 5 };
31var items = new List<int> { 1, 2, 3, 4, 5 };
45var items = new List<int> { 1, 2, 3, 4, 5 };
59var items = new List<string> { "one", "two", "three" };
73var items = new List<string> { "one", "two", "three" };
101var values = new List<string>();
119var values = new List<string>();
137var values = new List<string>();
162var values = new List<string>();
TelemetryRepositoryTests\MetricsTests.cs (5)
109var metricAttributes = new List<KeyValuePair<string, string>>();
110var meterAttributes = new List<KeyValuePair<string, string>>();
223var metricAttributes = new List<KeyValuePair<string, string>>();
224var meterAttributes = new List<KeyValuePair<string, string>>
342CreateSumMetric(metricName: "test", startTime: s_testTime.AddMinutes(1), exemplars: new List<Exemplar> { CreateExemplar(startTime: s_testTime.AddMinutes(1), value: 2, attributes: [KeyValuePair.Create("key1", "value1")]) }),
TelemetryRepositoryTests\TraceTests.cs (6)
535CreateSpan(traceId: "1", spanId: "1-1", startTime: s_testTime.AddMinutes(1), endTime: s_testTime.AddMinutes(10), events: new List<Span.Types.Event>
612CreateSpan(traceId: "1", spanId: "1-1", startTime: s_testTime.AddMinutes(1), endTime: s_testTime.AddMinutes(10), links: new List<Span.Types.Link>
768var attributes = new List<KeyValuePair<string, string>>();
775var events = new List<Span.Types.Event>();
995CreateSpan(traceId: traceId, spanId: $"{traceId}-2", startTime: startTime.AddMinutes(5), endTime: startTime.AddMinutes(1), parentSpanId: $"{traceId}-1", links: new List<Span.Types.Link>
999CreateSpan(traceId: traceId, spanId: $"{traceId}-1", startTime: startTime.AddMinutes(1), endTime: startTime.AddMinutes(10), links: new List<Span.Types.Link>
Aspire.EndToEnd.Tests (2)
Aspire.Hosting (103)
Aspire.Hosting.Analyzers (1)
Aspire.Hosting.Azure (13)
Aspire.Hosting.Azure.AppContainers (2)
Aspire.Hosting.Azure.AppService (4)
Aspire.Hosting.Azure.CosmosDB (1)
Aspire.Hosting.Azure.Functions (2)
Aspire.Hosting.Azure.Kusto.Tests (1)
Aspire.Hosting.Azure.Network (1)
Aspire.Hosting.Azure.Sql (2)
Aspire.Hosting.Azure.Tests (14)
Aspire.Hosting.Azure.WebPubSub (1)
Aspire.Hosting.CodeGeneration.Go (3)
Aspire.Hosting.CodeGeneration.Java (2)
Aspire.Hosting.CodeGeneration.Python (2)
Aspire.Hosting.CodeGeneration.Rust (2)
Aspire.Hosting.CodeGeneration.TypeScript (21)
Aspire.Hosting.CodeGeneration.TypeScript.Tests (1)
Aspire.Hosting.DevTunnels (1)
Aspire.Hosting.Docker (6)
Aspire.Hosting.Foundry (1)
Aspire.Hosting.Garnet (1)
Aspire.Hosting.Integration.Analyzers (2)
Aspire.Hosting.JavaScript (2)
Aspire.Hosting.JavaScript.Tests (12)
AddViteAppTests.cs (8)
247var args = new List<object>();
272var args = new List<object>();
308var args = new List<object> { "run", "dev", "--", "--port", "3000", "--config", "vite.config.js" };
368var args = new List<object> { "run", "dev", "--", "--port", "3000" };
419var args = new List<object> { "run", "dev", "--", "--port", "3000" };
472var args = new List<object> { "run", "dev", "--", "--port", "3000" };
531var args = new List<object> { "run", "dev", "--", "--port", "3000" };
606var args = new List<object> { "run", "dev", "--", "--port", "3000" };
Aspire.Hosting.Maui (6)
Aspire.Hosting.Maui.Tests (1)
Aspire.Hosting.Nats (1)
Aspire.Hosting.Nats.Tests (1)
Aspire.Hosting.PostgreSQL (1)
Aspire.Hosting.Redis (2)
Aspire.Hosting.RemoteHost (5)
Aspire.Hosting.RemoteHost.Tests (2)
Aspire.Hosting.Testing.Tests (3)
Aspire.Hosting.Tests (82)
Aspire.Hosting.Valkey (1)
Aspire.Hosting.Yarp (4)
Aspire.Hosting.Yarp.Tests (10)
Aspire.Microsoft.Azure.Cosmos (1)
Aspire.Microsoft.EntityFrameworkCore.Cosmos (1)
Aspire.Oracle.EntityFrameworkCore.Tests (1)
Aspire.Playground.Tests (1)
Aspire.RuntimeIdentifier.Tool (1)
Aspire.StackExchange.Redis (1)
Aspire.Templates.Tests (3)
Aspire.TestUtilities (1)
aspire-managed (7)
AzureAppService.ApiService (1)
AzureContainerApps.ApiService (1)
AzureStorageEndToEnd.ApiService (1)
AzureVirtualNetworkEndToEnd.ApiService (1)
BasicWebSite (3)
BasketService (3)
BicepSample.ApiService (6)
BinaryFormatTests (22)
BuildActionTelemetryTable (1)
BuildBoss (4)
BuildValidator (5)
CatalogDb (1)
CatalogModel (1)
CdkSample.ApiService (2)
ClaimsTransformation (1)
Client.ClientBase.IntegrationTests (13)
ClientSample (8)
CodeGenerator (1)
ConfigurationSchemaGenerator (13)
Cookies (1)
CookieSessionSample (1)
CosmosEndToEnd.ApiService (1)
Crossgen2Tasks (7)
csc (3)
CSharpErrorFactsGenerator (4)
CSharpSyntaxGenerator (7)
CustomCheck (2)
CustomCheck2 (1)
CustomPolicyProvider (1)
DemoConsole (2)
Diagnostics.EFCore.FunctionalTests (8)
dotnet-dev-certs (18)
dotnet-getdocument (8)
dotnet-openapi (7)
dotnet-razorpagegenerator (1)
dotnet-sql-cache (7)
dotnet-svcutil (1)
dotnet-svcutil.xmlserializer (11)
dotnet-svcutil-lib (255)
dotnet-svcutil-lib.Tests (5)
dotnet-user-jwts (15)
dotnet-user-secrets (7)
ErrorCustomCheck (3)
FormatterWebSite (4)
GenerateAnalyzerNuspec (2)
GenerateDocumentationAndConfigFiles (41)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
86var result = new List<ITypeSymbol>
GetDocument.Insider (8)
HeaderPropagationSample (1)
http2cat (2)
IdeBenchmarks (1)
IdeCoreBenchmarks (5)
IdentitySample.PasskeyConformance (6)
IdentitySample.PasskeyUI (6)
IIS.Common.TestLib (1)
IIS.FunctionalTests (17)
IIS.LongTests (6)
IIS.NewHandler.FunctionalTests (6)
IIS.ShadowCopy.Tests (4)
IIS.Tests (1)
IISExpress.FunctionalTests (18)
illink (77)
ILLink.CodeFixProvider (2)
ILLink.RoslynAnalyzer (6)
Infrastructure.Common (7)
Infrastructure.Tests (9)
InMemory.FunctionalTests (43)
HttpsConnectionMiddlewareTests.cs (6)
806var streams = new List<SslStream>();
941ApplicationProtocols = new() { SslApplicationProtocol.Http2, SslApplicationProtocol.Http11, },
974ApplicationProtocols = new() { SslApplicationProtocol.Http2, SslApplicationProtocol.Http11, },
992ApplicationProtocols = new(),
1007ApplicationProtocols = new() { SslApplicationProtocol.Http2, SslApplicationProtocol.Http11, },
1400ApplicationProtocols = new List<SslApplicationProtocol> { SslApplicationProtocol.Http11, SslApplicationProtocol.Http2 },
InProcessWebSite (1)
IntegrationTestsWebsite (1)
InteractiveHost.UnitTests (1)
Interop.FunctionalTests (19)
InteropClient (4)
IOperationGenerator (3)
JwtBearerSample (1)
KeyManagementSimulator (1)
LocalizationWebsite (11)
Metrics (32)
Metrics.Legacy (32)
Microsoft.Analyzers.Extra (8)
Microsoft.Analyzers.Extra.Tests (7)
Microsoft.Analyzers.Local (2)
Microsoft.Analyzers.Local.Tests (10)
Microsoft.Arcade.Test.Common (10)
Microsoft.AspNetCore (5)
Microsoft.AspNetCore.Analyzer.Testing (3)
Microsoft.AspNetCore.Analyzers (2)
Microsoft.AspNetCore.Antiforgery (2)
Microsoft.AspNetCore.Antiforgery.Test (3)
Microsoft.AspNetCore.App.Analyzers (4)
Microsoft.AspNetCore.App.Analyzers.Test (3)
Microsoft.AspNetCore.App.UnitTests (2)
Microsoft.AspNetCore.Authentication.Abstractions (3)
Microsoft.AspNetCore.Authentication.Certificate (2)
Microsoft.AspNetCore.Authentication.Cookies (4)
Microsoft.AspNetCore.Authentication.Core (1)
Microsoft.AspNetCore.Authentication.Core.Test (8)
Microsoft.AspNetCore.Authentication.JwtBearer (6)
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (5)
Microsoft.AspNetCore.Authentication.Negotiate (1)
Microsoft.AspNetCore.Authentication.OAuth (2)
Microsoft.AspNetCore.Authentication.OpenIdConnect (1)
Microsoft.AspNetCore.Authentication.Test (12)
Microsoft.AspNetCore.Authentication.Twitter (1)
Microsoft.AspNetCore.Authentication.WsFederation (3)
Microsoft.AspNetCore.Authorization (5)
Microsoft.AspNetCore.Authorization.Test (3)
Microsoft.AspNetCore.BrowserTesting (6)
Microsoft.AspNetCore.Components (35)
Microsoft.AspNetCore.Components.Analyzers (2)
Microsoft.AspNetCore.Components.Analyzers.Tests (2)
Microsoft.AspNetCore.Components.Authorization (1)
Microsoft.AspNetCore.Components.Authorization.Tests (6)
Microsoft.AspNetCore.Components.Endpoints (30)
Microsoft.AspNetCore.Components.Endpoints.Tests (68)
Binding\FormDataMapperTests.cs (34)
100var errors = new List<FormDataMappingError>();
138var errors = new List<FormDataMappingError>();
379var errors = new List<FormDataMappingError>();
404var errors = new List<FormDataMappingError>();
459var rented = new List<int[]>();
460var returned = new List<int[]>();
505var rented = new List<int[]>();
506var returned = new List<int[]>();
575var errors = new List<FormDataMappingError>();
608var expected = new List<int> { 0, 11, 12, 13, 0, 15, 16, 17, 18, 19 };
624var errors = new List<FormDataMappingError>();
665var expected = new List<int> { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 };
673var expected = new List<int> { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 };
689var expected = new List<int> { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 };
697var expected = new List<int> { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 };
705var expected = new List<int> { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 };
737var expected = new ReadOnlyCollection<int>(new List<int> { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 });
753var expected = new List<int> { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 };
1072var errors = new List<FormDataMappingError>();
1133var errors = new List<FormDataMappingError>();
1192var errors = new List<FormDataMappingError>();
1432var errors = new List<FormDataMappingError>();
1482Children = new List<RecursiveTree>() { expected }
1599var errors = new List<FormDataMappingError>();
1793var errors = new List<FormDataMappingError>();
1854var errors = new List<FormDataMappingError>();
1877var errors = new List<FormDataMappingError>();
1908var errors = new List<FormDataMappingError>();
1936var errors = new List<FormDataMappingError>();
1969var errors = new List<FormDataMappingError>();
1991var errors = new List<FormDataMappingError>();
2014var errors = new List<FormDataMappingError>();
2047var errors = new List<FormDataMappingError>();
2418private readonly List<T> _inner = new();
Microsoft.AspNetCore.Components.Forms (3)
Microsoft.AspNetCore.Components.Forms.Tests (5)
Microsoft.AspNetCore.Components.QuickGrid (6)
Microsoft.AspNetCore.Components.QuickGrid.Tests (4)
Microsoft.AspNetCore.Components.SdkAnalyzers (2)
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (2)
Microsoft.AspNetCore.Components.Server (12)
Microsoft.AspNetCore.Components.Server.Tests (21)
Microsoft.AspNetCore.Components.Tests (54)
Microsoft.AspNetCore.Components.Web (4)
Microsoft.AspNetCore.Components.Web.Tests (9)
Microsoft.AspNetCore.Components.WebAssembly (9)
Microsoft.AspNetCore.Components.WebView (2)
Microsoft.AspNetCore.Components.WebView.Test (4)
Microsoft.AspNetCore.Connections.Abstractions (2)
Microsoft.AspNetCore.CookiePolicy (1)
Microsoft.AspNetCore.CookiePolicy.Test (4)
Microsoft.AspNetCore.Cors (7)
Microsoft.AspNetCore.Cors.Test (9)
CorsPolicyBuilderTests.cs (8)
123Assert.Equal(new List<string>() { "http://example.com", "http://example2.com" }, corsPolicy.Origins);
134Assert.Equal(new List<string>() { "http://www.example.com", "https://example2.com" }, corsPolicy.Origins);
171Assert.Equal(new List<string>() { "*" }, corsPolicy.Origins);
229Assert.Equal(new List<string>() { "PUT", "GET" }, corsPolicy.Methods);
244Assert.Equal(new List<string>() { "*" }, corsPolicy.Methods);
259Assert.Equal(new List<string>() { "example1", "example2" }, corsPolicy.Headers);
274Assert.Equal(new List<string>() { "*" }, corsPolicy.Headers);
288Assert.Equal(new List<string>() { "exposed1", "exposed2" }, corsPolicy.ExposedHeaders);
Microsoft.AspNetCore.DataProtection (9)
Microsoft.AspNetCore.DataProtection.Tests (15)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (8)
Microsoft.AspNetCore.Diagnostics (9)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (3)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (34)
Latency\RequestLatencyTelemetryMiddlewareTests.cs (5)
33Options.Create(new RequestLatencyTelemetryOptions()), new List<ILatencyDataExporter> { ex1, ex2 },
64new List<ILatencyDataExporter> { ex1, ex2 });
92Options.Create(new RequestLatencyTelemetryOptions()), new List<ILatencyDataExporter> { ex1, ex2 },
122new List<ILatencyDataExporter> { ex1, ex2 },
173new List<ILatencyDataExporter> { ex1 },
Microsoft.AspNetCore.Diagnostics.Tests (22)
Microsoft.AspNetCore.Grpc.JsonTranscoding (14)
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (11)
Microsoft.AspNetCore.Grpc.Swagger (10)
Microsoft.AspNetCore.Grpc.Swagger.Tests (1)
Microsoft.AspNetCore.HeaderParsing (1)
Microsoft.AspNetCore.HeaderParsing.Tests (4)
Microsoft.AspNetCore.HostFiltering (2)
Microsoft.AspNetCore.HostFiltering.Tests (2)
Microsoft.AspNetCore.Hosting (9)
Microsoft.AspNetCore.Hosting.Tests (11)
Microsoft.AspNetCore.Html.Abstractions (2)
Microsoft.AspNetCore.Html.Abstractions.Tests (1)
Microsoft.AspNetCore.Http (8)
Microsoft.AspNetCore.Http.Abstractions (8)
Microsoft.AspNetCore.Http.Abstractions.Tests (4)
Microsoft.AspNetCore.Http.Connections (10)
Microsoft.AspNetCore.Http.Connections.Client (1)
Microsoft.AspNetCore.Http.Connections.Common (2)
Microsoft.AspNetCore.Http.Connections.Tests (7)
Microsoft.AspNetCore.Http.Extensions (25)
Microsoft.AspNetCore.Http.Features (2)
Microsoft.AspNetCore.Http.Microbenchmarks (5)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (4)
Microsoft.AspNetCore.Http.Results.Tests (46)
ResultsTests.cs (12)
283public static IEnumerable<object[]> BytesOrFile_ResultHasCorrectValues_Data => new List<object[]>
331public static IEnumerable<object[]> Stream_ResultHasCorrectValues_Data => new List<object[]>
386Assert.Equal(authenticationSchemes ?? new ReadOnlyCollection<string>(new List<string>()), result.AuthenticationSchemes);
398Assert.Equal(authenticationSchemes ?? new ReadOnlyCollection<string>(new List<string>()), result.AuthenticationSchemes);
448Assert.Equal(authenticationSchemes ?? new ReadOnlyCollection<string>(new List<string>()), result.AuthenticationSchemes);
467public static IEnumerable<object[]> ChallengeForbidSignInOut_ResultHasCorrectValues_Data => new List<object[]>
469new object[] { new AuthenticationProperties(), new List<string> { "TestScheme" } },
471new object[] { default(AuthenticationProperties), new List<string> { "TestScheme" } },
1280var extensions = new List<KeyValuePair<string, object>> { new("test", "value") };
1430var errors = new List<KeyValuePair<string, string[]>> { new("testField", new[] { "test error" }) };
1436var extensions = new List<KeyValuePair<string, object>> { new("testField", "test value") };
1728private static IEnumerable<(Expression<Func<IResult>>, Type)> FactoryMethodsTuples { get; } = new List<(Expression<Func<IResult>>, Type)>
TypedResultsTests.cs (12)
261public static IEnumerable<object[]> BytesOrFile_ResultHasCorrectValues_Data => new List<object[]>
307public static IEnumerable<object[]> PhysicalOrVirtualFile_ResultHasCorrectValues_Data => new List<object[]>
415public static IEnumerable<object[]> Stream_ResultHasCorrectValues_Data => new List<object[]>
434Assert.Equal(authenticationSchemes ?? new ReadOnlyCollection<string>(new List<string>()), result.AuthenticationSchemes);
446Assert.Equal(authenticationSchemes ?? new ReadOnlyCollection<string>(new List<string>()), result.AuthenticationSchemes);
458Assert.Equal(authenticationSchemes ?? new ReadOnlyCollection<string>(new List<string>()), result.AuthenticationSchemes);
477public static IEnumerable<object[]> ChallengeForbidSignInOut_ResultHasCorrectValues_Data => new List<object[]>
479new object[] { new AuthenticationProperties(), new List<string> { "TestScheme" } },
481new object[] { default(AuthenticationProperties), new List<string> { "TestScheme" } },
1096var extensions = new List<KeyValuePair<string, object>> { new("test", "value") };
1217var errors = new List<KeyValuePair<string, string[]>> { new("testField", new[] { "test error" }) };
1222var extensions = new List<KeyValuePair<string, object>> { new("testField", "test value") };
Microsoft.AspNetCore.Http.Tests (9)
Microsoft.AspNetCore.HttpLogging (6)
Microsoft.AspNetCore.HttpLogging.Tests (2)
Microsoft.AspNetCore.HttpOverrides (5)
Microsoft.AspNetCore.HttpsPolicy (1)
Microsoft.AspNetCore.Identity (3)
Microsoft.AspNetCore.Identity.EntityFrameworkCore (1)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (10)
Microsoft.AspNetCore.Identity.FunctionalTests (5)
Microsoft.AspNetCore.Identity.InMemory.Test (13)
Microsoft.AspNetCore.Identity.Specification.Tests (4)
Microsoft.AspNetCore.Identity.Test (22)
Microsoft.AspNetCore.Identity.UI (1)
Microsoft.AspNetCore.InternalTesting (3)
Microsoft.AspNetCore.JsonPatch (7)
Microsoft.AspNetCore.JsonPatch.SystemTextJson (4)
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (79)
IntegrationTests\ListIntegrationTest.cs (26)
21IntegerList = new List<int>() { 1, 2, 3 }
40IntegerList = new List<int>() { 1, 2, 3 }
61IntegerIList = new List<int>() { 1, 2, 3 }
72Assert.Equal(new List<int>() { 4, 1, 2, 3 }, targetObject.SimpleObject.IntegerIList);
81SimpleObjectList = new List<SimpleObject>()
112IntegerList = new List<int>() { 1, 2, 3 }
123Assert.Equal(new List<int>() { 1, 2, 3, 4 }, targetObject.SimpleObject.IntegerList);
132IntegerList = new List<int>() { 1, 2, 3 }
142Assert.Equal(new List<int>() { 1, 2 }, targetObject.IntegerList);
153IntegerList = new List<int>() { 1, 2, 3 }
177IntegerList = new List<int>() { 1, 2, 3 }
188Assert.Equal(new List<int>() { 1, 2 }, targetObject.SimpleObject.IntegerList);
197IntegerList = new List<int>() { 1, 2, 3 }
207Assert.Equal(new List<int>() { 4, 5, 6 }, targetObject.IntegerList);
218IntegerList = new List<int>() { 1, 2, 3 }
229Assert.Equal(new List<int>() { 1, 2, 5 }, targetObject.SimpleObject.IntegerList);
240IntegerList = new List<int>() { 1, 2, 3 }
260IntegerList = new List<int>() { 1, 2, 3 }
270Assert.Equal(new List<int>() { 1, 2, 3, 1 }, targetObject.IntegerList);
279IntegerList = new List<int>() { 1, 2, 3 }
299IntegerList = new List<int>() { 1, 2, 3 }
310Assert.Equal(new List<int>() { 1, 2, 3, 5 }, targetObject.IntegerList);
322SimpleObjectList = new List<SimpleObject>() {
336Assert.Equal(new List<SimpleObject>() { simpleObject2, simpleObject1, simpleObject3 }, targetObject.SimpleObjectList);
351IntegerList = new List<int>() { 1, 2, 3 }
362Assert.Equal(new List<int>() { 2, 3 }, targetObject.SimpleObject.IntegerList);
Internal\ListAdapterTest.cs (45)
54var targetObject = new List<string>() { "James", "Mike" };
65Assert.Equal(new List<string>() { "James", "Mike", "Rob" }, targetObject);
76var targetObject = new List<string>() { "James", "Mike" };
94var targetObject = new List<string>() { "James", "Mike" };
112new List<int>() { },
113new List<int>() { 20 }
116new List<int>() { 5, 10 },
117new List<int>() { 5, 10, 20 }
147var targetObject = new List<string>() { "James", "Mike" };
156Assert.Equal(new List<string>() { "James", "Mike", null }, targetObject);
166var targetObject = new List<SimpleObject>() { sDto };
176Assert.Equal(new List<SimpleObject>() { sDto, iDto }, targetObject);
184var targetObject = new List<int>() { 10, 20 };
202new List<string>() { },
205new List<string>() { "a" }
208new List<string>() { "a", "b" },
211new List<string>() { "a", "b", "c" }
214new List<string>() { "a", "b" },
217new List<string>() { "c", "a", "b" }
220new List<string>() { "a", "b" },
223new List<string>() { "a", "c", "b" }
257new List<SimpleObject>() { },
260new List<SimpleObject>() { sDto1 }
263new List<SimpleObject>() { sDto1, sDto2 },
266new List<SimpleObject>() { sDto1, sDto2, sDto3 }
269new List<SimpleObject>() { sDto1, sDto2 },
272new List<SimpleObject>() { sDto3, sDto1, sDto2 }
275new List<SimpleObject>() { sDto1, sDto2 },
278new List<SimpleObject>() { sDto1, sDto3, sDto2 }
310var targetObject = new List<int>(input);
329var targetObject = new List<int>(input);
338Assert.Equal(new List<int>(input), targetObject);
349var targetObject = new List<int>(input);
368var targetObject = new List<int>(input);
376Assert.Equal(new List<int>(expected), targetObject);
384var targetObject = new List<int>() { 10, 20 };
400var targetObject = new List<int>() { 10, 20 };
409Assert.Equal(new List<int>() { 10, 30 }, targetObject);
420new List<int>() { 30, 20 }
424new List<int>() { 10, 30 }
436var targetObject = new List<int>() { 10, 20 };
455var targetObject = new List<int>() { 10, 20 };
471var targetObject = new List<int>() { 10, 20 };
508var targetObject = new List<int>(input);
549var targetObject = new List<string> { "a", "b", "c" };
Microsoft.AspNetCore.JsonPatch.Tests (81)
IntegrationTests\ListIntegrationTest.cs (26)
21IntegerList = new List<int>() { 1, 2, 3 }
40IntegerList = new List<int>() { 1, 2, 3 }
61IntegerIList = new List<int>() { 1, 2, 3 }
72Assert.Equal(new List<int>() { 4, 1, 2, 3 }, targetObject.SimpleObject.IntegerIList);
81SimpleObjectList = new List<SimpleObject>()
112IntegerList = new List<int>() { 1, 2, 3 }
123Assert.Equal(new List<int>() { 1, 2, 3, 4 }, targetObject.SimpleObject.IntegerList);
132IntegerList = new List<int>() { 1, 2, 3 }
142Assert.Equal(new List<int>() { 1, 2 }, targetObject.IntegerList);
153IntegerList = new List<int>() { 1, 2, 3 }
177IntegerList = new List<int>() { 1, 2, 3 }
188Assert.Equal(new List<int>() { 1, 2 }, targetObject.SimpleObject.IntegerList);
197IntegerList = new List<int>() { 1, 2, 3 }
207Assert.Equal(new List<int>() { 4, 5, 6 }, targetObject.IntegerList);
218IntegerList = new List<int>() { 1, 2, 3 }
229Assert.Equal(new List<int>() { 1, 2, 5 }, targetObject.SimpleObject.IntegerList);
240IntegerList = new List<int>() { 1, 2, 3 }
260IntegerList = new List<int>() { 1, 2, 3 }
270Assert.Equal(new List<int>() { 1, 2, 3, 1 }, targetObject.IntegerList);
279IntegerList = new List<int>() { 1, 2, 3 }
299IntegerList = new List<int>() { 1, 2, 3 }
310Assert.Equal(new List<int>() { 1, 2, 3, 5 }, targetObject.IntegerList);
322SimpleObjectList = new List<SimpleObject>() {
336Assert.Equal(new List<SimpleObject>() { simpleObject2, simpleObject1, simpleObject3 }, targetObject.SimpleObjectList);
351IntegerList = new List<int>() { 1, 2, 3 }
362Assert.Equal(new List<int>() { 2, 3 }, targetObject.SimpleObject.IntegerList);
Internal\ListAdapterTest.cs (44)
53var targetObject = new List<string>() { "James", "Mike" };
64Assert.Equal(new List<string>() { "James", "Mike", "Rob" }, targetObject);
75var targetObject = new List<string>() { "James", "Mike" };
93var targetObject = new List<string>() { "James", "Mike" };
111new List<int>() { },
112new List<int>() { 20 }
115new List<int>() { 5, 10 },
116new List<int>() { 5, 10, 20 }
146var targetObject = new List<string>() { "James", "Mike" };
155Assert.Equal(new List<string>() { "James", "Mike", null }, targetObject);
165var targetObject = new List<SimpleObject>() { sDto };
175Assert.Equal(new List<SimpleObject>() { sDto, iDto }, targetObject);
183var targetObject = new List<int>() { 10, 20 };
201new List<string>() { },
204new List<string>() { "a" }
207new List<string>() { "a", "b" },
210new List<string>() { "a", "b", "c" }
213new List<string>() { "a", "b" },
216new List<string>() { "c", "a", "b" }
219new List<string>() { "a", "b" },
222new List<string>() { "a", "c", "b" }
256new List<SimpleObject>() { },
259new List<SimpleObject>() { sDto1 }
262new List<SimpleObject>() { sDto1, sDto2 },
265new List<SimpleObject>() { sDto1, sDto2, sDto3 }
268new List<SimpleObject>() { sDto1, sDto2 },
271new List<SimpleObject>() { sDto3, sDto1, sDto2 }
274new List<SimpleObject>() { sDto1, sDto2 },
277new List<SimpleObject>() { sDto1, sDto3, sDto2 }
309var targetObject = new List<int>(input);
328var targetObject = new List<int>(input);
337Assert.Equal(new List<int>(input), targetObject);
348var targetObject = new List<int>(input);
367var targetObject = new List<int>(input);
375Assert.Equal(new List<int>(expected), targetObject);
383var targetObject = new List<int>() { 10, 20 };
399var targetObject = new List<int>() { 10, 20 };
408Assert.Equal(new List<int>() { 10, 30 }, targetObject);
419new List<int>() { 30, 20 }
423new List<int>() { 10, 30 }
435var targetObject = new List<int>() { 10, 20 };
452var targetObject = new List<int>() { 10, 20 };
468var targetObject = new List<int>() { 10, 20 };
485var targetObject = new List<int>() { 10, 20 };
Microsoft.AspNetCore.Localization (9)
Microsoft.AspNetCore.Localization.Routing.Tests (4)
Microsoft.AspNetCore.Localization.Tests (31)
Microsoft.AspNetCore.MiddlewareAnalysis.Tests (3)
Microsoft.AspNetCore.Mvc.Abstractions (10)
Microsoft.AspNetCore.Mvc.Api.Analyzers (4)
Microsoft.AspNetCore.Mvc.ApiExplorer (10)
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (29)
Microsoft.AspNetCore.Mvc.Core (123)
Microsoft.AspNetCore.Mvc.Core.Test (299)
ConsumesAttributeTests.cs (28)
88new List<FilterDescriptor>() { new FilterDescriptor(constraint, FilterScope.Action) }
92context.Candidates = new List<ActionSelectorCandidate>()
112new List<FilterDescriptor>() { new FilterDescriptor(constraint1, FilterScope.Action) }
119new List<FilterDescriptor>() { new FilterDescriptor(constraint2.Object, FilterScope.Action) }
126context.Candidates = new List<ActionSelectorCandidate>()
150new List<FilterDescriptor>() { new FilterDescriptor(constraint1, FilterScope.Action) }
157new List<FilterDescriptor>() { new FilterDescriptor(constraint2.Object, FilterScope.Action) }
164context.Candidates = new List<ActionSelectorCandidate>()
187new List<FilterDescriptor>() { new FilterDescriptor(constraint1, FilterScope.Action) }
194new List<FilterDescriptor>() { new FilterDescriptor(constraint2, FilterScope.Action) }
200context.Candidates = new List<ActionSelectorCandidate>()
204new ActionSelectorCandidate(actionWithoutConstraint, new List<IActionConstraint>()),
228new List<FilterDescriptor>() { new FilterDescriptor(constraint1, FilterScope.Action) }
235new List<FilterDescriptor>() { new FilterDescriptor(constraint2, FilterScope.Action) }
239context.Candidates = new List<ActionSelectorCandidate>()
243new ActionSelectorCandidate(actionWithoutConstraint, new List<IActionConstraint>()),
266new List<FilterDescriptor>() { new FilterDescriptor(constraint1, FilterScope.Action) }
273new List<FilterDescriptor>() { new FilterDescriptor(constraint2, FilterScope.Action) }
279context.Candidates = new List<ActionSelectorCandidate>()
305ActionConstraints = new List<IActionConstraintMetadata>() { consumesFilter },
307new List<FilterDescriptor>() { new FilterDescriptor(consumesFilter, FilterScope.Action) }
314new List<IValueProviderFactory>());
335ActionConstraints = new List<IActionConstraintMetadata>() { consumesFilter },
337new List<FilterDescriptor>() { new FilterDescriptor(consumesFilter, FilterScope.Action) }
344new List<IValueProviderFactory>());
364ActionConstraints = new List<IActionConstraintMetadata>() { consumesFilter },
366new List<FilterDescriptor>() { new FilterDescriptor(consumesFilter, FilterScope.Action) }
372new List<IValueProviderFactory>());
Controllers\ControllerBinderDelegateProviderTest.cs (14)
649Assert.Equal(new List<string> { "goodbye" }, controller.CollectionProperty);
670var expected = new List<string> { "Hello", "World", "!!" };
921new List<string> { "goodbye" }
934new List<string> { "hello", "world" },
1001{ nameof(TestController.CollectionProperty), new List<string> { "hello", "world" } },
1003{ nameof(TestController.NullCollectionProperty), new List<string> { "hello", "world" } },
1057Assert.Equal(new List<string> { "hello", "world" }, controller.CollectionProperty);
1082new List<ParameterDescriptor>()
1099new List<ParameterDescriptor>()
1130BoundProperties = new List<ParameterDescriptor>(),
1207BoundProperties = new List<ParameterDescriptor>(),
1275BoundProperties = new List<ParameterDescriptor>(),
1276Parameters = new List<ParameterDescriptor>()
1369public ICollection<string> CollectionProperty { get; } = new List<string> { "goodbye" };
Infrastructure\ControllerActionInvokerTest.cs (27)
35FilterDescriptors = new List<FilterDescriptor>(),
36Parameters = new List<ParameterDescriptor>(),
37BoundProperties = new List<ParameterDescriptor>(),
76FilterDescriptors = new List<FilterDescriptor>(),
77Parameters = new List<ParameterDescriptor>(),
78BoundProperties = new List<ParameterDescriptor>(),
107FilterDescriptors = new List<FilterDescriptor>(),
108Parameters = new List<ParameterDescriptor>(),
109BoundProperties = new List<ParameterDescriptor>(),
150FilterDescriptors = new List<FilterDescriptor>(),
151Parameters = new List<ParameterDescriptor>(),
152BoundProperties = new List<ParameterDescriptor>(),
211var valueProviderFactories = new List<IValueProviderFactory>();
242var valueProviderFactories = new List<IValueProviderFactory>();
1386BoundProperties = new List<ParameterDescriptor>(),
1391Parameters = new List<ParameterDescriptor>
1400FilterDescriptors = new List<FilterDescriptor>()
1560FilterDescriptors = new List<FilterDescriptor>(),
1561Parameters = new List<ParameterDescriptor>(),
1562BoundProperties = new List<ParameterDescriptor>(),
1610FilterDescriptors = new List<FilterDescriptor>(),
1611Parameters = new List<ParameterDescriptor>(),
1612BoundProperties = new List<ParameterDescriptor>(),
1652FilterDescriptors = new List<FilterDescriptor>(),
1653Parameters = new List<ParameterDescriptor>(),
1654BoundProperties = new List<ParameterDescriptor>(),
1692valueProviderFactories = new List<IValueProviderFactory>();
ModelBinding\Metadata\DefaultModelMetadataTest.cs (20)
512new List<string> { "Property1", "Property2", "Property3", "Property4", },
513new List<string> { "Property1", "Property2", "Property3", "Property4", }
516new List<string> { "Property4", "Property3", "Property2", "Property1", },
517new List<string> { "Property4", "Property3", "Property2", "Property1", }
520new List<string> { "Delta", "Bravo", "Charlie", "Alpha", },
521new List<string> { "Delta", "Bravo", "Charlie", "Alpha", }
524new List<string> { "John", "Jonathan", "Jon", "Joan", },
525new List<string> { "John", "Jonathan", "Jon", "Joan", }
541var expectedProperties = new List<DefaultModelMetadata>();
580new List<KeyValuePair<string, int>>
587new List<string> { "Property1", "Property2", "Property3", "Property4", }
591new List<KeyValuePair<string, int>>
598new List<string> { "Property4", "Property3", "Property2", "Property1", }
602new List<KeyValuePair<string, int>>
609new List<string> { "Property4", "Property3", "Property2", "Property1", }
612new List<KeyValuePair<string, int>>
619new List<string> { "Charlie", "Bravo", "Delta", "Alpha", }
623new List<KeyValuePair<string, int>>
630new List<string> { "John", "Jonathan", "Jon", "Joan", }
646var expectedProperties = new List<DefaultModelMetadata>();
Microsoft.AspNetCore.Mvc.Core.TestCommon (7)
Microsoft.AspNetCore.Mvc.Cors.Test (8)
Microsoft.AspNetCore.Mvc.DataAnnotations (3)
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (16)
DataAnnotationsMetadataProviderTest.cs (14)
818var expectedKeyValuePairs = new List<KeyValuePair<EnumGroupAndName, string>>
867{ typeof(EmptyEnum), new List<KeyValuePair<EnumGroupAndName, string>>() },
868{ typeof(EmptyEnum?), new List<KeyValuePair<EnumGroupAndName, string>>() },
871new List<KeyValuePair<EnumGroupAndName, string>>
883new List<KeyValuePair<EnumGroupAndName, string>>
897new List<KeyValuePair<EnumGroupAndName, string>>
910new List<KeyValuePair<EnumGroupAndName, string>>
923new List<KeyValuePair<EnumGroupAndName, string>>
934new List<KeyValuePair<EnumGroupAndName, string>>
945new List<KeyValuePair<EnumGroupAndName, string>>
957new List<KeyValuePair<EnumGroupAndName, string>>
998var expectedKeyValuePairs = new List<KeyValuePair<EnumGroupAndName, string>>
1448attributes: new List<ValidationAttribute>
1463var expected = new List<object>
Microsoft.AspNetCore.Mvc.Formatters.Xml (4)
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (3)
Microsoft.AspNetCore.Mvc.FunctionalTests (40)
Microsoft.AspNetCore.Mvc.IntegrationTests (37)
Microsoft.AspNetCore.Mvc.Localization.Test (1)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (5)
Microsoft.AspNetCore.Mvc.Razor (11)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (7)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (3)
Microsoft.AspNetCore.Mvc.Razor.Test (2)
Microsoft.AspNetCore.Mvc.RazorPages (22)
Microsoft.AspNetCore.Mvc.RazorPages.Test (57)
ApplicationModels\CompiledPageActionDescriptorBuilderTest.cs (12)
22ActionConstraints = new List<IActionConstraintMetadata>(),
24EndpointMetadata = new List<object>(),
25FilterDescriptors = new List<FilterDescriptor>(),
51ActionConstraints = new List<IActionConstraintMetadata>(),
53FilterDescriptors = new List<FilterDescriptor>(),
102ActionConstraints = new List<IActionConstraintMetadata>(),
104FilterDescriptors = new List<FilterDescriptor>(),
144ActionConstraints = new List<IActionConstraintMetadata>(),
146FilterDescriptors = new List<FilterDescriptor>(),
405ActionConstraints = new List<IActionConstraintMetadata>(),
407EndpointMetadata = new List<object> { metadata3, metadata4, },
408FilterDescriptors = new List<FilterDescriptor>(),
Infrastructure\PageActionInvokerTest.cs (18)
97var valueProviderFactories = new List<IValueProviderFactory>
130var valueProviderFactories = new List<IValueProviderFactory>
1447HandlerMethods = new List<HandlerMethodDescriptor>(),
1451BoundProperties = new List<ParameterDescriptor>(),
1454var handlers = new List<PageHandlerExecutorDelegate>();
1461Parameters = new List<HandlerParameterDescriptor>(),
1470Parameters = new List<HandlerParameterDescriptor>(),
1509ValueProviderFactories = valueProviderFactories?.ToList() ?? new List<IValueProviderFactory>(),
1510ViewStartFactories = new List<Func<IRazorPage>>(),
1588BoundProperties = new List<ParameterDescriptor>(),
1596Parameters = new List<HandlerParameterDescriptor>(),
1602Parameters = new List<HandlerParameterDescriptor>(),
1616BoundProperties = new List<ParameterDescriptor>(),
1624Parameters = new List<HandlerParameterDescriptor>(),
1630Parameters = new List<HandlerParameterDescriptor>(),
1644BoundProperties = new List<ParameterDescriptor>(),
1652Parameters = new List<HandlerParameterDescriptor>(),
1658Parameters = new List<HandlerParameterDescriptor>(),
Microsoft.AspNetCore.Mvc.TagHelpers (5)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (25)
Microsoft.AspNetCore.Mvc.Test (24)
Microsoft.AspNetCore.Mvc.TestDiagnosticListener (1)
Microsoft.AspNetCore.Mvc.Testing (4)
Microsoft.AspNetCore.Mvc.ViewFeatures (29)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (90)
Buffers\ViewBufferTextWriterTest.cs (3)
65var expected = new List<object> { "False", newLine, "1.1", newLine, "3", newLine };
84var expected = new List<object> { "False", newLine, "1.1", newLine, "3", newLine };
162var pages = new List<ViewBufferPage>();
Microsoft.AspNetCore.Mvc.Views.TestCommon (2)
Microsoft.AspNetCore.OpenApi (8)
Microsoft.AspNetCore.OpenApi.SourceGenerators (6)
Microsoft.AspNetCore.OpenApi.Tests (12)
Transformers\SchemaTransformerTests.cs (6)
449builder.MapGet("/list", () => new List<int> { 1, 2, 3, 4 });
527builder.MapGet("/list-of-todo", () => new List<Todo> { new Todo(1, "Item1", false, DateTime.Now) });
528builder.MapGet("/list-of-int", () => new List<int> { 1, 2, 3, 4 });
563builder.MapGet("/list", () => new List<Shape> { new Triangle { Hypotenuse = 12, Color = "blue", Sides = 3 }, new Square { Area = 24, Color = "red ", Sides = 4 } });
647builder.MapGet("/list", () => new List<PolymorphicContainer>());
903var transformerOrder = new List<int>();
Microsoft.AspNetCore.OutputCaching (9)
Microsoft.AspNetCore.OutputCaching.Tests (8)
Microsoft.AspNetCore.Owin.Tests (3)
Microsoft.AspNetCore.RateLimiting (2)
Microsoft.AspNetCore.RateLimiting.Tests (5)
Microsoft.AspNetCore.Razor (4)
Microsoft.AspNetCore.Razor.Runtime (3)
Microsoft.AspNetCore.Razor.Runtime.Test (1)
Microsoft.AspNetCore.Razor.Test (5)
Microsoft.AspNetCore.ResponseCaching (1)
Microsoft.AspNetCore.ResponseCaching.Tests (12)
Microsoft.AspNetCore.Rewrite (10)
Microsoft.AspNetCore.Rewrite.Tests (20)
Microsoft.AspNetCore.Routing (83)
Microsoft.AspNetCore.Routing.Abstractions (5)
Microsoft.AspNetCore.Routing.FunctionalTests (12)
MinimalFormTests.cs (12)
55var nameValueCollection = new List<KeyValuePair<string, string>>
115var nameValueCollection = new List<KeyValuePair<string, string>>
161var nameValueCollection = new List<KeyValuePair<string, string>>
200var nameValueCollection = new List<KeyValuePair<string, string>>
277var nameValueCollection = new List<KeyValuePair<string, string>>
324var nameValueCollection = new List<KeyValuePair<string, string>>
420var nameValueCollection = new List<KeyValuePair<string, string>>
476var nameValueCollection = new List<KeyValuePair<string, string>>
535var nameValueCollection = new List<KeyValuePair<string, string>>
587var nameValueCollection = new List<KeyValuePair<string, string>>
639var nameValueCollection = new List<KeyValuePair<string, string>>
688var nameValueCollection = new List<KeyValuePair<string, string>>
Microsoft.AspNetCore.Routing.Microbenchmarks (12)
Microsoft.AspNetCore.Routing.Tests (125)
DefaultLinkGeneratorProcessTemplateTest.cs (4)
152values: new RouteValueDictionary(new { color = new List<string> { "red", "green", "blue" } }),
175values: new RouteValueDictionary(new { items = new List<int> { 10, 20, 30 } }),
198values: new RouteValueDictionary(new { color = new List<string> { } }),
221values: new RouteValueDictionary(new { page = 1, color = new List<string> { "red", "green", "blue" }, message = "textfortest" }),
RouteTest.cs (4)
686new { color = new List<string> { "red", "green", "blue" } },
704new { items = new List<int> { 10, 20, 30 } },
722new { color = new List<string> { } },
740new { page = 1, color = new List<string> { "red", "green", "blue" }, message = "textfortest" },
Template\TemplateParserTests.cs (18)
16var expected = new RouteTemplate(template, new List<TemplateSegment>());
33var expected = new RouteTemplate(template, new List<TemplateSegment>());
52var expected = new RouteTemplate(template, new List<TemplateSegment>());
71var expected = new RouteTemplate(template, new List<TemplateSegment>());
92var expected = new RouteTemplate(template, new List<TemplateSegment>());
131var expected = new RouteTemplate(template, new List<TemplateSegment>());
154var expected = new RouteTemplate(template, new List<TemplateSegment>());
177var expected = new RouteTemplate(template, new List<TemplateSegment>());
206var expected = new RouteTemplate(template, new List<TemplateSegment>());
230var expected = new RouteTemplate(template, new List<TemplateSegment>());
260var expected = new RouteTemplate(template, new List<TemplateSegment>());
290var expected = new RouteTemplate(template, new List<TemplateSegment>());
328var expected = new RouteTemplate(template, new List<TemplateSegment>());
366var expected = new RouteTemplate(template, new List<TemplateSegment>());
403var expected = new RouteTemplate(template, new List<TemplateSegment>());
440var expected = new RouteTemplate(template, new List<TemplateSegment>());
474var expected = new RouteTemplate(template, new List<TemplateSegment>());
482inlineConstraints: new List<InlineConstraint> { c }));
Microsoft.AspNetCore.Server.HttpSys (5)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (3)
Microsoft.AspNetCore.Server.HttpSys.Microbenchmarks (1)
Microsoft.AspNetCore.Server.IIS (7)
Microsoft.AspNetCore.Server.IntegrationTesting (7)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (4)
Microsoft.AspNetCore.Server.Kestrel.Core (41)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (55)
KestrelServerTests.cs (20)
323new List<IConnectionListenerFactory>(),
334new List<IConnectionListenerFactory>() { new ThrowingTransportFactory(), new MockTransportFactory() },
348new List<IConnectionListenerFactory> { new NonBindableTransportFactory() },
368new List<IConnectionListenerFactory> { transportFactory, new NonBindableTransportFactory() },
389new List<IConnectionListenerFactory>(),
390new List<IMultiplexedConnectionListenerFactory> { new NonBindableMultiplexedTransportFactory() });
413new List<IConnectionListenerFactory>(),
414new List<IMultiplexedConnectionListenerFactory> { transportFactory, new NonBindableMultiplexedTransportFactory() });
439new List<IConnectionListenerFactory>() { mockTransportFactory },
440new List<IMultiplexedConnectionListenerFactory>() { mockMultiplexedTransportFactory });
466new List<IConnectionListenerFactory>() { mockTransportFactory },
467new List<IMultiplexedConnectionListenerFactory>() { mockMultiplexedTransportFactory });
497new List<IConnectionListenerFactory>() { mockTransportFactory },
498new List<IMultiplexedConnectionListenerFactory>() { mockMultiplexedTransportFactory });
525new List<IConnectionListenerFactory>() { mockTransportFactory },
526new List<IMultiplexedConnectionListenerFactory>() { mockMultiplexedTransportFactory });
804var mockTransports = new List<Mock<IConnectionListener>>();
942var mockTransports = new List<Mock<IConnectionListener>>();
991public List<BindDetail> BoundEndPoints { get; } = new List<BindDetail>();
1043public List<BindDetail> BoundEndPoints { get; } = new List<BindDetail>();
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (5)
Microsoft.AspNetCore.Server.Kestrel.Tests (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (2)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (4)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (17)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (2)
Microsoft.AspNetCore.Session (1)
Microsoft.AspNetCore.Shared.Tests (38)
Microsoft.AspNetCore.SignalR.Client.Core (4)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (6)
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (6)
Microsoft.AspNetCore.SignalR.Client.Tests (24)
Microsoft.AspNetCore.SignalR.Common (2)
Microsoft.AspNetCore.SignalR.Common.Tests (5)
Microsoft.AspNetCore.SignalR.Core (15)
Microsoft.AspNetCore.SignalR.Microbenchmarks (15)
Microsoft.AspNetCore.SignalR.Protocols.Json (1)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (3)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (3)
Microsoft.AspNetCore.SignalR.Specification.Tests (5)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (11)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (17)
DefaultHubMessageSerializerTests.cs (10)
24var resolver = CreateHubProtocolResolver(new List<IHubProtocol> { new MessagePackHubProtocol(), new JsonHubProtocol() });
29var allBytes = new List<byte>();
44var resolver = CreateHubProtocolResolver(new List<IHubProtocol> { new MessagePackHubProtocol(), new JsonHubProtocol() });
46var serializer = new DefaultHubMessageSerializer(resolver, new List<string>() { "json" }, new List<string>() { "messagepack" });
51Assert.Equal(new List<byte>() { 0x0D,
71new List<IHubProtocol>() { new MessagePackHubProtocol() },
83new List<IHubProtocol>() { new MessagePackHubProtocol(), new JsonHubProtocol() },
100new List<IHubProtocol>() { new MessagePackHubProtocol(), new TestHubProtocol() },
112new List<IHubProtocol>(),
Microsoft.AspNetCore.SignalR.Tests (28)
DefaultHubLifetimeManagerTests.cs (5)
61var sendTask = manager.SendAllExceptAsync("Hello", new object[] { "World" }, new List<string> { connection1.ConnectionId }, cts.Token).DefaultTimeout();
99var sendTask = manager.SendConnectionsAsync(new List<string> { connection1.ConnectionId }, "Hello", new object[] { "World" }, cts.Token).DefaultTimeout();
141var sendTask = manager.SendGroupExceptAsync("group", "Hello", new object[] { "World" }, new List<string> { connection1.ConnectionId }, cts.Token).DefaultTimeout();
162var sendTask = manager.SendGroupsAsync(new List<string> { "group" }, "Hello", new object[] { "World" }, cts.Token).DefaultTimeout();
209var sendTask = manager.SendUsersAsync(new List<string> { "user1", "user2" }, "Hello", new object[] { "World" }, cts.Token).DefaultTimeout();
Microsoft.AspNetCore.SignalR.Tests.Utils (8)
Microsoft.AspNetCore.SpaServices.Extensions.Tests (1)
Microsoft.AspNetCore.StaticAssets (4)
Microsoft.AspNetCore.StaticFiles (1)
Microsoft.AspNetCore.TestHost (1)
Microsoft.AspNetCore.Tests (7)
Microsoft.AspNetCore.WebSockets (1)
Microsoft.AspNetCore.WebSockets.ConformanceTests (6)
Microsoft.AspNetCore.WebUtilities (2)
Microsoft.AspNetCore.WebUtilities.Microbenchmarks (1)
Microsoft.AspNetCore.WebUtilities.Tests (2)
Microsoft.Authentication.WebAssembly.Msal (3)
Microsoft.Build (339)
Microsoft.Build.BuildCheck.UnitTests (32)
EndToEndTests.cs (14)
556PrepareSampleProjectsAndConfig(buildInOutOfProcessNode, out TransientTestFile projectFile, new List<(string, string)>() { ("BC0101", "warning") });
592PrepareSampleProjectsAndConfig(buildInOutOfProcessNode, out TransientTestFile projectFile, new List<(string, string)>() { ("BC0101", BC0101Severity) });
646PrepareSampleProjectsAndConfig(true, out TransientTestFile projectFile, new List<(string, string)>() { ("BC0101", BC0101Severity) });
681new List<(string, string)>() { ("X01234", severity) },
682new List<(string, (string, string))>
706PrepareSampleProjectsAndConfig(buildInOutOfProcessNode, out TransientTestFile projectFile, new List<(string, string)>() { ("BC0101", "warning") });
750customConfigData = new List<(string, (string, string))>()
759new List<(string, string)>() { ("BC0103", "error") },
787customConfigData = new List<(string, (string, string))>()
795new List<(string, string)>() { ("BC0103", "error") },
820new List<(string, string)>() { ("BC0103", "warning") });
892new List<(string, string)>() { (ruleId, severity) },
921new List<(string, string)>() { (ruleId, "warning") },
943PrepareSampleProjectsAndConfig(buildInOutOfProcessNode, out TransientTestFile projectFile, new List<(string, string)>() { ("BC0101", "warning") });
Microsoft.Build.CommandLine.UnitTests (37)
Microsoft.Build.Engine.OM.UnitTests (116)
Construction\ConstructionEditing_Tests.cs (12)
2382List<ProjectElement> allChildren = new List<ProjectElement>(group2.AllChildren);
2384Helpers.AssertListsValueEqual(allChildren, new List<ProjectElement> { item1, item2 });
2405List<ProjectElement> allChildren = new List<ProjectElement>(group2.AllChildren);
2407Helpers.AssertListsValueEqual(allChildren, new List<ProjectElement> { item2, item1 });
2428List<ProjectElement> allChildren = new List<ProjectElement>(group2.AllChildren);
2430Helpers.AssertListsValueEqual(allChildren, new List<ProjectElement> { item2, item1 });
2451List<ProjectElement> allChildren = new List<ProjectElement>(group2.AllChildren);
2453Helpers.AssertListsValueEqual(allChildren, new List<ProjectElement> { item1, item2 });
2474List<ProjectElement> allChildren = new List<ProjectElement>(group2.AllChildren);
2476Helpers.AssertListsValueEqual(allChildren, new List<ProjectElement> { item1, item2 });
2498List<ProjectElement> allChildren = new List<ProjectElement>(group2.AllChildren);
2500Helpers.AssertListsValueEqual(allChildren, new List<ProjectElement> { item1, item2 });
Definition\Project_Tests.cs (71)
619List<ProjectElement> logicalElements = new List<ProjectElement>(project.GetLogicalProject());
1725List<string> filePaths = new List<string>();
2076bool result = project.Build(new string[] { "nonexistent" }, new List<ILogger>() { logger });
2293List<ProjectItem> list = new List<ProjectItem>() { project.GetItems("i").FirstOrDefault(), project.GetItems("j").FirstOrDefault() };
2366project.RemoveItems(new List<ProjectItem>() { null });
2406project.RemoveItems(new List<ProjectItem>() { item });
2407project.RemoveItems(new List<ProjectItem>() { item });
2437List<ILogger> loggers = new List<ILogger>();
2461List<ILogger> loggers = new List<ILogger>();
2531List<ILogger> loggers = new List<ILogger>();
2573List<ProjectElement> logicalProject = new List<ProjectElement>(project.GetLogicalProject());
2619List<ProjectElement> logicalProject = new List<ProjectElement>(project.GetLogicalProject());
2671var expected = new ProvenanceResultTupleList();
2719var expected = new ProvenanceResultTupleList();
2737var expected = new ProvenanceResultTupleList
2757var expected = new ProvenanceResultTupleList();
2773var expected = new ProvenanceResultTupleList
2780AssertProvenanceResult(new ProvenanceResultTupleList(), project, "a/2.foo");
2796var expected = new ProvenanceResultTupleList
2817var expected = new ProvenanceResultTupleList
2824expected = new ProvenanceResultTupleList
2836var expected = new ProvenanceResultTupleList();
2871var expected = new ProvenanceResultTupleList
2904var expected = new ProvenanceResultTupleList
2923var expected = new ProvenanceResultTupleList();
2941var expected = new ProvenanceResultTupleList
2964var expected = new ProvenanceResultTupleList
2971AssertProvenanceResult(new ProvenanceResultTupleList(), project, "1.foo", "NotExistent");
2989new ProvenanceResultTupleList()
3009new ProvenanceResultTupleList()
3026new ProvenanceResultTupleList()
3057new ProvenanceResultTupleList
3091var expected = new ProvenanceResultTupleList
3117var expected = new ProvenanceResultTupleList
3143var expected = new ProvenanceResultTupleList
3171var expected = new ProvenanceResultTupleList
3191var expected = new ProvenanceResultTupleList();
3207var expected = new ProvenanceResultTupleList();
3225var expected = new ProvenanceResultTupleList();
3242var expected1Foo = new ProvenanceResultTupleList
3256var expected2Foo = new ProvenanceResultTupleList
3262AssertProvenanceResult(new ProvenanceResultTupleList(), project.GetItemProvenance(@"../x/d13/../x/d12/d23/../2.foo"));
3286var expectedProvenance = new ProvenanceResultTupleList
3310var expected = new ProvenanceResultTupleList();
3332var expected = new ProvenanceResultTupleList();
3348var expected = new ProvenanceResultTupleList
3377new ProvenanceResultTupleList
3389new ProvenanceResultTupleList()
3396new ProvenanceResultTupleList
3408new ProvenanceResultTupleList()
3415new ProvenanceResultTupleList()
3422new ProvenanceResultTupleList()
3429new ProvenanceResultTupleList
3441new ProvenanceResultTupleList()
3448new ProvenanceResultTupleList()
3455new ProvenanceResultTupleList
3467new ProvenanceResultTupleList
3479new ProvenanceResultTupleList
3514var expected = new ProvenanceResultTupleList
3544var expected = new ProvenanceResultTupleList
3581? new ProvenanceResultTupleList
3585: new ProvenanceResultTupleList();
3601var expected = new GlobResultList();
3618var expected = new GlobResultList();
3636var expected = new GlobResultList();
3656var expected = new GlobResultList
3679var expected = new GlobResultList
3796var expected = new GlobResultList
3802AssertGlobResult(new GlobResultList(), project, "NotExistent");
3819var expected = new GlobResultList
3847var expected = new GlobResultList
Microsoft.Build.Engine.UnitTests (311)
BackEnd\CacheAggregator_Tests.cs (11)
80var buildResult = new BuildResult(new BuildRequest(1, 2, configurationId: 1, new List<string>() { "a", "b" }, null, BuildEventContext.Invalid, null));
101var buildResult = new BuildResult(new BuildRequest(1, 2, configurationId: 1, new List<string>() { "a", "b" }, null, BuildEventContext.Invalid, null));
106var buildResult2 = new BuildResult(new BuildRequest(1, 2, configurationId: 2, new List<string>() { "a", "b" }, null, BuildEventContext.Invalid, null));
130var buildResult = new BuildResult(new BuildRequest(1, 2, configurationId: 2, new List<string>() { "a", "b" }, null, BuildEventContext.Invalid, null));
152var buildResult11 = new BuildResult(new BuildRequest(1, 2, configurationId: 1, new List<string>() { "a", "b" }, null, BuildEventContext.Invalid, null));
160var buildResult21 = new BuildResult(new BuildRequest(1, 2, configurationId: 1, new List<string>() { "e", "f" }, null, BuildEventContext.Invalid, null));
196var buildResult = new BuildResult(new BuildRequest(1, 2, configurationId: 1, new List<string>() { "a", "b" }, null, BuildEventContext.Invalid, null));
215var buildResult11 = new BuildResult(new BuildRequest(1, 2, configurationId: 1, new List<string>() { "a", "b" }, null, BuildEventContext.Invalid, null));
217var buildResult12 = new BuildResult(new BuildRequest(1, 2, configurationId: 2, new List<string>() { "c", "d" }, null, BuildEventContext.Invalid, null));
227var buildResult21 = new BuildResult(new BuildRequest(1, 2, configurationId: 1, new List<string>() { "e", "f" }, null, BuildEventContext.Invalid, null));
229var buildResult22 = new BuildResult(new BuildRequest(1, 2, configurationId: 2, new List<string>() { "g", "h" }, null, BuildEventContext.Invalid, null));
BackEnd\ResultsCache_Tests.cs (12)
183ResultsCacheResponse response = cache.SatisfyRequest(request, new List<string>(), new List<string>(new string[] { "testTarget2" }), skippedResultsDoNotCauseCacheMiss: false);
237new List<string>(),
238new List<string>(new string[] { targetName }),
243new List<string>(),
244new List<string>(new string[] { targetName }),
249new List<string>(),
250new List<string>(new string[] { targetName }),
318new List<string>(),
319new List<string>(new string[] { targetName }),
324new List<string>(),
325new List<string>(new string[] { targetName }),
BackEnd\Scheduler_Tests.cs (30)
115List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
133List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
157List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
180List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
187response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
211List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
231List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
254List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
282List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
306List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
333List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
359List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
402List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, new BuildRequestBlocker(-1, Array.Empty<string>(), new BuildRequest[] { _defaultParentRequest, request1, request2, request3 })));
408List<NodeInfo> nodeInfos = new List<NodeInfo>(new NodeInfo[] { new NodeInfo(1, NodeProviderType.InProc) });
409List<ScheduleResponse> moreResponses = new List<ScheduleResponse>(_scheduler.ReportNodesCreated(nodeInfos));
437List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
467List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
497List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
530List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
554List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
596List<ScheduleResponse> responses = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, new BuildRequestBlocker(-1, Array.Empty<string>(), new BuildRequest[] { _defaultParentRequest, request1, request2, request3 })));
632List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
651List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
671List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
687List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
690response = new List<ScheduleResponse>(_scheduler.ReportResult(1, result));
739BuildRequestConfiguration config = new(configId, data, "4.0") { ProjectInitialTargets = new List<string>(), ProjectDefaultTargets = new List<string>() };
935List<NodeInfo> nodeInfos = new List<NodeInfo>();
961List<ScheduleResponse> moreResponses = new List<ScheduleResponse>(_scheduler.ReportNodesCreated(nodeInfos));
BuildEventArgsSerialization_Tests.cs (13)
121var entryPointProjects = new List<string>()
127var targetNames = new List<string>()
160properties: new List<DictionaryEntry>() { new DictionaryEntry("Key", "Value") },
161items: new List<DictionaryEntry>() { new DictionaryEntry("Key", new MyTaskItem() { ItemSpec = "TestItemSpec" }) },
229new List<ITaskItem> { new MyTaskItem() });
770Properties = new List<DictionaryEntry>() { new DictionaryEntry("Key", "Value") },
771Items = new List<DictionaryEntry>() { new DictionaryEntry("Key", new MyTaskItem() { ItemSpec = "TestItemSpec" }) }
799Properties = new List<DictionaryEntry>() { new DictionaryEntry("Key", "Value") },
800Items = new List<DictionaryEntry>() { new DictionaryEntry("ItemType", itemDataWithMetadata) }
1066List<BinaryLogReaderErrorEventArgs> readerErrors = new();
1121List<BinaryLogReaderErrorEventArgs> readerErrors = new();
1177List<BinaryLogReaderErrorEventArgs> readerErrors = new();
1233List<BinaryLogReaderErrorEventArgs> readerErrors = new();
Construction\SolutionProjectGenerator_Tests.cs (12)
82instances[0].Build(targets: null, new List<ILogger> { logger }).ShouldBeTrue();
112instances[0].Build(targets: null, new List<ILogger> { logger }).ShouldBeTrue();
679List<ILogger> loggers = new List<ILogger>(1);
701List<ILogger> loggers1 = new List<ILogger>(1);
769List<ILogger> loggers = new List<ILogger>(1);
1088var loggers = new List<ILogger>(1) { logger };
2434ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), new List<string> { "One" });
2438instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), new List<string> { "Two", "Three", "Four" });
2444instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), new List<string> { "Build" });
2448instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), new List<string> { "Five", "Rebuild" });
2453instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), new List<string> { "My_Project:Six" });
2708projectInstance.Build(targetsToBuild, new List<ILogger> { mockLogger })
Graph\ProjectGraph_Tests.cs (6)
309var projectsInCycle = new List<string> { entryProject.Path, proj3.Path, proj2.Path, entryProject.Path };
343var projectsInCycle = new List<string> { proj2.Path, proj3.Path, proj7.Path, proj6.Path, proj2.Path };
1116IReadOnlyDictionary<ProjectGraphNode, ImmutableList<string>> targetLists = projectGraph.GetTargetLists(new List<string> { "A" });
1157IReadOnlyDictionary<ProjectGraphNode, ImmutableList<string>> targetLists = projectGraph.GetTargetLists(new List<string> { "A" });
1191IReadOnlyDictionary<ProjectGraphNode, ImmutableList<string>> targetLists = projectGraph.GetTargetLists(new List<string> { "A" });
1363IReadOnlyDictionary<ProjectGraphNode, ImmutableList<string>> targetLists = projectGraph.GetTargetLists(new List<string> { "A" });
Microsoft.Build.Framework (28)
Microsoft.Build.Framework.UnitTests (6)
Microsoft.Build.Tasks.CodeAnalysis (9)
Microsoft.Build.Tasks.CodeAnalysis.Sdk (9)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (3)
Microsoft.Build.Tasks.Core (204)
Microsoft.Build.Tasks.UnitTests (33)
RoslynCodeTaskFactory_Tests.cs (4)
364ICollection<TaskPropertyInfo> parameters = new List<TaskPropertyInfo>
473ICollection<TaskPropertyInfo> parameters = new List<TaskPropertyInfo>
926bool success = RoslynCodeTaskFactory.TryLoadTaskBody(log, TaskName, taskBody, new List<TaskPropertyInfo>(), buildEngine, out RoslynCodeTaskFactoryTaskInfo _);
952bool success = RoslynCodeTaskFactory.TryLoadTaskBody(log, TaskName, taskBody, parameters ?? new List<TaskPropertyInfo>(), buildEngine, out RoslynCodeTaskFactoryTaskInfo taskInfo);
Microsoft.Build.UnitTests.Shared (34)
Microsoft.Build.Utilities.Core (45)
Microsoft.Build.Utilities.UnitTests (9)
Microsoft.Cci.Extensions (16)
Microsoft.CodeAnalysis (51)
Microsoft.CodeAnalysis.Analyzers (43)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
86var result = new List<ITypeSymbol>
Microsoft.CodeAnalysis.AnalyzerUtilities (31)
Microsoft.CodeAnalysis.BannedApiAnalyzers (39)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
86var result = new List<ITypeSymbol>
Microsoft.CodeAnalysis.CodeStyle (29)
Microsoft.CodeAnalysis.CodeStyle.Fixes (12)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
86var result = new List<ITypeSymbol>
Microsoft.CodeAnalysis.Collections.Package (1)
Microsoft.CodeAnalysis.CSharp (35)
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (10)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (7)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (180)
Completion\CompletionProviders\ExtensionMemberImportCompletionProviderTests.cs (9)
58=> CombineWithReferenceTypeData((new[] { "class", "struct", "interface", "enum", "abstract class" }).Select(kind => new List<object>() { kind }));
62var predefinedTypes = new List<string>() { "string", "String", "System.String" };
70yield return new List<object>() { type1 + suffix, type2 + suffix };
499}).Select(tuple => new List<object>() { tuple }));
539=> CombineWithReferenceTypeData((new[] { "class", "interface", "abstract class" }).Select(kind => new List<object>() { kind }));
588}).Select(tuple => new List<object>() { tuple }));
635}).Select(tuple => new List<object>() { tuple }));
880var predefinedTypes = new List<(string vbType, string csType)>
2033var expectedFilters = new List<CompletionFilter>()
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (14)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (12)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (7)
Microsoft.CodeAnalysis.CSharp.Features (39)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (88)
Semantics\BindingTests.cs (10)
778", assemblyName: "DerivedAssembly1", references: new List<MetadataReference>() { baseAssembly.EmitToImageReference() }).VerifyDiagnostics();
791", references: new List<MetadataReference>() { derivedAssembly.EmitToImageReference() })
817", assemblyName: "DerivedAssembly2", references: new List<MetadataReference>() { baseAssembly.EmitToImageReference() }).VerifyDiagnostics();
830", references: new List<MetadataReference>() { derivedAssembly.EmitToImageReference() })
856", assemblyName: "DerivedAssembly3", references: new List<MetadataReference>() { baseAssembly.EmitToImageReference() }).VerifyDiagnostics();
867}", references: new List<MetadataReference>() { derivedAssembly.EmitToImageReference() })
1465}", references: new List<MetadataReference>() { TestReferences.SymbolsTests.NoPia.NoPIAGenericsAsm1 })
1497}", references: new List<MetadataReference>() { TestReferences.SymbolsTests.NoPia.NoPIAGenericsAsm1 })
1522}", references: new List<MetadataReference>() { TestReferences.SymbolsTests.NoPia.NoPIAGenericsAsm1 })
1558}", references: new List<MetadataReference>() { TestReferences.SymbolsTests.NoPia.NoPIAGenericsAsm1 })
Semantics\SpanStackSafetyTests.cs (8)
1926references: new List<MetadataReference>() { MscorlibRef_v4_0_30316_17626, SystemCoreRef, CSharpRef },
1943references: new List<MetadataReference>() { MscorlibRef_v4_0_30316_17626, SystemCoreRef, CSharpRef, reference.EmitToImageReference() },
1960references: new List<MetadataReference>() { MscorlibRef_v4_0_30316_17626, SystemCoreRef, CSharpRef },
1977references: new List<MetadataReference>() { MscorlibRef_v4_0_30316_17626, SystemCoreRef, CSharpRef, reference.EmitToImageReference() },
2004references: new List<MetadataReference>() { MscorlibRef_v4_0_30316_17626, SystemCoreRef, CSharpRef },
2021references: new List<MetadataReference>() { MscorlibRef_v4_0_30316_17626, SystemCoreRef, CSharpRef, reference.EmitToImageReference() },
2045references: new List<MetadataReference>() { MscorlibRef_v4_0_30316_17626, SystemCoreRef, CSharpRef },
2062references: new List<MetadataReference>() { MscorlibRef_v4_0_30316_17626, SystemCoreRef, CSharpRef, reference.EmitToImageReference() },
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (108)
Symbols\Source\MethodTests.cs (6)
759var comp2 = CreateCompilationWithMscorlib461(new string[] { text1 }, new List<MetadataReference>() { compRef1 }, assemblyName: "Test2");
765var comp = CreateCompilationWithMscorlib461(new string[] { text2 }, new List<MetadataReference>() { compRef1, compRef2 }, assemblyName: "Test3");
973var list = new List<Symbol>();
1048var comp2 = CreateCompilation(new string[] { text1 }, new List<MetadataReference>() { compRef1 }, assemblyName: "Test2");
1054var comp = CreateCompilation(new string[] { text2 }, new List<MetadataReference>() { compRef1, compRef2 }, assemblyName: "Test3");
1082var list = new List<Symbol>();
Symbols\SymbolErrorTests.cs (67)
5494var comp = CreateCompilation(text, new List<MetadataReference> { ref1, ref2 });
5516comp = CreateCompilation(new SyntaxTree[] { Parse(text, "goo.cs") }, new List<MetadataReference> { ref1 });
5552var comp = DiagnosticsUtils.VerifyErrorsAndGetCompilationWithMscorlib(text, new List<MetadataReference> { ref1, ref2 },
5588new List<MetadataReference>()
5627new List<MetadataReference>()
5672new List<MetadataReference>()
5686new List<MetadataReference>()
5734new List<MetadataReference>()
5747new List<MetadataReference>()
5793new List<MetadataReference>()
5807new List<MetadataReference>()
5855new List<MetadataReference>()
5868new List<MetadataReference>()
5914new List<MetadataReference>()
5926new List<MetadataReference>()
5971new List<MetadataReference>()
5984new List<MetadataReference>()
6030new List<MetadataReference>()
6043new List<MetadataReference>()
6089new List<MetadataReference>()
6102new List<MetadataReference>()
6136new List<MetadataReference>()
6172new List<MetadataReference>()
6208new List<MetadataReference>()
6244new List<MetadataReference>()
6287new List<MetadataReference>()
6300new List<MetadataReference>()
6347new List<MetadataReference>()
6361new List<MetadataReference>()
6409new List<MetadataReference>()
6422new List<MetadataReference>()
6469new List<MetadataReference>()
6483new List<MetadataReference>()
6534new List<MetadataReference>()
6547new List<MetadataReference>()
6597new List<MetadataReference>()
6610new List<MetadataReference>()
6660new List<MetadataReference>()
6677new List<MetadataReference>()
6731new List<MetadataReference>()
6744new List<MetadataReference>()
6794new List<MetadataReference>()
6810new List<MetadataReference>()
6863new List<MetadataReference>()
6880new List<MetadataReference>()
6928new List<MetadataReference>()
6945new List<MetadataReference>()
6964new List<MetadataReference>()
7013new List<MetadataReference>()
7027new List<MetadataReference>()
7043new List<MetadataReference>()
7088new List<MetadataReference>()
7143new List<MetadataReference>()
7232new List<MetadataReference>()
7307new List<MetadataReference>()
7320new List<MetadataReference>()
7330new List<MetadataReference>()
7339new List<MetadataReference>()
7359new List<MetadataReference>()
7372new List<MetadataReference>()
7386new List<MetadataReference>()
7400new List<MetadataReference>()
7410new List<MetadataReference>()
14902new List<MetadataReference> { reference },
17701var comp = CreateCompilation(new[] { text }, new List<MetadataReference> { ref1 });
17739var comp = CreateCompilation(new[] { text }, new List<MetadataReference> { ref1 });
17982var comp = CreateCompilation(new[] { text }, new List<MetadataReference> { ref1 });
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (34)
LexicalAndXml\XmlDocCommentTests.cs (11)
1678VerifyDiagnostics(tree.GetCompilationUnitRoot(), new List<TestError>() { new TestError(1570, true) });
1695VerifyDiagnostics(tree.GetCompilationUnitRoot(), new List<TestError>() { new TestError(1570, true) });
2243VerifyDiagnostics(tree.GetCompilationUnitRoot(), new List<TestError>() { new TestError(1035, false) });
2368VerifyDiagnostics(trivias[0], new List<TestError>() { new TestError(1570, true) });
2393VerifyDiagnostics(xmlText, new List<TestError>() { new TestError(1570, true) });
2423VerifyDiagnostics(xmlText, new List<TestError>() { new TestError(1570, true) });
2501VerifyDiagnostics(doc, new List<TestError>() { new TestError(1570, true), new TestError(1570, true) });
2526VerifyDiagnostics(doc, new List<TestError>() { new TestError(1570, true), new TestError(1570, true) });
2696VerifyDiagnostics(tree.GetCompilationUnitRoot(), new List<TestError>
2722VerifyDiagnostics(tree.GetCompilationUnitRoot(), new List<TestError>
2750VerifyDiagnostics(doc, new List<TestError>() { new TestError(1570, true), new TestError(1570, true) });
Microsoft.CodeAnalysis.CSharp.Test.Utilities (19)
CSharpTestBase.cs (13)
2145synList = new List<SyntaxNode>();
2272var nodeList = new List<TNode>();
2895references: new List<MetadataReference>() { NetFramework.mscorlib, NetFramework.SystemCore, NetFramework.MicrosoftCSharp },
2902references: new List<MetadataReference>() { NetFramework.mscorlib, NetFramework.SystemCore, NetFramework.MicrosoftCSharp, reference.EmitToImageReference() },
2914references: new List<MetadataReference>() { MscorlibRef_v4_0_30316_17626, SystemCoreRef, CSharpRef },
2929references: new List<MetadataReference>() { reference.EmitToImageReference() },
2940references: new List<MetadataReference>() { reference.EmitToImageReference() },
2951references: new List<MetadataReference>() { reference.EmitToImageReference() },
2968references: new List<MetadataReference>() { reference.EmitToImageReference() },
2986references: new List<MetadataReference>() { reference.EmitToImageReference() },
3216return new List<object[]>()
3228return new List<object[]>()
3240return new List<object[]>()
Microsoft.CodeAnalysis.CSharp.Workspaces (24)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
Microsoft.CodeAnalysis.EditorFeatures (24)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (5)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (11)
Microsoft.CodeAnalysis.Extensions.Package (3)
Microsoft.CodeAnalysis.ExternalAccess.HotReload (1)
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (1)
Microsoft.CodeAnalysis.ExternalAccess.Xaml (1)
Microsoft.CodeAnalysis.Features (44)
Microsoft.CodeAnalysis.Features.Test.Utilities (6)
Microsoft.CodeAnalysis.Features.UnitTests (1)
Microsoft.CodeAnalysis.InteractiveHost (4)
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (3)
Microsoft.CodeAnalysis.LanguageServer.UnitTests (1)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (38)
Microsoft.CodeAnalysis.PublicApiAnalyzers (33)
Microsoft.CodeAnalysis.PublicApiAnalyzers.CodeFixes (8)
Microsoft.CodeAnalysis.Rebuild (1)
Microsoft.CodeAnalysis.Rebuild.UnitTests (6)
Microsoft.CodeAnalysis.Remote.ServiceHub (2)
Microsoft.CodeAnalysis.ResxSourceGenerator (32)
Microsoft.CodeAnalysis.Scripting (9)
Microsoft.CodeAnalysis.Scripting.TestUtilities (1)
Microsoft.CodeAnalysis.Test.Utilities (51)
Microsoft.CodeAnalysis.Threading.Package (1)
Microsoft.CodeAnalysis.UnitTests (37)
Collections\HashSet\SegmentedHashSet_Generic_Tests`1.cs (3)
294List<T> objects = new List<T>() { CreateT(1), CreateT(2), CreateT(3), CreateT(4), CreateT(5), CreateT(6) };
328List<T> objects = new List<T>() { CreateT(1), CreateT(2), CreateT(3), CreateT(4), CreateT(5), CreateT(6) };
505IEnumerator valuesListEnum = new List<T>(set).GetEnumerator();
Microsoft.CodeAnalysis.VisualBasic (2)
Microsoft.CodeAnalysis.Workspaces (55)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
86var result = new List<ITypeSymbol>
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (6)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (5)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (16)
Microsoft.CodeAnalysis.Workspaces.UnitTests (22)
ExtensionOrdererTests.cs (11)
26var extensions = new List<Lazy<Extension, OrderableMetadata>>() { d, b, a, c, e };
43var extensions = new List<Lazy<Extension, OrderableMetadata>>() { d, b, a, c, e };
60var extensions = new List<Lazy<Extension, OrderableMetadata>>() { d, b, a, c, e };
77var extensions = new List<Lazy<Extension, OrderableMetadata>>() { a, b, c, d, e };
94var extensions = new List<Lazy<Extension, OrderableMetadata>>() { a, b, c, d, e };
109var extensions = new List<Lazy<Extension, OrderableMetadata>>() { a, b, c };
124var extensions = new List<Lazy<Extension, OrderableMetadata>>() { a, b, c };
143var extensions = new List<Lazy<Extension, OrderableMetadata>>() { a, b, c, d, e, f, g };
162var extensions = new List<Lazy<Extension, OrderableMetadata>>() { a, b, c, d, e, f, g };
180var extensions = new List<Lazy<Extension, OrderableMetadata>>() { a, b, c, d, e, f };
198var extensions = new List<Lazy<Extension, OrderableMetadata>>() { a, b, c, d, e, f };
Microsoft.CommonLanguageServerProtocol.Framework.UnitTests (1)
Microsoft.CSharp (33)
Microsoft.Data.Analysis (48)
Microsoft.Data.Analysis.Interactive (6)
Microsoft.Data.Analysis.Interactive.Tests (1)
Microsoft.Data.Analysis.Tests (22)
DataFrameTests.cs (14)
327List<int> verify = new List<int>() { 0, 3, 1, 4, 2, 5 };
349List<int> originalColumnVerify = new List<int>() { 6, 8, 7, 9 };
350List<int> tailColumnVerity = new List<int>() { 1, 2, 4, 5 };
1091df.Append(new List<object> { 5, true }, inPlace: true);
1096DataFrame ret = df.Append(new List<object> { 5, true });
1101df.Append(new List<object> { 100 }, inPlace: true);
1106ret = df.Append(new List<object> { 100 }, inPlace: false);
1111df.Append(new List<object> { null, null }, inPlace: true);
1115ret = df.Append(new List<object> { null, null }, inPlace: false);
1171Assert.Throws<FormatException>(() => df.Append(new List<object> { 5, "str" }, inPlace: true));
1173Assert.Throws<ArgumentException>(() => df.Append(new List<object> { 5, true, true }, inPlace: true));
1199df.Append(new List<object> { "", true }, inPlace: true);
1207df.Append(new List<object> { 1, true, "" }, inPlace: true);
1213df.Append(new List<object> { 1, true, null }, inPlace: true);
Microsoft.DotNet.Arcade.Sdk (2)
Microsoft.DotNet.Build.Manifest (4)
Microsoft.DotNet.Build.Manifest.Tests (25)
BuildModelFactoryTests.cs (24)
737var result = _buildModelFactory.CreateMergedModel(new List<BuildModel>(), ArtifactVisibility.All);
751var result = _buildModelFactory.CreateMergedModel(new List<BuildModel> { buildModel }, ArtifactVisibility.All);
784var result = _buildModelFactory.CreateMergedModel(new List<BuildModel> { buildModel1, buildModel2 }, ArtifactVisibility.All);
824Blobs = new List<BlobArtifactModel> { new BlobArtifactModel() },
825Packages = new List<PackageArtifactModel> { new PackageArtifactModel() },
826Pdbs = new List<PdbArtifactModel> { new PdbArtifactModel() }
833Blobs = new List<BlobArtifactModel> { new BlobArtifactModel() },
834Packages = new List<PackageArtifactModel> { new PackageArtifactModel() },
835Pdbs = new List<PdbArtifactModel> { new PdbArtifactModel() }
840var result = _buildModelFactory.CreateMergedModel(new List<BuildModel> { buildModel1, buildModel2 }, ArtifactVisibility.All);
948Blobs = new List<BlobArtifactModel> { blobArtifactA },
949Packages = new List<PackageArtifactModel> { packageArtifactA },
950Pdbs = new List<PdbArtifactModel> { pdbArtifactA }
958Blobs = new List<BlobArtifactModel> { blobArtifactB },
959Packages = new List<PackageArtifactModel> { packageArtifactB },
960Pdbs = new List<PdbArtifactModel> { pdbArtifactB }
965var result = _buildModelFactory.CreateMergedModel(new List<BuildModel> { buildModel1, buildModel2 }, ArtifactVisibility.All);
1124Blobs = new List<BlobArtifactModel> { blobArtifactA },
1125Packages = new List<PackageArtifactModel> { packageArtifactA },
1126Pdbs = new List<PdbArtifactModel> { pdbArtifactA }
1134Blobs = new List<BlobArtifactModel> { blobArtifactB },
1135Packages = new List<PackageArtifactModel> { packageArtifactB },
1136Pdbs = new List<PdbArtifactModel> { pdbArtifactB }
1141var result = _buildModelFactory.CreateMergedModel(new List<BuildModel> { buildModel1, buildModel2 }, ArtifactVisibility.External);
Microsoft.DotNet.Build.Tasks.Feed (14)
Microsoft.DotNet.Build.Tasks.Feed.Tests (37)
Microsoft.DotNet.Build.Tasks.Installers (3)
Microsoft.DotNet.Build.Tasks.Packaging (39)
Microsoft.DotNet.Build.Tasks.TargetFramework (2)
Microsoft.DotNet.Build.Tasks.Workloads (21)
Microsoft.DotNet.Build.Tasks.Workloads.Tests (1)
Microsoft.DotNet.CMake.Sdk (1)
Microsoft.DotNet.Deployment.Tasks.Links (3)
Microsoft.DotNet.GenFacades (3)
Microsoft.DotNet.Helix.Client (1)
Microsoft.DotNet.Helix.JobSender (2)
Microsoft.DotNet.Helix.Sdk (3)
Microsoft.DotNet.Helix.Sdk.Tests (4)
Microsoft.DotNet.NuGetRepack.Tasks (3)
Microsoft.DotNet.NuGetRepack.Tests (7)
Microsoft.DotNet.Open.Api.Tools.Tests (5)
Microsoft.DotNet.PackageTesting (5)
Microsoft.DotNet.PackageTesting.Tests (17)
Microsoft.DotNet.SharedFramework.Sdk (6)
Microsoft.DotNet.SignCheckLibrary (13)
Microsoft.DotNet.SignCheckTask (5)
Microsoft.DotNet.SignTool (9)
Microsoft.DotNet.SignTool.Tests (164)
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (5)
Microsoft.DotNet.SwaggerGenerator.MSBuild (1)
Microsoft.DotNet.XliffTasks (3)
Microsoft.DotNet.XliffTasks.Tests (1)
Microsoft.DotNet.XUnitAssert.Tests (131)
Asserts\AsyncCollectionAssertsTests.cs (38)
59 var indices = new List<int>();
111 var indices = new List<int>();
124 var list = new List<int>().ToAsyncEnumerable();
134 var list = new List<int>().ToAsyncEnumerable();
158 var list = new List<int> { 42, 2112 }.ToAsyncEnumerable();
169 var list = new List<int> { 42, 2112 }.ToAsyncEnumerable();
197 var list = new List<int>().ToAsyncEnumerable();
207 var list = new List<int>().ToAsyncEnumerable();
231 var list = new List<int> { 42, 2112 }.ToAsyncEnumerable();
250 var list = new List<int> { 42, 2112 }.ToAsyncEnumerable();
292 var list = new List<object?> { 16, null, "Hi there" }.ToAsyncEnumerable();
300 var list = new List<int> { 42 }.ToAsyncEnumerable();
308 var list = new List<int> { 41, 43 }.ToAsyncEnumerable();
324 var list = new List<object?> { null, 16, "Hi there" }.ToAsyncEnumerable();
344 var list = new List<int> { 42 }.ToAsyncEnumerable();
404 var list = new List<object?> { 16, "Hi there", null }.ToAsyncEnumerable();
412 var list = new List<int> { 42, 42 }.ToAsyncEnumerable();
428 var list = new List<string?> { "a", null, "b", null, "c", "d" }.ToAsyncEnumerable();
478 var list = new List<object?> { 16, "Hi there" }.ToAsyncEnumerable();
486 var list = new List<int> { 42 }.ToAsyncEnumerable();
503 var list = new List<int>().ToAsyncEnumerable();
511 var list = new List<object?> { null, 16, "Hi there" }.ToAsyncEnumerable();
531 var list = new List<int> { 42 }.ToAsyncEnumerable();
591 var list = new List<int>().ToAsyncEnumerable();
599 var list = new List<int> { 42 }.ToAsyncEnumerable();
746 var actual = actualArray is null ? null : new List<int>(actualArray).ToAsyncEnumerable();
972 var actual = new List<int>([1, 2, 3, 4, 5]).ToAsyncEnumerable();
1001 var actual = new List<int>([0, 0, 0, 0, 0]).ToAsyncEnumerable();
1011 var expected = new List<EnumerableItem> { new(1), new(3) };
1012 var actual = new List<EnumerableItem> { new(0), new(2) }.ToAsyncEnumerable();
1067 var list = new List<int>().ToAsyncEnumerable();
1081 var list = new List<int> { 42 }.ToAsyncEnumerable();
1149 var actual = new List<int>(expected).ToAsyncEnumerable();
1176 var actual = new List<int>([1, 2, 3, 4, 0, 6, 7, 8, 9, 10]).ToAsyncEnumerable();
1189 var actual = new List<int>([1, 2, 3, 4, 5]).ToAsyncEnumerable();
1199 var actual = new List<int>([0, 0, 0, 0, 0]).ToAsyncEnumerable();
1337 var actual = new List<int>([1, 2, 3, 4, 5]).ToAsyncEnumerable();
1347 var actual = new List<int>([0, 0, 0, 0, 0]).ToAsyncEnumerable();
Asserts\CollectionAssertsTests.cs (67)
77 var indices = new List<int>();
150 var indices = new List<int>();
163 var list = new List<int>();
173 var list = new List<int>();
197 var list = new List<int> { 42, 2112 };
208 var list = new List<int> { 42, 2112 };
236 var list = new List<int>();
246 var list = new List<int>();
270 var list = new List<int> { 42, 2112 };
289 var list = new List<int> { 42, 2112 };
331 var list = new List<object?> { 16, null, "Hi there" };
339 var list = new List<int> { 42 };
347 var list = new List<int> { 41, 43 };
363 var list = new List<object?> { null, 16, "Hi there" };
403 var list = new List<int> { 42 };
477 var list = new List<object?> { 16, "Hi there", null };
485 var list = new List<int> { 42, 42 };
501 var list = new List<string?> { "a", null, "b", null, "c", "d" };
551 var list = new List<object?> { 16, "Hi there" };
559 var list = new List<int> { 42 };
576 var list = new List<int>();
584 var list = new List<object?> { null, 16, "Hi there" };
642 var list = new List<int> { 42 };
710 var list = new List<int>();
718 var list = new List<int> { 42 };
1005 var actual = new List<int>(expected);
1060 var actual = actualArray is null ? null : new List<int>(actualArray);
1086 var actual = new List<int> { 1, 2, 3, 4, 5 };
1105 var actual = new List<int> { 0, 0, 0, 0, 0 };
1123 var actual = new List<EnumerableItem> { new(0), new(2) };
1124 var expected = new List<EnumerableItem> { new(1), new(3) };
1232 var actual = new List<int> { 1, 2, 3, 4, 5 };
1251 var actual = new List<int> { 0, 0, 0, 0, 0 };
1260 var expected = new List<EnumerableItem> { new(1), new(3) };
1261 var actual = new List<EnumerableItem> { new(0), new(2) };
1413 ["toAddresses"] = new List<string> { "test1@example.com" },
1414 ["ccAddresses"] = new List<string> { "test2@example.com" },
1437 ["toAddresses"] = new List<string> { "test1@example.com" },
1438 ["ccAddresses"] = new List<string> { "test2@example.com" },
1516 ["key"] = new List<Dictionary<string, object>>()
1520 ["key"] = new List<object> { "value" }
1529 ["key"] = new List<Dictionary<string, object>>()
1533 ["key"] = new List<object> { "value" }
1549 ["key"] = new List<Dictionary<string, object>>()
1553 ["key"] = new List<object> { "value1" }
1562 ["key"] = new List<Dictionary<string, object>>()
1566 ["key"] = new List<object> { "value2" }
1702 var list = new List<int>();
1716 var list = new List<int> { 42 };
1827 var actual = new List<int>(expected);
1844 var actual = new List<int> { 1, 2, 3, 4, 0, 6, 7, 8, 9, 10 };
1856 var actual = new List<int> { 1, 2, 3, 4, 5 };
1865 var actual = new List<int> { 0, 0, 0, 0, 0 };
1968 var actual = new List<int> { 1, 2, 3, 4, 5 };
1977 var actual = new List<int> { 0, 0, 0, 0, 0 };
2112 ["toAddresses"] = new List<string> { "test1@example.com" },
2113 ["ccAddresses"] = new List<string> { "test2@example.com" },
2149 ["toAddresses"] = new List<string> { "test1@example.com" },
2150 ["ccAddresses"] = new List<string> { "test2@example.com" },
2215 ["key"] = new List<Dictionary<string, object>>()
2219 ["key"] = new List<object> { "value" }
2228 ["key"] = new List<Dictionary<string, object>>()
2232 ["key"] = new List<object> { "value" }
2261 ["key"] = new List<Dictionary<string, object>>()
2265 ["key"] = new List<object> { "value1" }
2274 ["key"] = new List<Dictionary<string, object>>()
2278 ["key"] = new List<object> { "value2" }
Microsoft.DotNet.XUnitExtensions (5)
Microsoft.DotNet.XUnitV3Extensions (1)
Microsoft.DotNet.XUnitV3Extensions.Tests (1)
Microsoft.Extensions.AI (4)
Microsoft.Extensions.AI.Abstractions (3)
Microsoft.Extensions.AI.Abstractions.Tests (6)
Microsoft.Extensions.AI.Evaluation (1)
Microsoft.Extensions.AI.Evaluation.Integration.Tests (7)
Microsoft.Extensions.AI.Evaluation.Quality (1)
Microsoft.Extensions.AI.Integration.Tests (22)
Microsoft.Extensions.AI.OpenAI.Tests (25)
Microsoft.Extensions.AI.Tests (49)
Microsoft.Extensions.ApiDescription.Client (1)
Microsoft.Extensions.ApiDescription.Client.Tests (5)
Microsoft.Extensions.ApiDescription.Tool.Tests (5)
Microsoft.Extensions.AsyncState (1)
Microsoft.Extensions.AsyncState.Tests (3)
Microsoft.Extensions.Caching.Memory (8)
Microsoft.Extensions.Compliance.Abstractions (1)
Microsoft.Extensions.Compliance.Abstractions.Tests (2)
Microsoft.Extensions.Configuration (11)
Microsoft.Extensions.Configuration.Binder (4)
Microsoft.Extensions.Configuration.KeyPerFile.Tests (3)
Microsoft.Extensions.Configuration.Xml (5)
Microsoft.Extensions.DataIngestion (5)
Microsoft.Extensions.DependencyInjection (13)
Microsoft.Extensions.DependencyInjection.Abstractions (1)
Microsoft.Extensions.DependencyModel (15)
Microsoft.Extensions.Diagnostics (1)
Microsoft.Extensions.Diagnostics.Abstractions (1)
Microsoft.Extensions.Diagnostics.ExceptionSummarization (1)
Microsoft.Extensions.Diagnostics.HealthChecks (2)
Microsoft.Extensions.Diagnostics.HealthChecks.Common (1)
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (8)
TelemetryHealthChecksPublisherTests.cs (6)
26new List<HealthStatus> { HealthStatus.Healthy },
34new List<HealthStatus> { HealthStatus.Degraded },
42new List<HealthStatus> { HealthStatus.Unhealthy },
50new List<HealthStatus> { HealthStatus.Healthy, HealthStatus.Healthy },
58new List<HealthStatus> { HealthStatus.Healthy, HealthStatus.Unhealthy },
66new List<HealthStatus> { HealthStatus.Healthy, HealthStatus.Degraded, HealthStatus.Unhealthy },
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (3)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (4)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (18)
Microsoft.Extensions.Diagnostics.Testing (3)
Microsoft.Extensions.Diagnostics.Testing.Tests (2)
Microsoft.Extensions.FileProviders.Composite (3)
Microsoft.Extensions.FileProviders.Embedded (5)
Microsoft.Extensions.FileSystemGlobbing (18)
Microsoft.Extensions.Hosting (16)
Microsoft.Extensions.Hosting.Testing.Tests (2)
Microsoft.Extensions.Http (5)
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (1)
Microsoft.Extensions.Http.Diagnostics.Tests (52)
HttpHeadersRedactorTests.cs (8)
32Add(new LinkedList<string>(new List<string> { "aaa", "bbb", "ccc" }), "Redacted:aaa,Redacted:bbb,Redacted:ccc");
33Add(new LinkedList<string>(new List<string> { "aaa", "bbb", null! }), "Redacted:aaa,Redacted:bbb,");
34Add(new LinkedList<string>(new List<string> { "aaa", null!, null! }), "Redacted:aaa,,");
35Add(new LinkedList<string>(new List<string> { null!, null!, null! }), ",,");
36Add(new LinkedList<string>(new List<string> { null! }), string.Empty);
37Add(new LinkedList<string>(new List<string> { "aaa" }), "Redacted:aaa");
38Add(new LinkedList<string>(new List<string>()), string.Empty);
39Add(new LinkedList<string>(new List<string> { longStr, "bbb", "ccc" }), $"Redacted:{longStr},Redacted:bbb,Redacted:ccc");
Logging\AcceptanceTests.cs (5)
169httpRequestMessage.Headers.Add("ReQuEStHeAdErFirst", new List<string> { "Request Value 2", "Request Value 3" });
185httpRequestMessage2.Headers.Add("ReQuEStHeAdErSecond", new List<string> { "Request Value 2", "Request Value 3" });
250httpRequestMessage.Headers.Add("ReQuEStHeAdEr2", new List<string> { "Request Value 2", "Request Value 3" });
272httpRequestMessage2.Headers.Add("ReQuEStHeAdEr2", new List<string> { "Request Value 2", "Request Value 3" });
688httpRequestMessage.Headers.Add("ReQuEStHeAdEr2", new List<string> { "Request Value 2", "Request Value 3" });
Logging\HttpClientLoggerTest.cs (10)
230new List<IHttpClientLogEnricher> { testEnricher },
327new List<IHttpClientLogEnricher> { testEnricher },
434new List<IHttpClientLogEnricher> { testEnricher },
550new List<IHttpClientLogEnricher> { testEnricher },
644new List<IHttpClientLogEnricher> { testEnricher },
688new List<IHttpClientLogEnricher> { enricher1.Object, enricher2.Object },
731new List<IHttpClientLogEnricher> { enricher1.Object, enricher2.Object },
766var enrichers = new List<IHttpClientLogEnricher> { enricher1.Object, enricher2.Object };
813new List<IHttpClientLogEnricher> { enricher1.Object, enricher2.Object },
915new List<IHttpClientLogEnricher> { testEnricher },
Logging\HttpRequestReaderTest.cs (22)
103var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
104var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
162var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
163var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
234var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
235var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
310var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
311var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
371var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
372var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
443var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
444var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
512var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
513var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
582var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
583var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
634var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
663await reader.ReadRequestAsync(logRecord, httpRequestMessage, new List<KeyValuePair<string, string>>(), CancellationToken.None);
693await reader.ReadRequestAsync(logRecord, httpRequestMessage, new List<KeyValuePair<string, string>>(), CancellationToken.None);
729await reader.ReadRequestAsync(logRecord, httpRequestMessage, new List<KeyValuePair<string, string>>(), CancellationToken.None);
818await reader.ReadRequestAsync(logRecord, httpRequestMessage, new List<KeyValuePair<string, string>>(), CancellationToken.None);
874var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
Microsoft.Extensions.Http.Polly.Tests (2)
Microsoft.Extensions.Http.Resilience (4)
Microsoft.Extensions.Http.Resilience.Tests (14)
Microsoft.Extensions.Identity.Core (23)
Microsoft.Extensions.Identity.Stores (1)
Microsoft.Extensions.Localization (1)
Microsoft.Extensions.Logging (10)
Microsoft.Extensions.Logging.Abstractions (1)
Microsoft.Extensions.Logging.AzureAppServices (1)
Microsoft.Extensions.Logging.EventSource (1)
Microsoft.Extensions.Logging.Generators (10)
Microsoft.Extensions.ObjectPool.Tests (2)
Microsoft.Extensions.Options (8)
Microsoft.Extensions.Options.Contextual (1)
Microsoft.Extensions.Options.DataAnnotations (4)
Microsoft.Extensions.Options.SourceGeneration (11)
Microsoft.Extensions.Primitives (1)
Microsoft.Extensions.SecretManager.Tools.Tests (5)
Microsoft.Extensions.ServiceDiscovery (5)
Microsoft.Extensions.ServiceDiscovery.Dns (13)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (4)
Microsoft.Extensions.ServiceDiscovery.Tests (1)
Microsoft.Extensions.ServiceDiscovery.Yarp (3)
Microsoft.Extensions.Telemetry (8)
Microsoft.Extensions.Telemetry.Abstractions (4)
Microsoft.Extensions.Telemetry.Abstractions.Tests (1)
Microsoft.Extensions.Telemetry.Tests (17)
Microsoft.Extensions.TimeProvider.Testing.Tests (4)
Microsoft.Extensions.Validation (1)
Microsoft.Extensions.Validation.GeneratorTests (1)
Microsoft.Extensions.Validation.Tests (2)
Microsoft.Extensions.Validation.ValidationsGenerator (3)
Microsoft.Gen.BuildMetadata (2)
Microsoft.Gen.BuildMetadata.Unit.Tests (5)
Microsoft.Gen.ComplianceReports (2)
Microsoft.Gen.ComplianceReports.Unit.Tests (5)
Microsoft.Gen.ContextualOptions (1)
Microsoft.Gen.ContextualOptions.Unit.Tests (6)
Microsoft.Gen.Logging (5)
Microsoft.Gen.Logging.Unit.Tests (7)
Microsoft.Gen.MetadataExtractor (7)
Microsoft.Gen.MetadataExtractor.Unit.Tests (5)
Microsoft.Gen.Metrics (7)
Microsoft.Gen.Metrics.Unit.Tests (10)
Microsoft.Gen.MetricsReports (5)
Microsoft.Gen.MetricsReports.Unit.Tests (5)
Microsoft.Interop.ComInterfaceGenerator (13)
Microsoft.Interop.JavaScript.JSImportGenerator (5)
Microsoft.Interop.LibraryImportGenerator (12)
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
Microsoft.Interop.SourceGeneration (9)
Microsoft.Maui (27)
Microsoft.Maui.Controls (159)
Microsoft.Maui.Controls.BindingSourceGen (7)
Microsoft.Maui.Controls.Build.Tasks (23)
Microsoft.Maui.Controls.Foldable (1)
Microsoft.Maui.Controls.SourceGen (9)
Microsoft.Maui.Controls.Xaml (19)
Microsoft.Maui.Essentials (15)
Microsoft.Maui.Graphics (25)
Microsoft.Maui.Graphics.Skia (1)
Microsoft.Maui.Graphics.Text.Markdig (1)
Microsoft.Maui.Maps (1)
Microsoft.Maui.Resizetizer (7)
Microsoft.ML.AutoML (63)
Microsoft.ML.AutoML.Interactive (5)
Microsoft.ML.AutoML.SourceGenerator (5)
Microsoft.ML.AutoML.Tests (35)
InferredPipelineTests.cs (19)
28var transforms1 = new List<SuggestedTransform>();
29var transforms2 = new List<SuggestedTransform>();
30var inferredPipeline1 = new SuggestedPipeline(transforms1, new List<SuggestedTransform>(), trainer1, context, false);
31var inferredPipeline2 = new SuggestedPipeline(transforms2, new List<SuggestedTransform>(), trainer2, context, false);
35var hyperparams1 = new ParameterSet(new List<IParameterValue>() { new LongParameterValue("NumberOfLeaves", 2) });
38inferredPipeline1 = new SuggestedPipeline(transforms1, new List<SuggestedTransform>(), trainer1, context, false);
39inferredPipeline2 = new SuggestedPipeline(transforms2, new List<SuggestedTransform>(), trainer2, context, false);
43hyperparams1 = new ParameterSet(new List<IParameterValue>() { new LongParameterValue("NumberOfLeaves", 2) });
44var hyperparams2 = new ParameterSet(new List<IParameterValue>() { new LongParameterValue("NumberOfLeaves", 6) });
47inferredPipeline1 = new SuggestedPipeline(transforms1, new List<SuggestedTransform>(), trainer1, context, false);
48inferredPipeline2 = new SuggestedPipeline(transforms2, new List<SuggestedTransform>(), trainer2, context, false);
54transforms1 = new List<SuggestedTransform>() { ColumnConcatenatingExtension.CreateSuggestedTransform(context, new[] { "In" }, "Out") };
55transforms2 = new List<SuggestedTransform>() { ColumnConcatenatingExtension.CreateSuggestedTransform(context, new[] { "In" }, "Out") };
56inferredPipeline1 = new SuggestedPipeline(transforms1, new List<SuggestedTransform>(), trainer1, context, false);
57inferredPipeline2 = new SuggestedPipeline(transforms2, new List<SuggestedTransform>(), trainer2, context, false);
63transforms1 = new List<SuggestedTransform>() { ColumnConcatenatingExtension.CreateSuggestedTransform(context, new[] { "In" }, "Out") };
64transforms2 = new List<SuggestedTransform>() { ColumnConcatenatingExtension.CreateSuggestedTransform(context, new[] { "In" }, "Out") };
65inferredPipeline1 = new SuggestedPipeline(transforms1, new List<SuggestedTransform>(), trainer1, context, false);
66inferredPipeline2 = new SuggestedPipeline(transforms2, new List<SuggestedTransform>(), trainer2, context, false);
Microsoft.ML.CodeGenerator (16)
Microsoft.ML.CodeGenerator.Tests (19)
ApprovalTests\ConsoleCodeGeneratorTests.cs (9)
602var hyperparams1 = new Microsoft.ML.AutoML.ParameterSet(new List<Microsoft.ML.AutoML.IParameterValue>() { new LongParameterValue("NumLeaves", 2) });
604var transforms1 = new List<SuggestedTransform>() { ColumnConcatenatingExtension.CreateSuggestedTransform(context, new[] { "In" }, "Out") };
605var inferredPipeline1 = new SuggestedPipeline(transforms1, new List<SuggestedTransform>(), trainer1, context, true);
639var hyperparams1 = new Microsoft.ML.AutoML.ParameterSet(new List<Microsoft.ML.AutoML.IParameterValue>() { new LongParameterValue("NumLeaves", 2) });
641var transforms1 = new List<SuggestedTransform>() { ColumnConcatenatingExtension.CreateSuggestedTransform(context, new[] { "In" }, "Out") };
642var inferredPipeline1 = new SuggestedPipeline(transforms1, new List<SuggestedTransform>(), trainer1, context, true);
1097var hyperparams1 = new Microsoft.ML.AutoML.ParameterSet(new List<Microsoft.ML.AutoML.IParameterValue>() { new LongParameterValue("NumLeaves", 2) });
1099var transforms1 = new List<SuggestedTransform>() { ColumnConcatenatingExtension.CreateSuggestedTransform(context, new[] { "In" }, "Out") };
1100var inferredPipeline1 = new SuggestedPipeline(transforms1, new List<SuggestedTransform>(), trainer1, context, true);
Microsoft.ML.Core (37)
Microsoft.ML.Core.Tests (11)
Microsoft.ML.Data (258)
Microsoft.ML.DataView (3)
Microsoft.ML.Ensemble (4)
Microsoft.ML.EntryPoints (37)
Microsoft.ML.FastTree (97)
Microsoft.ML.GenAI.Core (3)
Microsoft.ML.GenAI.Core.Tests (3)
Microsoft.ML.GenAI.LLaMA (4)
Microsoft.ML.GenAI.LLaMA.Tests (1)
Microsoft.ML.GenAI.Mistral (3)
Microsoft.ML.GenAI.Mistral.Tests (2)
Microsoft.ML.GenAI.Phi (3)
Microsoft.ML.GenAI.Samples (2)
Microsoft.ML.IntegrationTests (1)
Microsoft.ML.InternalCodeAnalyzer (1)
Microsoft.ML.KMeansClustering (1)
Microsoft.ML.LightGbm (11)
Microsoft.ML.Maml (3)
Microsoft.ML.Mkl.Components (2)
Microsoft.ML.OnnxConverter (7)
Microsoft.ML.OnnxTransformer (4)
Microsoft.ML.OnnxTransformerTest (6)
Microsoft.ML.Parquet (3)
Microsoft.ML.PerformanceTests (5)
Microsoft.ML.Predictor.Tests (17)
Microsoft.ML.Recommender (3)
Microsoft.ML.ResultProcessor (15)
Microsoft.ML.Samples (81)
Microsoft.ML.Samples.OneDal (3)
Microsoft.ML.SamplesUtils (4)
Microsoft.ML.SearchSpace (3)
Microsoft.ML.StandardTrainers (21)
Microsoft.ML.Sweeper (28)
Microsoft.ML.Sweeper.Tests (13)
Microsoft.ML.TensorFlow (1)
Microsoft.ML.TensorFlow.Tests (9)
Microsoft.ML.TestFramework (13)
Microsoft.ML.TestFrameworkCommon (1)
Microsoft.ML.Tests (88)
OnnxConversionTest.cs (19)
185List<IEstimator<ITransformer>> estimators = new List<IEstimator<ITransformer>>()
223List<IEstimator<ITransformer>> estimators = new List<IEstimator<ITransformer>>()
281List<IEstimator<ITransformer>> estimators = new List<IEstimator<ITransformer>>()
415var samples = new List<DataPoint>()
506ctx.AddInitializer(new List<float> { 9.4f, 1.7f, 3.6f }, new List<long> { 1, 3 }, "floats");
507ctx.AddInitializer(new List<long> { 94L, 17L, 36L }, new List<long> { 1, 3 }, "int64s");
508ctx.AddInitializer(new List<string> { "94", "17", "36" }, new List<long> { 1, 3 }, "strings");
1154var samples = new List<DataPoint>()
1243List<IEstimator<ITransformer>> pipelines = new List<IEstimator<ITransformer>>();
1439var samples = new List<TextData>()
1466var samples = new List<TextData>()
1546var samples = new List<TextData>()
1570var samples = new List<TextData>()
1649List<IEstimator<ITransformer>> estimators = new List<IEstimator<ITransformer>>()
1934List<IEstimator<ITransformer>> estimators = new List<IEstimator<ITransformer>>()
1976List<IEstimator<ITransformer>> estimators = new List<IEstimator<ITransformer>>()
Transformers\ValueMappingTests.cs (23)
55var keys = new List<string>() { "foo", "bar", "test", "wahoo" };
56var values = new List<int>() { 1, 2, 3, 4 };
93var keys = new List<ReadOnlyMemory<char>>() { "foo".AsMemory(), "bar".AsMemory(), "test".AsMemory(), "wahoo".AsMemory() };
94var values = new List<int>() { 1, 2, 3, 4 };
139var keyValuePairs = new List<KeyValuePair<string, string>>() {
174IEnumerable<string> keys = new List<string>() { "foo", "bar", "test" };
175List<int[]> values = new List<int[]>() {
263IEnumerable<string> keys = new List<string>() { "foo", "bar", "test" };
264List<string[]> values = new List<string[]>() {
307var keys = new List<string>() { "foo", "bar", "test", "wahoo" };
308var values = new List<int>() { 1, 2, 3, 4 };
345var keys = new List<string>() { "foo", "foo" };
346var values = new List<int>() { 1, 2 };
364var keyValuePairs = new List<KeyValuePair<string, int>>() {
396var keyValuePairs = new List<KeyValuePair<string, string>>() {
430var keyValuePairs = new List<KeyValuePair<string, uint>>() {
471var keyValuePairs = new List<KeyValuePair<string, ulong>>() {
512var keyValuePairs = new List<KeyValuePair<string, string>>() {
552var keyValuePairs = new List<KeyValuePair<string, string>>() {
594var keyValuePairs = new List<KeyValuePair<string, int>>() {
613var keyValuePairs = new List<KeyValuePair<string, int[]>>() {
633var keyValuePairs = new List<KeyValuePair<ReadOnlyMemory<char>, int>>() {
687var keyValuePairs = new List<KeyValuePair<string, int>>() {
Microsoft.ML.TimeSeries (47)
Microsoft.ML.TimeSeries.Tests (43)
TimeSeriesDirectApi.cs (20)
112List<Data> data = new List<Data>(size);
134List<double> expectedValues = new List<double>() { 0, 5, 0.5, 5.1200000000000114E-08, 0, 5, 0.4999999995, 5.1200000046080209E-08, 0, 5, 0.4999999995, 5.1200000092160303E-08,
157List<Data> data = new List<Data>();
187List<double> expectedValues = new List<double>() { 0, -3.31410551071167, 0.5, 5.12000000000001E-08, 0, 1.570083498954773, 5.2001145245395008E-07,
213List<Data> data = new List<Data>();
289List<Data> data = new List<Data>();
359List<Data> data = new List<Data>();
394List<float> expectedForecast = new List<float>() { 0.191492021f, 2.53994060f, 5.26454258f, 7.37313938f };
395List<float> minCnf = new List<float>() { -3.9741986f, -2.36872721f, 0.09407699f, 2.18899393f };
396List<float> maxCnf = new List<float>() { 4.3571825f, 7.4486084f, 10.435008f, 12.5572853f };
422List<Data> data = new List<Data>();
546var data = new List<TimeSeriesData>();
602data = new List<TimeSeriesDataDouble>();
958var rootCauseLocalizationInput = new RootCauseLocalizationInput(GetRootCauseTimestamp(), GetRootCauseAnomalyDimension("UK", _rootCauseAggSymbol), new List<MetricSlice>() { new MetricSlice(GetRootCauseTimestamp(), GetRootCauseLocalizationPoints(_rootCauseAggSymbol)) }, AggregateType.Sum, _rootCauseAggSymbol);
985var rootCauseLocalizationInput = new RootCauseLocalizationInput(GetRootCauseTimestamp(), GetRootCauseAnomalyDimension("UK", _rootCauseAggSymbol), new List<MetricSlice>() { new MetricSlice(GetRootCauseTimestamp(), GetRootCauseLocalizationPoints(_rootCauseAggSymbol)) }, AggregateType.Sum, _rootCauseAggSymbol);
1031List<MetricSlice> slice = new List<MetricSlice>
1085List<TimeSeriesPoint> points = new List<TimeSeriesPoint>();
1181List<MetricSlice> slice = new List<MetricSlice>
1215List<MetricSlice> slice = new List<MetricSlice>
1229List<TimeSeriesPoint> points = new List<TimeSeriesPoint>();
TimeSeriesSimpleApiTests.cs (8)
43var data = new List<Data>(size);
62List<double> expectedValues = new List<double>() { 0, 5, 0.5, 5.1200000000000114E-08, 0, 5, 0.4999999995, 5.1200000046080209E-08, 0, 5, 0.4999999995, 5.1200000092160303E-08,
85var data = new List<Data>();
105List<double> expectedValues = new List<double>() { 0, -3.31410598754883, 0.5, 5.12000000000001E-08, 0, 1.5700820684432983, 5.2001145245395008E-07,
128List<Data> data = new List<Data>(size);
145var expectedValues = new List<double[]>() {
180List<Data> data = new List<Data>(size);
197var expectedValues = new List<double[]>() {
Microsoft.ML.Tokenizers (38)
Microsoft.ML.Tokenizers.Data.Tests (2)
Microsoft.ML.Tokenizers.Tests (36)
TiktokenTests.cs (13)
148Assert.Equal(new List<int>() { 9906, 4435 }, encoded);
160Assert.Equal(new List<Range> { new Range(0, 5), new Range(5, 11) }, offsets);
201Assert.Equal(new List<int>() { 100264, 9906, 4435, 100265 }, encoded);
214Assert.Equal(new List<(int, int)> { (0, 12), (12, 5), (17, 6), (23, 10) }, offsets);
244Assert.Equal(new List<int>() { 100264, 9906, 100265, 4435 }, encoded);
257Assert.Equal(new List<(int, int)> { (0, 12), (12, 5), (17, 10), (27, 6) }, offsets);
279Assert.Equal(new List<int>() { 100264, 9906, 2928, 99834, 4435, 100265 }, encoded);
287Assert.Equal(new List<(int, int)> { (0, 12), (12, 5), (17, 2), (18, 1), (19, 6), (25, 10) }, result.Select(token => (token.Offset.Start.Value, token.Offset.End.Value - token.Offset.Start.Value)).ToArray());
315Assert.Equal(new List<int>() { 199999, 13225, 161181, 5922, 200018 }, encoded);
324Assert.Equal(new List<(int, int)> { (0, 13), (13, 5), (18, 2), (20, 6), (26, 15) }, result.Select(token => (token.Offset.Start.Value, token.Offset.End.Value - token.Offset.Start.Value)).ToArray());
799Assert.Equal(new List<int>() { 100264, 9906, 100266, 4435, 100265, 100349 }, encoded);
837new List<int> { 199998, 200006, 200008, 13225, 5922, 200007, 199999 },
844Assert.Equal(new List<(int, int)> { (0, 15), (15, 24), (24, 35), (35, 40), (40, 46), (46, 53), (53, 66) },
UnigramTests.cs (4)
500IReadOnlyList<int> ids2 = index < normalized.Length ? _unigramTokenizer.EncodeToIds(normalized!.Substring(index), addBeginningOfSentence: false, addEndOfSentence: false, considerNormalization: false) : new List<int>();
506ids2 = index < normalized.Length ? _unigramTokenizer.EncodeToIds(normalized!.Substring(index).AsSpan(), addBeginningOfSentence: false, addEndOfSentence: false, considerNormalization: false) : new List<int>();
512ids2 = index < normalized.Length ? _unigramTokenizer.EncodeToIds(normalized!.Substring(index), addBeginningOfSentence: false, addEndOfSentence: false, considerNormalization: false) : new List<int>();
518ids2 = index < normalized.Length ? _unigramTokenizer.EncodeToIds(normalized!.Substring(index).AsSpan(), addBeginningOfSentence: false, addEndOfSentence: false, considerNormalization: false) : new List<int>();
Microsoft.ML.TorchSharp (79)
AutoFormerV2\AutoFormerV2Backbone.cs (7)
60embedChannels ??= new List<int>() { 96, 192, 384, 576 };
61depths ??= new List<int>() { 2, 2, 6, 2 };
62numHeads ??= new List<int>() { 3, 6, 12, 18 };
63windowSizes ??= new List<int>() { 7, 7, 14, 7 };
64outIndices ??= new List<int>() { 1, 2, 3 };
72var dpr = new List<double>();
121var outs = new List<Tensor>();
AutoFormerV2\BasicLayer.cs (2)
69List<int> hSlicesStartAndEnd = new List<int>() { 0, hp - this.windowSize, hp - this.windowSize, hp - this.shiftSize, hp - this.shiftSize, hp };
70List<int> wSlicesStartAndEnd = new List<int>() { 0, wp - this.windowSize, wp - this.windowSize, wp - this.shiftSize, wp - this.shiftSize, wp };
AutoFormerV2\ObjectDetectionTrainer.cs (12)
84public List<int> Steps = new List<int> { 6 };
218embedChannels: new List<int>() { 64, 128, 256, 448 },
219depths: new List<int>() { 2, 2, 6, 2 },
220numHeads: new List<int>() { 2, 4, 8, 14 },
377List<Tensor> part = new List<Tensor>();
446var metadata = new List<SchemaShape.Column>();
450var scoreMetadata = new List<SchemaShape.Column>();
551var scoreMetadata = new List<SchemaShape.Column>();
689embedChannels: new List<int>() { 64, 128, 256, 448 },
690depths: new List<int>() { 2, 2, 6, 2 },
691numHeads: new List<int>() { 2, 4, 8, 14 },
911var part = new List<Tensor>();
NasBert\Modules\MultiHeadAttention.cs (7)
206k = torch.cat(new List<torch.Tensor> { k, kRepeat }, dim: 0);
207v = torch.cat(new List<torch.Tensor> { v, vRepeat }, dim: 0);
224: torch.cat(new List<torch.Tensor> { prevKey, k }, dim: 1);
232: torch.cat(new List<torch.Tensor> { prevValue, v }, dim: 1);
258k = torch.cat(new List<torch.Tensor> { k, kZeros }, dim: 1);
259v = torch.cat(new List<torch.Tensor> { v, vZeros }, dim: 1);
310return torch.cat(new List<torch.Tensor> { tensor, zeros }, dim: 1);
Utils\ImageUtils.cs (6)
49var finalResult = new[] { new List<Tensor>(), new List<Tensor>(), new List<Tensor>() };
119var keep = new List<long>();
191new List<Tensor> { predBoxesX1, predBoxesY1, predBoxesX2, predBoxesY2 },
220new List<Tensor> { clippedBoxesX0, clippedBoxesY0, clippedBoxesX1, clippedBoxesY1 },
Microsoft.ML.TorchSharp.Tests (9)
Microsoft.ML.Transforms (82)
Microsoft.ML.Vision (4)
Microsoft.Net.Http.Headers (6)
Microsoft.Net.Http.Headers.Tests (6)
Microsoft.NET.StringTools (1)
Microsoft.NET.StringTools.net35 (1)
Microsoft.Private.Windows.Core (3)
Microsoft.VisualBasic.Core (18)
Microsoft.VisualStudio.Extensibility.Testing.Xunit (2)
Microsoft.VisualStudio.LanguageServices (51)
GenerateType\GenerateTypeDialog.xaml.cs (5)
51new InputGestureCollection(new List<InputGesture> { new KeyGesture(Key.A, ModifierKeys.Alt) })),
58new InputGestureCollection(new List<InputGesture> { new KeyGesture(Key.K, ModifierKeys.Alt) })),
65new InputGestureCollection(new List<InputGesture> { new KeyGesture(Key.P, ModifierKeys.Alt) })),
72new InputGestureCollection(new List<InputGesture> { new KeyGesture(Key.C, ModifierKeys.Alt) })),
79new InputGestureCollection(new List<InputGesture> { new KeyGesture(Key.X, ModifierKeys.Alt) })),
Telemetry\CodeMarkerLogger.cs (23)
21{ FunctionId.NavigateTo_Search, new List<Tuple<CodeMarkerId, CodeMarkerId>>()
27{ FunctionId.Rename_InlineSession, new List<Tuple<CodeMarkerId, CodeMarkerId>>()
32{ FunctionId.Rename_FindLinkedSpans, new List<Tuple<CodeMarkerId, CodeMarkerId>>()
37{ FunctionId.WinformDesigner_GenerateXML, new List<Tuple<CodeMarkerId, CodeMarkerId>>()
42{ FunctionId.BackgroundCompiler_BuildCompilationsAsync, new List<Tuple<CodeMarkerId, CodeMarkerId>>()
48{ FunctionId.FindReference, new List<Tuple<CodeMarkerId, CodeMarkerId>>()
53{ FunctionId.SmartTags_SmartTagInitializeFixes, new List<Tuple<CodeMarkerId, CodeMarkerId>>()
58{ FunctionId.SmartTags_ApplyQuickFix, new List<Tuple<CodeMarkerId, CodeMarkerId>>()
64{ FunctionId.LineCommit_CommitRegion, new List<Tuple<CodeMarkerId, CodeMarkerId>>()
69{ FunctionId.Tagger_Outlining_TagProducer_ProduceTags, new List<Tuple<CodeMarkerId, CodeMarkerId>>()
74{ FunctionId.Tagger_LineSeparator_TagProducer_ProduceTags, new List<Tuple<CodeMarkerId, CodeMarkerId>>()
79{ FunctionId.NavigationBar_ComputeModelAsync, new List<Tuple<CodeMarkerId, CodeMarkerId>>()
84{ FunctionId.Completion_ModelComputer_DoInBackground, new List<Tuple<CodeMarkerId, CodeMarkerId>>()
90{ FunctionId.SignatureHelp_ModelComputation_UpdateModelInBackground, new List<Tuple<CodeMarkerId, CodeMarkerId>>()
95{ FunctionId.Formatting_Format, new List<Tuple<CodeMarkerId, CodeMarkerId>>()
100{ FunctionId.Formatting_ApplyResultToBuffer, new List<Tuple<CodeMarkerId, CodeMarkerId>>()
105{ FunctionId.SmartTags_RefreshSession, new List<Tuple<CodeMarkerId, CodeMarkerId>>()
116{ FunctionId.Rename_InlineSession, new List<CodeMarkerId>() { CodeMarkerEvent.perfVBRenameSymbolEnd } },
117{ FunctionId.BackgroundCompiler_BuildCompilationsAsync, new List<CodeMarkerId>() { CodeMarkerEvent.perfVBCompilerReachedBoundState, CodeMarkerEvent.perfVBCompilerReachedCompiledState } },
118{ FunctionId.Completion_ModelComputer_DoInBackground, new List<CodeMarkerId>() { CodeMarkerEvent.perfVBIntelliXMLIndexingEnd } },
119{ FunctionId.WorkCoordinator_AsyncWorkItemQueue_FirstItem, new List<CodeMarkerId>() { CodeMarkerEvent.perfVBCompilerRegisterDesignViewAttributeBegin, CodeMarkerEvent.perfVBCompilerCommitBegin } },
120{ FunctionId.WorkCoordinator_AsyncWorkItemQueue_LastItem, new List<CodeMarkerId>() { CodeMarkerEvent.perfVBCompilerRegisterDesignViewAttributeEnd, CodeMarkerEvent.perfVBCompilerCommitEnd } },
121{ FunctionId.Snippet_OnAfterInsertion, new List<CodeMarkerId>() { CodeMarkerEvent.perfVBInsertSnippetEnd } }
Microsoft.VisualStudio.LanguageServices.CSharp (16)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (6)
Microsoft.VisualStudio.LanguageServices.Implementation (9)
Microsoft.VisualStudio.LanguageServices.LiveShare (1)
Microsoft.VisualStudio.LanguageServices.Xaml (1)
MilvusPlayground.ApiService (4)
MinimalValidationSample (1)
MSBuild (21)
Mvc.Api.Analyzers.Test (5)
MyFrontend (2)
Nats.ApiService (1)
OrderProcessor (2)
PathSchemeSelection (1)
PrepareTests (2)
PresentationBuildTasks (26)
PresentationCore (351)
PresentationCore.Tests (1)
PresentationFramework (546)
System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (14)
1795new List<Type>() { typeof(System.Type) },
1885new List<Type>() { typeof(System.String) },
2828new List<Type>() { typeof(System.Object) },
2974new List<Type>() { typeof(System.Type), typeof(System.Object) },
3356new List<Type>() { typeof(System.Object) },
4352new List<Type>() { typeof(System.Object) },
9167new List<Type>() { typeof(System.Windows.Data.RelativeSourceMode) },
9174new List<Type>() { typeof(System.Windows.Data.RelativeSourceMode), typeof(System.Type), typeof(System.Int32) },
10451new List<Type>() { typeof(System.String) },
10472new List<Type>() { typeof(System.Object) },
10956new List<Type>() { typeof(System.Windows.DependencyProperty) },
11196new List<Type>() { typeof(System.String) },
11828new List<Type>() { typeof(System.Type) },
13165new List<Type>() { typeof(System.Object) },
PresentationFramework.Aero (1)
PresentationFramework.Aero2 (1)
PresentationFramework.AeroLite (1)
PresentationFramework.Classic (1)
PresentationFramework.Fluent.Tests (4)
PresentationFramework.Luna (1)
PresentationFramework.Royale (1)
PresentationUI (24)
Publishers.AppHost (1)
QuarantineTools.Tests (6)
RazorBuildWebSite (1)
ReachFramework (38)
Replay (4)
RepoTasks (12)
Roslyn.Diagnostics.Analyzers (39)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
86var result = new List<ITypeSymbol>
Roslyn.Diagnostics.CSharp.Analyzers (13)
Roslyn.Test.PdbUtilities (5)
Roslyn.VisualStudio.DiagnosticsWindow (2)
Roslyn.VisualStudio.Next.UnitTests (4)
RoutingSandbox (6)
RoutingWebSite (1)
RunTests (18)
SampleStartups (1)
SemanticSearch.BuildTask (9)
SemanticSearch.BuildTask.UnitTests (8)
Shared (1)
Shared.Tests (14)
SignalR.Client.FunctionalTestApp (1)
SignalRSamples (1)
Sockets.BindTests (4)
Sockets.FunctionalTests (6)
StaticFilesAuth (2)
Stress.ApiService (4)
Stress.AppHost (7)
Stress.TelemetryService (1)
Swaggatherer (12)
System.CodeDom (2)
System.Collections (4)
System.Collections.Concurrent (3)
System.Collections.Immutable (7)
System.ComponentModel.Annotations (5)
System.ComponentModel.Composition (58)
System.ComponentModel.Composition.Registration (18)
System\ComponentModel\Composition\Registration\PartBuilder.cs (10)
13private static readonly List<Attribute> s_importingConstructorList = new List<Attribute>() { new ImportingConstructorAttribute() };
39_typeExportBuilders = new List<ExportBuilder>();
40_propertyExports = new List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportBuilder>, Type>>();
41_propertyImports = new List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ImportBuilder>, Type>>();
42_interfaceExports = new List<Tuple<Predicate<Type>, Action<Type, ExportBuilder>>>();
188_metadataItems ??= new List<Tuple<string, object>>();
196_metadataItemFuncs ??= new List<Tuple<string, Func<Type, object>>>();
225var attributes = new List<Attribute>();
388configuredMembers ??= new List<Tuple<object, List<Attribute>>>();
503configuredMembers ??= new List<Tuple<object, List<Attribute>>>();
System.ComponentModel.TypeConverter (16)
System.Composition.Convention (21)
System\Composition\Convention\PartConventionBuilder.cs (12)
18private static readonly List<Attribute> s_importingConstructorList = new List<Attribute>() { new ImportingConstructorAttribute() };
43_typeExportBuilders = new List<ExportConventionBuilder>();
44_propertyExports = new List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportConventionBuilder>, Type>>();
45_propertyImports = new List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ImportConventionBuilder>>>();
46_interfaceExports = new List<Tuple<Predicate<Type>, Action<Type, ExportConventionBuilder>>>();
47_methodImportsSatisfiedNotifications = new List<Predicate<MethodInfo>>();
373_metadataItems ??= new List<Tuple<string, object>>();
394_metadataItemFuncs ??= new List<Tuple<string, Func<Type, object>>>();
422var attributes = new List<Attribute>();
579configuredMembers ??= new List<Tuple<object, List<Attribute>>>();
646var onImportsSatisfiedAttributeList = new List<Attribute>
748configuredMembers ??= new List<Tuple<object, List<Attribute>>>();
System.Composition.Hosting (5)
System.Composition.TypedParts (9)
System.Configuration.ConfigurationManager (7)
System.Console (2)
System.Data.Common (53)
System.Data.Odbc (12)
System.Diagnostics.DiagnosticSource (23)
System.Diagnostics.Process (11)
System.Diagnostics.TraceSource (7)
System.Formats.Asn1 (1)
System.Formats.Cbor (4)
System.Formats.Nrbf (3)
System.Formats.Tar (1)
System.IO.Compression (4)
System.IO.FileSystem.DriveInfo (2)
System.IO.FileSystem.Watcher (3)
System.IO.Packaging (10)
System.IO.Pipelines (2)
System.IO.Ports (4)
System.Linq (24)
System.Linq.Expressions (33)
System.Linq.Parallel (7)
System.Linq.Queryable (2)
System.Memory (2)
System.Net.Http (21)
System.Net.HttpListener (17)
System.Net.Mail (4)
System.Net.NetworkInformation (12)
System.Net.Primitives (2)
System.Net.Quic (1)
System.Net.Requests (4)
System.Net.Security (3)
System.Net.Sockets (1)
System.Net.WebHeaderCollection (2)
System.Net.WebSockets.Client (1)
System.ObjectModel (3)
System.Private.CoreLib (114)
System.Private.CoreLib.Generators (2)
System.Private.DataContractSerialization (38)
System.Private.Windows.Core (3)
System.Private.Windows.Core.Tests (23)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (21)
67new List<bool> { false, true },
68new List<char> { char.MinValue, char.MaxValue },
69new List<byte> { byte.MinValue, byte.MaxValue },
70new List<sbyte> { sbyte.MinValue, sbyte.MaxValue },
71new List<short> { short.MinValue, short.MaxValue },
72new List<ushort> { ushort.MinValue, ushort.MaxValue },
73new List<int> { int.MinValue, int.MaxValue },
74new List<uint> { uint.MinValue, uint.MaxValue },
75new List<long> { long.MinValue, long.MaxValue },
76new List<ulong> { ulong.MinValue, ulong.MaxValue },
77new List<float> { float.MinValue, float.MaxValue },
78new List<double> { double.MinValue, double.MaxValue },
79new List<decimal> { decimal.MinValue, decimal.MaxValue },
80new List<DateTime> { DateTime.MinValue, DateTime.MaxValue },
81new List<TimeSpan> { TimeSpan.MinValue, TimeSpan.MaxValue },
82new List<string> { "a", "b", "c" }
156new List<object>(),
157new List<nint>(),
158new List<(int, int)>(),
159new List<nint> { nint.MinValue, nint.MaxValue },
160new List<nuint> { nuint.MinValue, nuint.MaxValue }
System\TypeExtensionsTests.cs (2)
114{ new List<int>(), ["System.Collections.Generic.List`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"] },
116new List<MyClass>(),
System.Private.Xml (170)
System.Private.Xml.Linq (4)
System.Reflection.Context (8)
System.Reflection.DispatchProxy (2)
System.Reflection.Emit (43)
System.Reflection.Metadata (50)
System.Reflection.MetadataLoadContext (12)
System.Resources.Extensions (1)
System.Resources.Writer (1)
System.Runtime.Caching (3)
System.Runtime.Serialization.Formatters (2)
System.Runtime.Serialization.Schema (3)
System.Security.Claims (4)
System.Security.Cryptography (46)
System.Security.Cryptography.Cose (1)
System.Security.Cryptography.Pkcs (39)
System.Security.Cryptography.Xml (2)
System.Security.Permissions (1)
System.ServiceModel.Federation (2)
System.ServiceModel.Federation.Tests (1)
System.ServiceModel.NetFramingBase (8)
System.ServiceModel.NetNamedPipe (1)
System.ServiceModel.Primitives (117)
System.ServiceModel.Primitives.Tests (26)
System.ServiceModel.Syndication (2)
System.Text.Json (29)
System.Text.Json.SourceGeneration (11)
System.Text.RegularExpressions (29)
System.Text.RegularExpressions.Generator (15)
System.Threading.Channels (1)
System.Threading.RateLimiting (7)
System.Threading.Tasks.Dataflow (13)
System.Threading.Tasks.Parallel (1)
System.Windows.Controls.Ribbon (26)
System.Windows.Forms (30)
System.Windows.Forms.Design (32)
System.Windows.Forms.Design.Tests (17)
System.Windows.Forms.Primitives.Tests (2)
System.Windows.Forms.Tests (67)
System.Windows.Forms.UI.IntegrationTests (1)
System.Windows.Input.Manipulations (1)
System.Xaml (87)
System.Xaml.Tests (7)
Templates.Blazor.Tests (18)
Templates.Blazor.WebAssembly.Auth.Tests (17)
Templates.Blazor.WebAssembly.Tests (17)
Templates.Mvc.Tests (23)
Templates.Tests (18)
Test.Utilities (31)
TestPassApp (1)
Text.Analyzers (39)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
86var result = new List<ITypeSymbol>
UIAutomationClientSideProviders (4)
UnitTests.Common (1)
vbc (3)
VBCSCompiler (10)
VBCSCompiler.UnitTests (11)
Wasm.Performance.ConsoleHost (7)
Wasm.Performance.Driver (3)
Wasm.Performance.TestApp (3)
WindowsBase.Tests (81)
System\Windows\DependencyPropertyTests.cs (24)
60yield return new object?[] { "Register_String_Type_Type_PropertyMetadata_TestData18", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new List<int>() }, new List<int>() };
112yield return new object?[] { "Register_String_Type_Type_Validate_TestData18", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new List<int>() }, new List<int>(), 2 };
172yield return new object?[] { "Register_String_Type_Type_PropertyMetadata_NullValidate_TestData18", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new List<int>() }, new List<int>() };
371yield return new object?[] { "RegisterAttached_String_Type_Type_PropertyMetadata_TestData18", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new List<int>() }, new List<int>() };
425yield return new object?[] { "RegisterAttached_String_Type_Type_Validate_TestData18", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new List<int>() }, new List<int>() };
485yield return new object?[] { "RegisterAttached_String_Type_Type_PropertyMetadata_NullValidate_TestData18", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new List<int>() }, new List<int>() };
647yield return new object?[] { "RegisterReadOnly_String_Type_Type_PropertyMetadata_TestData18", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new List<int>() }, new List<int>() };
703yield return new object?[] { "RegisterReadOnly_String_Type_Type_Validate_TestData18", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new List<int>() }, new List<int>(), 2 };
767yield return new object?[] { "RegisterReadOnly_String_Type_Type_PropertyMetadata_NullValidate_TestData18", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new List<int>() }, new List<int>() };
940yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_PropertyMetadata_TestData18", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new List<int>() }, new List<int>() };
998yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_Validate_TestData18", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new List<int>() }, new List<int>(), 1 };
1062yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_PropertyMetadata_NullValidate_TestData18", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new List<int>() }, new List<int>() };
System\Windows\Markup\Primitives\MarkupPropertyTests.cs (6)
87var instance = new List<int> { 1, 2, 3 };
181var list = new List<int> { 1, 2, 3 };
294var list = new List<int> { 1, 2, 3 };
451var instance = new List<int> { 1, 2, 3 };
474var list = new List<int> { 1, 2, 3 };
509var list = new List<int> { 1, 2, 3 };
WindowsFormsIntegration (2)
WinFormsControlsTest (1)
XmlFileLogger (5)
XmlFormattersWebSite (3)
xunit.assert (12)
xunit.console (21)
24615 references to List
Analyzer.Utilities.UnitTests (4)
AnalyzerRunner (5)
ApiExplorerWebSite (4)
aspire (397)
Mcp\Docs\LlmsTxtParser.cs (15)
85var docBoundaries = FindDocumentBoundaries(content);
91var documents = new List<LlmsDocument>(docBoundaries.Count);
117private static List<int> FindDocumentBoundaries(string content)
119var boundaries = new List<int>();
196var sections = ParseSections(docSpan);
296private static List<LlmsSection> ParseSections(ReadOnlySpan<char> docSpan)
298var sections = new List<LlmsSection>();
301var codeBlocks = FindCodeBlockRegions(docSpan);
304var sectionStarts = FindSectionHeadings(docSpan, codeBlocks);
338private static List<(int Start, int End)> FindCodeBlockRegions(ReadOnlySpan<char> content)
340var regions = new List<(int Start, int End)>();
380private static bool IsInsideCodeBlock(int position, List<(int Start, int End)> codeBlocks)
406private static List<(int Index, int Level, string Heading)> FindSectionHeadings(
408List<(int Start, int End)> codeBlocks)
410var sectionStarts = new List<(int Index, int Level, string Heading)>();
Projects\GuestAppHostProject.cs (11)
145private async Task<List<IntegrationReference>> GetIntegrationReferencesAsync(
151var integrations = config.GetIntegrationReferences(defaultSdkVersion, directory.FullName).ToList();
178List<IntegrationReference> integrations,
195var integrations = await GetIntegrationReferencesAsync(config, directory, cancellationToken);
314var integrations = await GetIntegrationReferencesAsync(config, directory, cancellationToken);
651var integrations = await GetIntegrationReferencesAsync(config, directory, cancellationToken);
923var updates = await _interactionService.ShowStatusAsync(
927var packageUpdates = new List<(string PackageId, string CurrentVersion, string NewVersion)>();
1084var integrationsList = integrations.ToList();
1122private static void SaveGenerationHash(string generatedPath, List<IntegrationReference> integrations)
1134private static string ComputeIntegrationsHash(List<IntegrationReference> integrations)
Projects\ProjectUpdater.cs (28)
44var updateStepsByProject = updateSteps
353var updatedSdks = new List<string>();
922var originalSources = ExtractPackageSources(originalDocument);
923var proposedSources = ExtractPackageSources(proposedDocument);
944private static List<PackageSourceInfo> ExtractPackageSources(XmlDocument? document)
946var sources = new List<PackageSourceInfo>();
973private static Dictionary<string, List<string>> ExtractPackageSourceMappings(XmlDocument? document)
975var mappings = new Dictionary<string, List<string>>();
992var patterns = new List<string>();
1014private static List<MappingChange> AnalyzeMappingChanges(Dictionary<string, List<string>> originalMappings, Dictionary<string, List<string>> proposedMappings)
1016var changes = new List<MappingChange>();
1023var originalPatterns = originalMappings.GetValueOrDefault(source, []);
1024var proposedPatterns = proposedMappings.GetValueOrDefault(source, []);
1026var addedPatterns = proposedPatterns.Except(originalPatterns).ToList();
1027var removedPatterns = originalPatterns.Except(proposedPatterns).ToList();
1049if (changes.ProposedMappings.TryGetValue(feed.Key, out var patterns))
1088if (changes.ProposedMappings.TryGetValue(feed.Key, out var currentPatterns))
1090var addedPatterns = mappingChangesBySource.TryGetValue(feed.Key, out var currentMappingChange) ? currentMappingChange.AddedPatterns : new List<string>();
1108internal record MappingChange(string SourceKey, List<string> AddedPatterns, List<string> RemovedPatterns);
1112public List<PackageSourceInfo> AddedFeeds { get; set; } = [];
1113public List<PackageSourceInfo> RemovedFeeds { get; set; } = [];
1114public List<PackageSourceInfo> RetainedFeeds { get; set; } = [];
1115public List<MappingChange> MappingChanges { get; set; } = [];
1116public Dictionary<string, List<string>> OriginalMappings { get; set; } = new();
1117public Dictionary<string, List<string>> ProposedMappings { get; set; } = new();
src\Shared\DashboardUrls.cs (5)
202public static string TelemetryLogsApiUrl(string baseUrl, List<string>? resources = null, params (string key, string? value)[] additionalParams)
215public static string TelemetrySpansApiUrl(string baseUrl, List<string>? resources = null, params (string key, string? value)[] additionalParams)
228public static string TelemetryTracesApiUrl(string baseUrl, List<string>? resources = null, params (string key, string? value)[] additionalParams)
261List<string>? resources,
264var parts = new List<string>();
Templating\DotNetTemplateFactory.cs (11)
262var extraArgs = new List<string>();
273var extraArgs = new List<string>();
282var extraArgs = new List<string>();
292var extraArgs = new List<string>();
302var extraArgs = new List<string>();
309private async Task PromptForDevLocalhostTldOptionAsync(ParseResult result, List<string> extraArgs, CancellationToken cancellationToken)
329private async Task PromptForRedisCacheOptionAsync(ParseResult result, List<string> extraArgs, CancellationToken cancellationToken)
349private async Task PromptForTestFrameworkOptionsAsync(ParseResult result, List<string> extraArgs, CancellationToken cancellationToken)
390private async Task PromptForXUnitVersionOptionsAsync(ParseResult result, List<string> extraArgs, CancellationToken cancellationToken)
667var packagesFromChannels = await interactionService.ShowStatusAsync(TemplatingStrings.SearchingForAvailableTemplateVersions, async () =>
669var results = new List<(NuGetPackage Package, PackageChannel Channel)>();
Aspire.Azure.AI.Inference (1)
Aspire.Azure.Messaging.EventHubs (3)
Aspire.Azure.Messaging.EventHubs.Tests (10)
Aspire.Azure.Messaging.ServiceBus (3)
Aspire.Azure.Messaging.WebPubSub (3)
Aspire.Azure.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (1)
Aspire.Azure.Npgsql.Tests (1)
Aspire.Azure.Security.KeyVault.Tests (10)
Aspire.Azure.Storage.Queues (3)
Aspire.Cli.EndToEnd.Tests (2)
Aspire.Cli.Tests (256)
Projects\ProjectLocatorTests.cs (11)
339var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None).DefaultTimeout();
364var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None).DefaultTimeout();
413var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None).DefaultTimeout();
440var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None).DefaultTimeout();
477var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None).DefaultTimeout();
879var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None).DefaultTimeout();
923var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None).DefaultTimeout();
952var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None).DefaultTimeout();
975var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None).DefaultTimeout();
996var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None).DefaultTimeout();
1021var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None).DefaultTimeout();
Projects\ProjectUpdaterTests.cs (30)
54var packages = new List<NuGetPackageCli>();
156var packagesAddsExecuted = new List<(FileInfo ProjectFile, string PackageId, string PackageVersion, string? PackageSource, bool NoRestore)>();
165var packages = new List<NuGetPackageCli>();
287var packagesAddsExecuted = new List<(FileInfo ProjectFile, string PackageId, string PackageVersion, string? PackageSource, bool NoRestore)>();
296var packages = new List<NuGetPackageCli>();
440var packagesAddsExecuted = new List<(FileInfo ProjectFile, string PackageId, string PackageVersion, string? PackageSource, bool NoRestore)>();
449var packages = new List<NuGetPackageCli>();
534var sharedProjectUpdates = packagesAddsExecuted.Where(p => p.ProjectFile.FullName == sharedProjectFile.FullName).ToList();
542var appHostUpdates = packagesAddsExecuted.Where(p => p.ProjectFile.FullName == appHostProjectFile.FullName).ToList();
599var updatedFiles = new List<string>();
609var packages = new List<NuGetPackageCli>();
728var packages = new List<NuGetPackageCli>();
830var packages = new List<NuGetPackageCli>();
964var packages = new List<NuGetPackageCli>();
1080var packages = new List<NuGetPackageCli>();
1201var packages = new List<NuGetPackageCli>();
1314var packages = new List<NuGetPackageCli>();
1410var packages = new List<NuGetPackageCli>();
1519var packages = new List<NuGetPackageCli>();
1604var packages = new List<NuGetPackageCli>();
1680var packages = new List<NuGetPackageCli>();
1764var packages = new List<NuGetPackageCli>();
1847var packages = new List<NuGetPackageCli>();
1927var packages = new List<NuGetPackageCli>();
2017var packages = new List<NuGetPackageCli>();
2096var packages = new List<NuGetPackageCli>();
2164var packagesUpdated = new List<string>();
2174var packages = new List<NuGetPackageCli>();
2292var packagesAddsExecuted = new List<(FileInfo ProjectFile, string PackageId, string PackageVersion, string? PackageSource, bool NoRestore)>();
2302var packages = new List<NuGetPackageCli>();
Aspire.Components.Common.TestUtilities (4)
Aspire.Confluent.Kafka (6)
Aspire.Confluent.Kafka.Tests (5)
Aspire.Dashboard (590)
Components\Controls\Chart\ChartBase.cs (27)
29private List<KeyValuePair<string, string>[]>? _renderedDimensionAttributes;
56public required List<OtlpResource> Resources { get; set; }
93var dimensionAttributes = InstrumentViewModel.MatchedDimensions.Select(d => d.Attributes).ToList();
124private (List<ChartTrace> Y, List<DateTimeOffset> X, List<ChartExemplar> Exemplars) CalculateHistogramValues(List<DimensionScope> dimensions, int pointCount, bool tickUpdate, DateTimeOffset inProgressDataTime, string yLabel)
133var xValues = new List<DateTimeOffset>();
134var exemplars = new List<ChartExemplar>();
216internal bool TryCalculateHistogramPoints(List<DimensionScope> dimensions, DateTimeOffset start, DateTimeOffset end, Dictionary<int, ChartTrace> traces, List<ChartExemplar> exemplars)
286private void AddExemplars(List<ChartExemplar> exemplars, MetricValueBase metric)
377private (List<ChartTrace> Y, List<DateTimeOffset> X, List<ChartExemplar> Exemplars) CalculateChartValues(List<DimensionScope> dimensions, int pointCount, bool tickUpdate, DateTimeOffset inProgressDataTime, string yLabel)
380var yValues = new List<double?>();
381var xValues = new List<DateTimeOffset>();
382var exemplars = new List<ChartExemplar>();
437private bool TryCalculatePoint(List<DimensionScope> dimensions, DateTimeOffset start, DateTimeOffset end, List<ChartExemplar> exemplars, out double pointValue)
497List<ChartTrace> traces;
498List<DateTimeOffset> xValues;
499List<ChartExemplar> exemplars;
529protected abstract Task OnChartUpdatedAsync(List<ChartTrace> traces, List<DateTimeOffset> xValues, List<ChartExemplar> exemplars, bool tickUpdate, DateTimeOffset inProgressDataTime, CancellationToken cancellationToken);
Configuration\EndpointInfo.cs (8)
11public static bool TryAddEndpoint(List<EndpointInfo> configuredEndpoints, BindingAddress? address, string name, HttpProtocols? httpProtocols, bool requireCertificate, ConnectionType connectionType)
22public static IEnumerable<KeyValuePair<BindingAddress, List<EndpointInfo>>> GroupEndpointsByAddress(IEnumerable<EndpointInfo> endpoints)
24var groups = new List<KeyValuePair<BindingAddress, List<EndpointInfo>>>();
25var map = new Dictionary<string, List<EndpointInfo>>();
34groups.Add(new KeyValuePair<BindingAddress, List<EndpointInfo>>(address, [endpoint]));
40if (!map.TryGetValue(key, out var list))
54groups.Add(new KeyValuePair<BindingAddress, List<EndpointInfo>>(address, kvp.Value));
Model\Assistant\AIHelpers.cs (6)
48internal static string GetResponseGraphJson(List<ResourceViewModel> resources, DashboardOptions options, bool includeDashboardUrl = false, Func<ResourceViewModel, string>? getResourceName = null, bool includeEnvironmentVariables = false)
54internal static string GetResponseGraphJson(List<ResourceViewModel> resources, string? dashboardBaseUrl, bool includeDashboardUrl = false, Func<ResourceViewModel, string>? getResourceName = null, bool includeEnvironmentVariables = false)
137static JsonArray GetResourceRelationshipsJson(List<ResourceViewModel> allResources, ResourceViewModel resourceViewModel, Func<ResourceViewModel, string>? getResourceName)
143var matches = allResources
296List<ChatMessage> chatMessages,
356var list = new List<ChatMessage>();
Model\Assistant\Prompts\KnownChatMessages.cs (5)
46public static ChatMessage CreateInitialMessage(string promptText, string applicationName, List<ResourceViewModel> resources, DashboardOptions dashboardOptions)
180public static ChatMessage CreateErrorStructuredLogsMessage(List<OtlpLogEntry> errorLogs, DashboardOptions options, Func<IOtlpResource, string> getResourceName)
287public static ChatMessage CreateAnalyzeTraceMessage(OtlpTrace trace, List<OtlpLogEntry> traceLogEntries, IEnumerable<IOutgoingPeerResolver> outgoingPeerResolvers, DashboardOptions options, Func<IOtlpResource, string> getResourceName)
314public static ChatMessage CreateAnalyzeSpanMessage(OtlpSpan span, List<OtlpLogEntry> traceLogEntries, IEnumerable<IOutgoingPeerResolver> outgoingPeerResolvers, DashboardOptions options, Func<IOtlpResource, string> getResourceName)
341public static ChatMessage CreateErrorTracesMessage(List<OtlpTrace> errorTraces, IEnumerable<IOutgoingPeerResolver> outgoingPeerResolvers, DashboardOptions options, Func<IOtlpResource, string> getResourceName)
Model\GenAI\GenAIVisualizerDialogViewModel.cs (23)
30public required Func<List<OtlpSpan>> GetContextGenAISpans { get; init; }
35public List<GenAIItemViewModel> Items { get; } = new List<GenAIItemViewModel>();
36public List<GenAIItemViewModel> InputMessages { get; private set; } = default!;
37public List<GenAIItemViewModel> OutputMessages { get; private set; } = default!;
39public List<ToolDefinitionViewModel> ToolDefinitions { get; private set; } = new();
40public List<EvaluationResultViewModel> Evaluations { get; private set; } = new();
55Func<List<OtlpSpan>> getContextGenAISpans)
57var resources = telemetryRepository.GetResources();
193private static bool AllMessagesHaveNoContent(List<GenAIItemViewModel> messageViewModels)
292var parts = instructionParts.Select(GenAIItemPartViewModel.CreateMessagePart).ToList();
313var logEntries = GetSpanLogEntries(telemetryRepository, viewModel.Span);
318var parts = DeserializeEventContent(index, type.Value, item.Message);
338var parts = DeserializeEventContent(index, type.Value, content);
360var viewParts = parts.Select(GenAIItemPartViewModel.CreateMessagePart).ToList();
406var parts = new List<GenAIItemPartViewModel>
433var parts = new List<GenAIItemPartViewModel>
488private static GenAIItemViewModel CreateMessage(GenAIVisualizerDialogViewModel viewModel, int currentIndex, GenAIItemType type, List<GenAIItemPartViewModel> parts, long? internalId)
501private static List<GenAIItemPartViewModel> DeserializeEventContent(int index, GenAIItemType type, string message)
503var messagePartViewModels = new List<GenAIItemPartViewModel>();
539static void ProcessAssistantEvent(List<GenAIItemPartViewModel> messagePartViewModels, AssistantEvent assistantEvent)
595private static List<OtlpLogEntry> GetSpanLogEntries(TelemetryRepository telemetryRepository, OtlpSpan span)
617var evaluations = new List<EvaluationResultViewModel>();
620var logEntries = GetSpanLogEntries(telemetryRepository, viewModel.Span);
Model\Otlp\SpanWaterfallViewModel.cs (13)
13public required List<SpanWaterfallViewModel> Children { get; init; }
20public required List<SpanLogEntryViewModel> SpanLogs { get; init; }
36public string GetTooltip(List<OtlpResource> allResources)
121public sealed record TraceDetailState(IOutgoingPeerResolver[] OutgoingPeerResolvers, List<string> CollapsedSpanIds, List<OtlpResource> AllResources);
123public static string GetTitle(OtlpSpan span, List<OtlpResource> allResources)
128public static List<SpanWaterfallViewModel> Create(OtlpTrace trace, List<OtlpLogEntry> logs, TraceDetailState state)
130var orderedSpans = new List<SpanWaterfallViewModel>();
136groupedLogs.TryGetValue(span.SpanId, out var spanLogs);
147static SpanWaterfallViewModel CreateViewModel(OtlpSpan span, int depth, bool hidden, TraceDetailState state, List<OtlpLogEntry>? spanLogs, ref int currentSpanLogIndex)
165var spanLogVms = new List<SpanLogEntryViewModel>();
216private static string? ResolveUninstrumentedPeerName(OtlpSpan span, IOutgoingPeerResolver[] outgoingPeerResolvers, List<OtlpResource> allResources)
Model\ResourceMenuBuilder.cs (10)
74List<MenuButtonItem> menuItems,
176private void AddUrlMenuItems(List<MenuButtonItem> menuItems, ResourceViewModel resource)
178var urls = ResourceUrlHelpers.GetUrls(resource, includeInternalUrls: false, includeNonEndpointUrls: true)
191var urlItems = new List<MenuButtonItem>();
233private void AddTelemetryMenuItems(List<MenuButtonItem> menuItems, ResourceViewModel resource, IDictionary<string, ResourceViewModel> resourceByName)
285private void AddCommandMenuItems(List<MenuButtonItem> menuItems, ResourceViewModel resource, EventCallback<CommandViewModel> commandSelected, Func<ResourceViewModel, CommandViewModel, bool> isCommandExecuting)
287var menuCommands = resource.Commands
296var highlightedMenuCommands = menuCommands.Where(c => c.IsHighlighted).ToList();
297var otherMenuCommands = menuCommands.Where(c => !c.IsHighlighted).ToList();
311var commands = new List<MenuButtonItem>();
Model\SpanDetailsViewModel.cs (8)
16public required List<TelemetryPropertyViewModel> Properties { get; init; }
17public required List<SpanLinkViewModel> Links { get; init; }
18public required List<SpanLinkViewModel> Backlinks { get; init; }
20public required List<OtlpResource> Resources { get; init; }
22public static SpanDetailsViewModel Create(OtlpSpan span, TelemetryRepository telemetryRepository, List<OtlpResource> resources)
28var entryProperties = span.GetKnownProperties().Select(CreateTelemetryProperty).ToList();
42var links = span.Links.Select(l => CreateLinkViewModel(l.TraceId, l.SpanId, l.Attributes, telemetryRepository, traceCache)).ToList();
43var backlinks = span.BackLinks.Select(l => CreateLinkViewModel(l.SourceTraceId, l.SourceSpanId, l.Attributes, telemetryRepository, traceCache)).ToList();
Model\TelemetryExportService.cs (26)
58var allOtlpResources = _telemetryRepository.GetResources();
61List<ResourceViewModel> resourceDetailsResources = [];
79var structuredLogResources = allOtlpResources
83var traceResources = allOtlpResources
87var metricsResources = allOtlpResources
138var lines = logEntries
146private static void AddResources(ExportArchive exportArchive, List<ResourceViewModel> resources)
156private void AddStructuredLogs(ExportArchive exportArchive, List<OtlpResource> resources)
172private void AddTraces(ExportArchive exportArchive, List<OtlpResource> resources)
188private void AddMetrics(ExportArchive exportArchive, List<OtlpResource> resources)
192var instrumentSummaries = _telemetryRepository.GetInstrumentsSummaries(resource.ResourceKey);
200var instrumentsData = new List<OtlpInstrumentData>();
228internal static OtlpTelemetryDataJson ConvertLogsToOtlpJson(List<OtlpLogEntry> logs)
304var allSpans = traces.SelectMany(t => t.Spans).ToList();
308internal static string ConvertSpanToJson(OtlpSpan span, IOutgoingPeerResolver[] outgoingPeerResolvers, List<OtlpLogEntry>? logs = null, bool indent = true)
333internal static string ConvertTraceToJson(OtlpTrace trace, IOutgoingPeerResolver[] outgoingPeerResolvers, List<OtlpLogEntry>? logs = null)
445private static OtlpResourceLogsJson[]? ConvertLogsToResourceLogs(List<OtlpLogEntry>? logs)
472internal static OtlpTelemetryDataJson ConvertMetricsToOtlpJson(OtlpResource resource, List<OtlpInstrumentData> instruments)
534private static OtlpNumberDataPointJson[] ConvertNumberDataPoints(List<DimensionScope> dimensions)
536var dataPoints = new List<OtlpNumberDataPointJson>();
567private static OtlpHistogramDataPointJson[] ConvertHistogramDataPoints(List<DimensionScope> dimensions)
569var dataPoints = new List<OtlpHistogramDataPointJson>();
599private static OtlpExemplarJson[] ConvertExemplars(List<MetricsExemplar> exemplars)
613var attributes = new List<OtlpKeyValueJson>
701var relationships = new List<ResourceRelationshipJson>();
704var matches = allResources
Model\TraceHelpers.cs (5)
19var spanLookup = new Dictionary<OtlpSpan, List<OtlpSpan>>();
20var unrootedSpans = new List<OtlpSpan>();
29ref var childSpans = ref CollectionsMarshal.GetValueRefOrAddDefault(spanLookup, parentSpan, out _);
44static void Visit(Dictionary<OtlpSpan, List<OtlpSpan>> spanLookup, OtlpSpan span, Func<OtlpSpan, TState, TState> spanAction, TState state, Func<OtlpSpan, DateTime> orderByFunc)
46if (spanLookup.TryGetValue(span, out var childSpans))
Otlp\Storage\TelemetryRepository.cs (46)
36private readonly List<Subscription> _resourceSubscriptions = new();
37private readonly List<Subscription> _logSubscriptions = new();
38private readonly List<Subscription> _metricsSubscriptions = new();
39private readonly List<Subscription> _tracesSubscriptions = new();
43private List<SpanWatcher>? _spanWatchers;
44private List<LogWatcher>? _logWatchers;
58private readonly List<OtlpSpanLink> _spanLinks = new();
59private readonly List<IDisposable> _peerResolverSubscriptions = new();
69internal List<OtlpSpanLink> SpanLinks => _spanLinks;
70internal List<Subscription> TracesSubscriptions => _tracesSubscriptions;
104public List<OtlpResource> GetResources(bool includeUninstrumentedPeers = false)
109public List<OtlpResource> GetResourcesByName(string name, bool includeUninstrumentedPeers = false)
114private List<OtlpResource> GetResourcesCore(bool includeUninstrumentedPeers, string? name)
126var resources = results.OrderBy(a => a.ResourceKey).ToList();
154public List<OtlpResource> GetResources(ResourceKey key, bool includeUninstrumentedPeers = false)
200var resources = GetResources(key.Value);
279private Subscription AddSubscription(string name, ResourceKey? resourceKey, SubscriptionType subscriptionType, Func<Task> callback, List<Subscription> subscriptions)
298private void RaiseSubscriptionChanged(List<Subscription> subscriptions)
340List<OtlpLogEntry>? addedLogs = null;
423List<OtlpResource>? resources = null;
485public List<OtlpLogEntry> GetLogsForSpan(string traceId, string spanId)
516public List<OtlpLogEntry> GetLogsForTrace(string traceId)
536public List<string> GetLogPropertyKeys(ResourceKey? resourceKey)
538List<OtlpResource>? resources = null;
563public List<string> GetTracePropertyKeys(ResourceKey? resourceKey)
565List<OtlpResource>? resources = null;
592List<OtlpResource>? resources = null;
624var filters = context.Filters.GetEnabledFilters().ToList();
671private static bool MatchResources(ResourceKey resourceKey, List<OtlpResource> resources)
684private static bool MatchResources(OtlpTrace t, List<OtlpResource> resources)
736var allOtlpResources = GetResources();
782List<OtlpResource>? resources = null;
825List<OtlpResource>? resources = null;
877List<OtlpResource> resources;
1139List<OtlpSpan>? addedSpans = null;
1386var currentSpanLinks = _spanLinks.ToList();
1426var events = new List<OtlpSpanEvent>();
1428var links = new List<OtlpSpanLink>();
1477public List<OtlpInstrumentSummary> GetInstrumentsSummaries(ResourceKey key)
1479var resources = GetResources(key);
1490var allResourceSummaries = resources
1502var resources = GetResources(request.ResourceKey);
1503var instruments = resources
1525var allDimensions = new List<DimensionScope>();
1526var allKnownAttributes = new Dictionary<string, List<string?>>();
1535ref var values = ref CollectionsMarshal.GetValueRefOrAddDefault(allKnownAttributes, knownAttributeValues.Key, out _);
src\Shared\DashboardUrls.cs (5)
202public static string TelemetryLogsApiUrl(string baseUrl, List<string>? resources = null, params (string key, string? value)[] additionalParams)
215public static string TelemetrySpansApiUrl(string baseUrl, List<string>? resources = null, params (string key, string? value)[] additionalParams)
228public static string TelemetryTracesApiUrl(string baseUrl, List<string>? resources = null, params (string key, string? value)[] additionalParams)
261List<string>? resources,
264var parts = new List<string>();
Aspire.Dashboard.Components.Tests (36)
tests\Shared\Telemetry\TelemetryTestHelpers.cs (2)
156public static Span CreateSpan(string traceId, string spanId, DateTime startTime, DateTime endTime, string? parentSpanId = null, List<Span.Types.Event>? events = null, List<Span.Types.Link>? links = null, IEnumerable<KeyValuePair<string, string>>? attributes = null, Span.Types.SpanKind? kind = null, Status? status = null)
Aspire.Dashboard.Tests (190)
Model\AIAssistant\AIHelpersTests.cs (9)
17var items = new List<int> { 1, 2, 3, 4, 5 };
31var items = new List<int> { 1, 2, 3, 4, 5 };
45var items = new List<int> { 1, 2, 3, 4, 5 };
59var items = new List<string> { "one", "two", "three" };
73var items = new List<string> { "one", "two", "three" };
101var values = new List<string>();
119var values = new List<string>();
137var values = new List<string>();
162var values = new List<string>();
Model\SpanWaterfallViewModelTests.cs (5)
32var vm = SpanWaterfallViewModel.Create(trace, [], new SpanWaterfallViewModel.TraceDetailState([], [], []));
63var vm = SpanWaterfallViewModel.Create(trace, [log], new SpanWaterfallViewModel.TraceDetailState([], [], []));
92var vm = SpanWaterfallViewModel.Create(trace, [], new SpanWaterfallViewModel.TraceDetailState([new BrowserLinkOutgoingPeerResolver()], [], []));
237var vms = SpanWaterfallViewModel.Create(trace, [], new SpanWaterfallViewModel.TraceDetailState([], [], []));
259var vms = SpanWaterfallViewModel.Create(trace, [], new SpanWaterfallViewModel.TraceDetailState([], [], []));
tests\Shared\Telemetry\TelemetryTestHelpers.cs (2)
156public static Span CreateSpan(string traceId, string spanId, DateTime startTime, DateTime endTime, string? parentSpanId = null, List<Span.Types.Event>? events = null, List<Span.Types.Link>? links = null, IEnumerable<KeyValuePair<string, string>>? attributes = null, Span.Types.SpanKind? kind = null, Status? status = null)
Aspire.EndToEnd.Tests (2)
Aspire.Hosting (338)
Ats\AtsCapabilityScanner.cs (63)
23public required List<AtsCapabilityInfo> Capabilities { get; init; }
26public required List<AtsTypeInfo> HandleTypes { get; init; }
29public List<AtsDtoTypeInfo> DtoTypes { get; init; } = [];
32public List<AtsEnumTypeInfo> EnumTypes { get; init; } = [];
35public List<AtsDiagnostic> Diagnostics { get; init; } = [];
90var values = Enum.GetNames(enumType).ToList();
101public List<AtsEnumTypeInfo> GetEnumTypes() => [.. _enums.Values];
114var allCapabilities = new List<AtsCapabilityInfo>();
115var allTypeInfos = new List<AtsTypeInfo>();
116var allDtoTypes = new List<AtsDtoTypeInfo>();
117var allEnumTypes = new List<AtsEnumTypeInfo>();
118var allDiagnostics = new List<AtsDiagnostic>();
251var capabilities = new List<AtsCapabilityInfo>();
252var typeInfos = new List<AtsTypeInfo>();
253var dtoTypes = new List<AtsDtoTypeInfo>();
254var diagnostics = new List<AtsDiagnostic>();
431var implementedInterfaces = !isInterface
434var baseTypeHierarchy = !isInterface
454var enumTypes = CollectEnumTypes(capabilities, dtoTypes);
473private static List<AtsEnumTypeInfo> CollectEnumTypes(
474List<AtsCapabilityInfo> capabilities,
475List<AtsDtoTypeInfo> dtoTypes)
508var result = new List<AtsEnumTypeInfo>();
554List<AtsCapabilityInfo> capabilities,
617List<AtsCapabilityInfo> capabilities,
618List<AtsDiagnostic> diagnostics)
725List<AtsCapabilityInfo> capabilities,
726List<AtsTypeInfo> typeInfos)
744if (typeToCompatibleTypes.TryGetValue(originalTarget, out var compatibleTypes))
768private static Dictionary<string, List<AtsTypeRef>> BuildTypeCompatibilityMap(
769List<AtsTypeInfo> typeInfos)
771var typeToCompatibleTypes = new Dictionary<string, List<AtsTypeRef>>();
813Dictionary<string, List<AtsTypeRef>> map,
817if (!map.TryGetValue(key, out var list))
831private static void FilterMethodNameCollisions(List<AtsCapabilityInfo> capabilities, List<AtsDiagnostic> diagnostics)
833var capabilitiesWithTargets = capabilities
838var collisionGroups = capabilitiesWithTargets
849var collidingMethodNames = new Dictionary<string, List<string>>();
854var capIds = g.Select(x => x.Capability.CapabilityId).Distinct().ToList();
856if (!collidingMethodNames.TryGetValue(methodName, out var existingIds))
896public static List<AtsCapabilityInfo> ScanCapabilities(
913var implementedInterfaces = !type.IsInterface
919var baseTypeHierarchy = !type.IsInterface
949var properties = new List<AtsDtoPropertyInfo>();
991public required List<AtsCapabilityInfo> Capabilities { get; init; }
992public List<AtsDiagnostic> Diagnostics { get; init; } = [];
1009var capabilities = new List<AtsCapabilityInfo>();
1010var diagnostics = new List<AtsDiagnostic>();
1305var paramInfos = new List<AtsParameterInfo>
1416var parameters = method.GetParameters().ToList();
1445var paramInfos = new List<AtsParameterInfo>();
1579var parameters = new List<AtsCallbackParameterInfo>();
1638var genericArgs = delegateType.GetGenericArguments().ToList();
1649var parameters = new List<AtsCallbackParameterInfo>();
1670var parameters = new List<AtsCallbackParameterInfo>();
1807if (genericDef == typeof(List<>) || genericDef == typeof(IList<>))
2104if (genericDef == typeof(List<>) || genericDef == typeof(IList<>))
2300private static List<AtsTypeRef> CollectAllInterfaces(Type type)
2302var allInterfaces = new List<AtsTypeRef>();
2324private static List<AtsTypeRef> CollectBaseTypeHierarchy(Type type)
2326var baseTypes = new List<AtsTypeRef>();
2588var unionTypes = new List<AtsTypeRef>();
Dcp\DcpExecutor.cs (39)
76private readonly List<AppResource> _appResources = [];
299var tasks = new List<Task>();
663var logs = new List<LogEntry>();
846List<Service> needAddressAllocated = new(services.Where(s => !s.HasCompleteAddress));
971var tasks = new List<Task>();
1248List<HostResourceWithEndpoints> hostDependencies = containerDependencies.Select(AsHostResourceWithEndpoints).OfType<HostResourceWithEndpoints>().ToList();
1401var executablesList = modelExecutableResources.ToList(); // Materialize to check count
1466var projectArgs = new List<string>();
1581var tasks = new List<Task>();
1582var groups = executables.GroupBy(e => e.ModelResource).ToList();
1590var groupList = group.ToList();
1738if (er.DcpResource.TryGetAnnotationAsObjectList<string>(CustomResource.ResourceProjectArgsAnnotation, out var projectArgs) && projectArgs.Count > 0)
1756var dirs = new List<string> { certificatesOutputPath };
1853var launchArgs = BuildLaunchArgs(er, spec, configuration.Arguments);
1854var executableArgs = launchArgs.Where(a => a.Executable).Select(a => a.Value).ToList();
1855var displayArgs = launchArgs.Where(a => a.Display).ToList();
1901private static List<(string Value, bool IsSensitive, bool Executable, bool Display)> BuildLaunchArgs(RenderedModelResource er, ExecutableSpec spec, IEnumerable<(string Value, bool IsSensitive)> appHostArgs)
1907var launchArgs = new List<(string Value, bool IsSensitive, bool Executable, bool Display)>();
1921var launchProfileArgs = GetLaunchProfileArgs(project.GetEffectiveLaunchProfile()?.LaunchProfile);
1950private static List<string> GetLaunchProfileArgs(LaunchProfile? launchProfile)
2087var tasks = new List<Task>();
2146var bundlePaths = ContainerCertificatePathsAnnotation.DefaultCertificateBundlePaths.ToList();
2147var certificateDirsPaths = ContainerCertificatePathsAnnotation.DefaultCertificateDirectoriesPaths.ToList();
2163var dirs = new List<string> { certificatesDestination + "/certs" };
2189List<ContainerFileSystemEntry> customBundleFiles = new();
2255var createFiles = await BuildCreateFilesAsync(
2280var certificateFiles = new List<ContainerFileSystemEntry>()
2367var dcpBuildArgs = new List<EnvVar>();
2397var dcpBuildSecrets = new List<BuildContextSecret>();
2747private async Task<List<ContainerCreateFileSystem>> BuildCreateFilesAsync(BuildCreateFilesContext context, CancellationToken cancellationToken)
2749var createFiles = new List<ContainerCreateFileSystem>();
2783private async Task<(List<string>, bool)> BuildRunArgsAsync(ILogger resourceLogger, IResource modelResource, CancellationToken cancellationToken)
2786var runArgs = new List<string>();
2967private static List<ContainerPortSpec> BuildContainerPorts(RenderedModelResource cr)
2969var ports = new List<ContainerPortSpec>();
3006private static List<VolumeMount> BuildContainerMounts(IResource container)
3008var volumeMounts = new List<VolumeMount>();
3077List<RenderedModelResource> regular = new();
3078List<RenderedModelResource> tunnelDependent = new();
Pipelines\DistributedApplicationPipeline.cs (31)
26private readonly List<PipelineStep> _steps = [];
27private readonly List<Func<PipelineConfigurationContext, Task>> _configurationCallbacks = [];
30private List<PipelineStep>? _lastResolvedSteps;
116var computeResources = context.Model.Resources
260var stepsToAnalyze = _lastResolvedSteps ?? throw new InvalidOperationException(
362var annotationSteps = await CollectStepsFromAnnotationsAsync(context).ConfigureAwait(false);
363var allSteps = _steps.Concat(annotationSteps).ToList();
394List<PipelineStep> steps,
417private static (List<PipelineStep> StepsToExecute, Dictionary<string, PipelineStep> StepsByName) FilterStepsForExecution(
418List<PipelineStep> allSteps,
440var stepsToExecute = ComputeTransitiveDependencies(targetStep, allStepsByName);
446private static List<PipelineStep> ComputeTransitiveDependencies(
451var result = new List<PipelineStep>();
479private static async Task<List<PipelineStep>> CollectStepsFromAnnotationsAsync(PipelineContext context)
481var steps = new List<PipelineStep>();
510List<PipelineStep> allSteps)
513var callbacks = new List<Func<PipelineConfigurationContext, Task>>();
584List<PipelineStep> steps,
626var failedDeps = step.DependsOnSteps
711var failures = allStepTasks
720var failedStepNames = new List<string>();
780List<PipelineStep> steps,
864List<PipelineStep> allSteps,
888var executionOrder = GetTopologicalOrder(allSteps);
978var orphanedSteps = allSteps.Where(step =>
1023var stepsForTarget = ComputeTransitiveDependencies(targetStep, allStepsByName);
1044var stepsAtLevel = stepsByLevel[level];
1106List<PipelineStep> steps,
1153private static List<PipelineStep> GetTopologicalOrder(List<PipelineStep> steps)
1157var result = new List<PipelineStep>();
Aspire.Hosting.Analyzers (1)
Aspire.Hosting.Azure (41)
Provisioning\Internal\BaseProvisioningContextProvider.cs (14)
201protected async Task<(List<KeyValuePair<string, string>>? tenantOptions, bool fetchSucceeded)> TryGetTenantsAsync(CancellationToken cancellationToken)
203List<KeyValuePair<string, string>>? tenantOptions = null;
211var tenantList = availableTenants.ToList();
250protected async Task<(List<KeyValuePair<string, string>>? subscriptionOptions, bool fetchSucceeded)> TryGetSubscriptionsAsync(string? tenantId, CancellationToken cancellationToken)
252List<KeyValuePair<string, string>>? subscriptionOptions = null;
260var subscriptionList = availableSubscriptions.ToList();
278protected async Task<(List<KeyValuePair<string, string>>? subscriptionOptions, bool fetchSucceeded)> TryGetSubscriptionsAsync(CancellationToken cancellationToken)
283protected async Task<(List<(string Name, string Location)>? resourceGroupOptions, bool fetchSucceeded)> TryGetResourceGroupsWithLocationAsync(string subscriptionId, CancellationToken cancellationToken)
285List<(string Name, string Location)>? resourceGroupOptions = null;
295var resourceGroupList = availableResourceGroups.ToList();
316protected async Task<(List<KeyValuePair<string, string>> locationOptions, bool fetchSucceeded)> TryGetLocationsAsync(string subscriptionId, CancellationToken cancellationToken)
318List<KeyValuePair<string, string>>? locationOptions = null;
329var locationList = availableLocations.ToList();
356private static List<KeyValuePair<string, string>> GetStaticAzureLocations()
Aspire.Hosting.Azure.AppContainers (6)
Aspire.Hosting.Azure.AppService (6)
Aspire.Hosting.Azure.CognitiveServices (2)
Aspire.Hosting.Azure.ContainerRegistry (2)
Aspire.Hosting.Azure.CosmosDB (5)
Aspire.Hosting.Azure.EventHubs (2)
Aspire.Hosting.Azure.Functions (5)
Aspire.Hosting.Azure.KeyVault (1)
Aspire.Hosting.Azure.Kusto (1)
Aspire.Hosting.Azure.Kusto.Tests (7)
Aspire.Hosting.Azure.Network (4)
Aspire.Hosting.Azure.ServiceBus (4)
Aspire.Hosting.Azure.SignalR (1)
Aspire.Hosting.Azure.Sql (4)
Aspire.Hosting.Azure.Storage (3)
Aspire.Hosting.Azure.Tests (57)
Aspire.Hosting.Azure.WebPubSub (1)
Aspire.Hosting.CodeGeneration.Go (10)
Aspire.Hosting.CodeGeneration.Go.Tests (18)
Aspire.Hosting.CodeGeneration.Java (7)
Aspire.Hosting.CodeGeneration.Java.Tests (18)
Aspire.Hosting.CodeGeneration.Python (8)
Aspire.Hosting.CodeGeneration.Python.Tests (18)
Aspire.Hosting.CodeGeneration.Rust (7)
Aspire.Hosting.CodeGeneration.Rust.Tests (18)
Aspire.Hosting.CodeGeneration.TypeScript (76)
AtsTypeScriptCodeGenerator.cs (76)
18public required List<AtsCapabilityInfo> Capabilities { get; init; }
115private readonly Dictionary<string, List<AtsParameterInfo>> _optionsInterfacesToGenerate = new(StringComparer.Ordinal);
367var allBuilders = CreateBuilderModels(capabilities);
368var entryPoints = GetEntryPointCapabilities(capabilities);
371var builders = allBuilders;
374var clientMethods = entryPoints
437var resourceBuilders = builders.Where(b => b.TargetType?.IsResourceBuilder == true).ToList();
438var typeClasses = builders.Where(b => b.TargetType?.IsResourceBuilder != true).ToList();
678private static (List<AtsParameterInfo> Required, List<AtsParameterInfo> Optional) SeparateParameters(
681var required = new List<AtsParameterInfo>();
682var optional = new List<AtsParameterInfo>();
705private void RegisterOptionsInterface(string capabilityId, string methodName, List<AtsParameterInfo> optionalParams)
715if (_optionsInterfacesToGenerate.TryGetValue(baseInterfaceName, out var existingParams))
736if (!_optionsInterfacesToGenerate.TryGetValue(suffixedName, out var suffixedParams))
774private static bool AreOptionsCompatible(List<AtsParameterInfo> existing, List<AtsParameterInfo> candidate)
895var getters = builder.Capabilities.Where(c => c.CapabilityKind == AtsCapabilityKind.PropertyGetter).ToList();
896var setters = builder.Capabilities.Where(c => c.CapabilityKind == AtsCapabilityKind.PropertySetter).ToList();
899var properties = GroupPropertiesByName(getters, setters);
934var publicParamDefs = new List<string>();
947var internalParamDefs = new List<string>();
1002var callbackParams2 = capability.Parameters.Where(p => p.IsCallback).ToList();
1009var cancellationParams2 = capability.Parameters.Where(IsCancellationToken).ToList();
1035var callbackParams = capability.Parameters.Where(p => p.IsCallback).ToList();
1042var cancellationParams = capability.Parameters.Where(IsCancellationToken).ToList();
1101List<AtsParameterInfo> requiredParams,
1102List<AtsParameterInfo> optionalParams,
1103List<AtsParameterInfo>? cancellationParams = null)
1108var requiredArgs = new List<string> { $"{targetParamName}: this._handle" };
1177var publicParamDefs = new List<string>();
1190var forwardArgs = new List<string>();
1252private void GenerateAspireClient(List<AtsCapabilityInfo> entryPoints)
1276var paramDefs = new List<string> { "client: AspireClientRpc" };
1277var paramArgs = new List<string>();
1351var paramList = new List<string>();
1486var paramNames = callbackParameters.Select((p, i) => $"p{i}").ToList();
1491var callArgs = new List<string>();
1641private void GenerateHandleWrapperRegistrations(List<BuilderModel> typeClasses, List<BuilderModel> resourceBuilders)
1686var getters = model.Capabilities.Where(c => c.CapabilityKind == AtsCapabilityKind.PropertyGetter).ToList();
1687var setters = model.Capabilities.Where(c => c.CapabilityKind == AtsCapabilityKind.PropertySetter).ToList();
1688var contextMethods = model.Capabilities.Where(c => c.CapabilityKind == AtsCapabilityKind.InstanceMethod).ToList();
1689var otherMethods = model.Capabilities.Where(c => c.CapabilityKind == AtsCapabilityKind.Method).ToList();
1692var allMethods = contextMethods.Concat(otherMethods).ToList();
1705var properties = GroupPropertiesByName(getters, setters);
1747private static List<(string PropertyName, AtsCapabilityInfo? Getter, AtsCapabilityInfo? Setter)> GroupPropertiesByName(
1748List<AtsCapabilityInfo> getters, List<AtsCapabilityInfo> setters)
1750var result = new List<(string PropertyName, AtsCapabilityInfo? Getter, AtsCapabilityInfo? Setter)>();
2013var userParams = method.Parameters.Where(p => p.Name != targetParamName).ToList();
2021var paramDefs = new List<string>();
2056var requiredArgs = new List<string> { $"{targetParamName}: this._handle" };
2093var userParams = capability.Parameters.Where(p => p.Name != firstParamName).ToList();
2101var paramDefs = new List<string>();
2134var requiredArgs = new List<string> { $"{firstParamName}: this._handle" };
2178var userParams = capability.Parameters.Where(p => p.Name != targetParamName).ToList();
2186var publicParamDefs = new List<string>();
2199var internalParamDefs = new List<string>();
2233var callbackParams = userParams.Where(p => p.IsCallback).ToList();
2276var callbackParams = userParams.Where(p => p.IsCallback).ToList();
2323var callbackParams = userParams.Where(p => p.IsCallback).ToList();
2344private void GenerateTypeClassThenableWrapper(BuilderModel model, List<AtsCapabilityInfo> methods)
2373var userParams = capability.Parameters.Where(p => p.Name != targetParamName).ToList();
2381var publicParamDefs = new List<string>();
2394var forwardArgs = new List<string>();
2464private static List<BuilderModel> CreateBuilderModels(IReadOnlyList<AtsCapabilityInfo> capabilities)
2469var capabilitiesByTypeId = new Dictionary<string, List<AtsCapabilityInfo>>();
2475var interfaceCapabilities = new Dictionary<string, List<AtsCapabilityInfo>>();
2507if (!capabilitiesByTypeId.TryGetValue(expandedType.TypeId, out var list))
2520if (!interfaceCapabilities.TryGetValue(targetTypeId, out var interfaceList))
2533if (!capabilitiesByTypeId.TryGetValue(targetTypeId, out var list))
2545var builders = new List<BuilderModel>();
2554var uniqueCapabilities = typeCapabilities
2587var uniqueCapabilities = caps
2718private static List<AtsCapabilityInfo> GetEntryPointCapabilities(IReadOnlyList<AtsCapabilityInfo> capabilities)
Aspire.Hosting.CodeGeneration.TypeScript.Tests (48)
Aspire.Hosting.Containers.Tests (8)
Aspire.Hosting.DevTunnels (9)
Aspire.Hosting.Docker (40)
Aspire.Hosting.Docker.Tests (17)
Aspire.Hosting.DotnetTool.Tests (10)
Aspire.Hosting.Foundry (6)
Aspire.Hosting.Foundry.Tests (1)
Aspire.Hosting.Garnet (1)
Aspire.Hosting.Garnet.Tests (1)
Aspire.Hosting.GitHub.Models.Tests (1)
Aspire.Hosting.Integration.Analyzers (2)
Aspire.Hosting.JavaScript (3)
Aspire.Hosting.JavaScript.Tests (20)
AddViteAppTests.cs (8)
247var args = new List<object>();
272var args = new List<object>();
308var args = new List<object> { "run", "dev", "--", "--port", "3000", "--config", "vite.config.js" };
368var args = new List<object> { "run", "dev", "--", "--port", "3000" };
419var args = new List<object> { "run", "dev", "--", "--port", "3000" };
472var args = new List<object> { "run", "dev", "--", "--port", "3000" };
531var args = new List<object> { "run", "dev", "--", "--port", "3000" };
606var args = new List<object> { "run", "dev", "--", "--port", "3000" };
Aspire.Hosting.Kubernetes (100)
Aspire.Hosting.Maui (6)
Aspire.Hosting.Maui.Tests (2)
Aspire.Hosting.MongoDB.Tests (4)
Aspire.Hosting.MySql (1)
Aspire.Hosting.MySql.Tests (1)
Aspire.Hosting.Nats (1)
Aspire.Hosting.Nats.Tests (3)
Aspire.Hosting.OpenAI.Tests (1)
Aspire.Hosting.Oracle.Tests (4)
Aspire.Hosting.PostgreSQL (1)
Aspire.Hosting.Python.Tests (20)
AddPythonAppTests.cs (20)
173var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(pythonProjectResource, TestServiceProvider.Instance);
212var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(pythonProjectResource, TestServiceProvider.Instance);
255var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(pythonProjectResource, TestServiceProvider.Instance);
430var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(pythonProjectResource, TestServiceProvider.Instance);
461var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(pythonProjectResource, TestServiceProvider.Instance);
513var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(pythonProjectResource, TestServiceProvider.Instance);
1002var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(pythonProjectResource, TestServiceProvider.Instance);
1035var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(pythonProjectResource, TestServiceProvider.Instance);
1069var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(pythonProjectResource, TestServiceProvider.Instance);
1089var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, TestServiceProvider.Instance);
1113var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, TestServiceProvider.Instance);
1135var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, TestServiceProvider.Instance);
1167var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, TestServiceProvider.Instance);
1412var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services);
1450var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services);
1490var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services);
1527var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services);
1560var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, TestServiceProvider.Instance);
2354var waitAnnotations = pythonAppResource.Annotations.OfType<WaitAnnotation>().ToList();
2387var waitAnnotations = pythonAppResource.Annotations.OfType<WaitAnnotation>().ToList();
Aspire.Hosting.RabbitMQ (1)
Aspire.Hosting.Redis (2)
Aspire.Hosting.Redis.Tests (3)
Aspire.Hosting.RemoteHost (23)
Aspire.Hosting.RemoteHost.Tests (9)
Aspire.Hosting.SqlServer (1)
Aspire.Hosting.SqlServer.Tests (1)
Aspire.Hosting.Testing.Tests (7)
Aspire.Hosting.Tests (257)
Dcp\DcpExecutorTests.cs (50)
68var startingEvents = new List<OnResourceStartingContext>();
90var executables = kubernetesService.CreatedResources.OfType<Executable>().ToList();
158var executables = kubernetesService.CreatedResources.OfType<Executable>().ToList();
162var callArgs = executionType == ExecutionType.IDE ? exe.Spec.Args : exe.Spec.Args![^(expectedArgs?.Length ?? 0)..];
165Assert.True(exe.TryGetAnnotationAsObjectList<AppLaunchArgumentAnnotation>(CustomResource.ResourceAppArgsAnnotation, out var argAnnotations));
193var executables = kubernetesService.CreatedResources.OfType<Executable>().ToList();
201Assert.True(exe.TryGetAnnotationAsObjectList<AppLaunchArgumentAnnotation>(CustomResource.ResourceAppArgsAnnotation, out var argAnnotations));
236var executables = kubernetesService.CreatedResources.OfType<Executable>().ToList();
244Assert.True(exe1.TryGetAnnotationAsObjectList<AppLaunchArgumentAnnotation>(CustomResource.ResourceAppArgsAnnotation, out var argAnnotations1));
262Assert.True(exe2.TryGetAnnotationAsObjectList<AppLaunchArgumentAnnotation>(CustomResource.ResourceAppArgsAnnotation, out var argAnnotations2));
281Assert.True(dcpExe.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
313Assert.True(dcpExe.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
345Assert.True(dcpExe.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
378Assert.True(dcpExe.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
435Assert.True(dcpExe.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
469Assert.True(dcpExe.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
503Assert.True(dcpExe.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
589var executables = kubernetesService.CreatedResources.OfType<Executable>().ToList();
902var exes = kubernetesService.CreatedResources.OfType<Executable>().ToList();
907Assert.True(dcpExe.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
947var exes = kubernetesService.CreatedResources.OfType<Executable>().ToList();
952Assert.True(dcpExe.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
985Assert.True(dcpCtr.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
1020Assert.True(dcpCtr.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
1101Assert.True(dcpCtr.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
1137Assert.True(dcpCtr.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
1174Assert.True(dcpCtr.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
1211Assert.True(dcpCtr.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
1384var serviceProducers = JsonSerializer.Deserialize<List<ServiceProducerAnnotation>>(annotations[CustomResource.ServiceProducerAnnotation]);
1718List<Executable> dcpExes = [];
1729Assert.True(debuggableExe.TryGetAnnotationAsObjectList<ExecutableLaunchConfiguration>(Executable.LaunchConfigurationsAnnotation, out var launchConfigs1));
1768var dcpExes = kubernetesService.CreatedResources.OfType<Executable>().ToList();
1805var dcpExes = kubernetesService.CreatedResources.OfType<Executable>().ToList();
1846var dcpExes = kubernetesService.CreatedResources.OfType<Executable>().ToList();
1882var dcpExes = kubernetesService.CreatedResources.OfType<Executable>().ToList();
1924var dcpExes = kubernetesService.CreatedResources.OfType<Executable>().ToList();
1966var dcpExes = kubernetesService.CreatedResources.OfType<Executable>().ToList();
2008var dcpExes = kubernetesService.CreatedResources.OfType<Executable>().ToList();
2045var dcpExes = kubernetesService.CreatedResources.OfType<Executable>().ToList();
2082var dcpExes = kubernetesService.CreatedResources.OfType<Executable>().ToList();
2125var dcpExes = kubernetesService.CreatedResources.OfType<Executable>().ToList();
2205var dcpExes = kubernetesService.CreatedResources.OfType<Executable>().ToList();
2266var svcs = kubernetesService.CreatedResources
2328var commandAnnotations = resource.Annotations.OfType<ResourceCommandAnnotation>().ToList();
2365List<Executable> dcpExes = [];
2414List<Executable> dcpExes = [];
2427Assert.True(exe.TryGetAnnotationAsObjectList<ExecutableLaunchConfiguration>(Executable.LaunchConfigurationsAnnotation, out var launchConfigs));
2469List<Executable> dcpExes = [];
2518List<Executable> dcpExes = [];
Aspire.Hosting.Valkey (1)
Aspire.Hosting.Valkey.Tests (1)
Aspire.Hosting.Yarp (7)
Aspire.Hosting.Yarp.Tests (2)
Aspire.Microsoft.Azure.Cosmos (3)
Aspire.Microsoft.Azure.StackExchangeRedis.Tests (1)
Aspire.Microsoft.EntityFrameworkCore.Cosmos (3)
Aspire.NATS.Net.Tests (1)
Aspire.Oracle.EntityFrameworkCore.Tests (1)
Aspire.Playground.Tests (13)
Aspire.RabbitMQ.Client (1)
Aspire.RuntimeIdentifier.Tool (1)
Aspire.StackExchange.Redis (1)
Aspire.StackExchange.Redis.DistributedCaching.Tests (1)
Aspire.StackExchange.Redis.OutputCaching.Tests (1)
Aspire.StackExchange.Redis.Tests (1)
Aspire.Templates.Tests (7)
Aspire.TestUtilities (1)
aspire-managed (19)
AzureAppService.ApiService (1)
AzureContainerApps.ApiService (1)
AzureSearch.ApiService (2)
AzureStorageEndToEnd.ApiService (2)
AzureVirtualNetworkEndToEnd.ApiService (2)
BasicWebSite (2)
BasketService (3)
BicepSample.ApiService (8)
BinaryFormatTests (1)
BoundTreeGenerator (4)
BuildActionTelemetryTable (1)
BuildBoss (15)
BuildValidator (11)
CatalogDb (9)
CatalogModel (3)
CatalogService (1)
CdkSample.ApiService (9)
ClaimsTransformation (1)
Client.ClientBase.IntegrationTests (14)
ClientSample (12)
CodeGenerator (11)
ConfigurationSchemaGenerator (30)
Contract.Data.IntegrationTests (1)
Cookies (1)
CookieSessionSample (1)
CosmosEndToEnd.ApiService (1)
Crossgen2Tasks (14)
csc (6)
CSharpErrorFactsGenerator (4)
CSharpSyntaxGenerator (62)
CustomPolicyProvider (1)
DatabaseMigration.ApiService (1)
DemoConsole (1)
Diagnostics.EFCore.FunctionalTests (1)
dotnet-dev-certs (37)
dotnet-getdocument (11)
dotnet-openapi (10)
dotnet-razorpagegenerator (1)
dotnet-sql-cache (10)
dotnet-svcutil (1)
dotnet-svcutil.xmlserializer (17)
dotnet-svcutil-lib (294)
CodeDomFixup\ConfigToCode.cs (5)
32List<string> endpointNames = new List<string>();
68private static void AddConfigEndpoint(CodeConstructor ctor, List<string> endpointNames)
99private void FixupConstructors(CodeTypeDeclaration clientType, bool shouldRemoveDefault, bool endpointConfigurationExists, CodeNamespace namespaceDecl, List<string> endpointNames)
178private static void FixupConstructorsNonDuplex(CodeTypeDeclaration clientType, bool shouldRemoveDefault, bool endpointConfigurationExists, List<string> endpointNames)
304private void FixupConstructorsDuplex(CodeTypeDeclaration clientType, bool shouldRemoveDefault, bool endpointConfigurationExists, CodeNamespace namespaceDecl, List<string> endpointNames)
dotnet-svcutil-lib.Tests (12)
TestInit.cs (9)
362var baselineFiles = Directory.GetFiles(this_TestCaseBaselinesDir, "*", SearchOption.AllDirectories)
365var nonRefbaselineFiles = baselineFiles.Where(f => f.EndsWith(".cs") && !f.EndsWith(Path.DirectorySeparatorChar + "reference.cs", StringComparison.OrdinalIgnoreCase)).ToList();
371var generatedFiles = Directory.GetFiles(this_TestCaseOutputDir, "*.*", SearchOption.AllDirectories)
377var nonRefGeneratedFiles = generatedFiles.Where(f => f.EndsWith(".cs") && !f.EndsWith(Path.DirectorySeparatorChar + "reference.cs", StringComparison.OrdinalIgnoreCase)).ToList();
387protected bool ValidateFiles(string outputDir, string baselineDir, string bootstrapDir, List<string> generatedFiles, List<string> baselineFiles, out string failureMessage)
468var fileLines1 = new List<string>();
469var fileLines2 = new List<string>();
470var exceptLines = new List<string>() { "<ImplicitUsings>enable</ImplicitUsings>", "<Nullable>enable</Nullable>", "<Content CopyToOutputDirectory" };
dotnet-user-jwts (27)
dotnet-user-secrets (11)
FilesWebSite (1)
FormatterWebSite (2)
GenerateAnalyzerNuspec (2)
GenerateDocumentationAndConfigFiles (146)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (2)
24public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
43public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\CompatAbstractFormattingRule.cs (6)
25public sealed override void AddAnchorIndentationOperations(List<AnchorIndentationOperation> list, SyntaxNode node, in NextAnchorIndentationOperationAction nextOperation)
33public sealed override void AddIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode node, in NextIndentBlockOperationAction nextOperation)
41public sealed override void AddAlignTokensOperations(List<AlignTokensOperation> list, SyntaxNode node, in NextAlignTokensOperationAction nextOperation)
78public virtual void AddAnchorIndentationOperationsSlow(List<AnchorIndentationOperation> list, SyntaxNode node, ref NextAnchorIndentationOperationAction nextOperation)
84public virtual void AddIndentBlockOperationsSlow(List<IndentBlockOperation> list, SyntaxNode node, ref NextIndentBlockOperationAction nextOperation)
90public virtual void AddAlignTokensOperationsSlow(List<AlignTokensOperation> list, SyntaxNode node, ref NextAlignTokensOperationAction nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
86var result = new List<ITypeSymbol>
GetDocument.Insider (11)
HeaderPropagationSample (1)
http2cat (4)
IdeBenchmarks (1)
IdeCoreBenchmarks (9)
IdentitySample.Mvc (3)
artifacts\obj\IdentitySample.Mvc\Release\net11.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Views\Account\Login_cshtml.g.cs (1)
469var loginProviders = schemes.ToList();
IIS.Common.TestLib (1)
IIS.FunctionalTests (27)
IIS.LongTests (9)
IIS.Microbenchmarks (1)
IIS.NewHandler.FunctionalTests (9)
IIS.ShadowCopy.Tests (6)
IIS.Tests (1)
IISExpress.FunctionalTests (24)
illink (190)
Linker.Dataflow\DynamicallyAccessedMembersBinder.cs (5)
25var members = new List<IMetadataTokenProvider>();
86var members = new List<IMetadataTokenProvider>();
99var members = new List<IMetadataTokenProvider>();
418public static void GetAllOnType(this TypeDefinition type, LinkContext context, bool declaredOnly, List<IMetadataTokenProvider> members) => GetAllOnType(type, context, declaredOnly, members, new HashSet<TypeDefinition>());
420static void GetAllOnType(TypeDefinition type, LinkContext context, bool declaredOnly, List<IMetadataTokenProvider> members, HashSet<TypeDefinition> types)
Linker.Steps\MarkStep.cs (19)
67protected List<(TypeDefinition, MessageOrigin)> _typesWithInterfaces;
69protected List<TypeDefinition> _dynamicInterfaceCastableImplementationTypes;
70protected List<(MethodBody, MessageOrigin)> _unreachableBodies;
72readonly List<(TypeDefinition Type, MethodBody Body, Instruction Instr)> _pending_isinst_instr;
580var baseMethods = Annotations.GetBaseMethods(method);
701List<OverrideInformation>? overridingMethods = (List<OverrideInformation>?)Annotations.GetOverrides(method);
767var bases = Annotations.GetBaseMethods(method);
1597var skippedItems = new List<AttributeProviderPair>();
1662var skippedItems = new List<(AttributeProviderPair, DependencyInfo, MessageOrigin)>();
2573var ifaces = Annotations.GetRecursiveInterfaces(type);
2586protected virtual bool ShouldMarkInterfaceImplementationList(TypeDefinition type, List<InterfaceImplementation> ifaces, TypeReference ifaceType)
2647var base_list = Annotations.GetBaseMethods(method);
3061var list = Annotations.GetPreservedMethods(type);
3071var list = Annotations.GetPreservedMethods(method);
3553var ifaces = Annotations.GetRecursiveInterfaces(method.DeclaringType);
3635var base_methods = Annotations.GetBaseMethods(method);
4072void MarkInterfaceImplementationList(List<InterfaceImplementation> ifaces, MessageOrigin origin, DependencyInfo? reason = null)
4111if (Context.CompilerGeneratedState.TryGetCompilerGeneratedCalleesForUserMethod(methodIL.Method, out List<IMemberDefinition>? compilerGeneratedCallees))
Linker\DocumentationSignatureParser.cs (22)
42var results = new List<IMemberDefinition>();
55var results = new List<IMemberDefinition>();
65var results = new List<IMemberDefinition>();
79static bool ParseDocumentationSignature(string id, ModuleDefinition module, List<IMemberDefinition> results, ITryResolveMetadata resolver)
93static void ParseSignature(string id, ref int index, ModuleDefinition module, List<IMemberDefinition> results, ITryResolveMetadata resolver)
134public static void ParseSignaturePart(string id, ref int index, ModuleDefinition module, MemberType memberTypes, List<IMemberDefinition> results, ITryResolveMetadata resolver)
195public static void GetMatchingMembers(string id, ref int index, ModuleDefinition module, TypeDefinition? containingType, string memberName, int arity, MemberType memberTypes, List<IMemberDefinition> results, ITryResolveMetadata resolver, bool acceptName = false)
276var results = new List<string>();
285static void ParseTypeSymbol(string id, ref int index, IGenericParameterProvider? typeParameterContext, List<string> results)
346static void ParseTypeParameterSymbol(string id, ref int index, IGenericParameterProvider? typeParameterContext, List<string> results)
391static void ParseNamedTypeSymbol(string id, ref int index, IGenericParameterProvider? typeParameterContext, List<string> results)
404List<string>? typeArguments = null;
489static bool ParseTypeArguments(string id, ref int index, IGenericParameterProvider? typeParameterContext, List<string> typeArguments)
524static void GetMatchingTypes(ModuleDefinition module, TypeDefinition? declaringType, string name, int arity, List<IMemberDefinition> results, ITryResolveMetadata resolver)
559static void GetMatchingMethods(string id, ref int index, TypeDefinition? type, string memberName, int arity, List<IMemberDefinition> results, ITryResolveMetadata resolver, bool acceptName = false)
564var parameters = new List<string>();
618static void GetMatchingProperties(string id, ref int index, TypeDefinition? type, string memberName, List<IMemberDefinition> results, ITryResolveMetadata resolver, bool acceptName = false)
626List<string>? parameters = null;
661static void GetMatchingFields(TypeDefinition? type, string memberName, List<IMemberDefinition> results)
673static void GetMatchingEvents(TypeDefinition? type, string memberName, List<IMemberDefinition> results)
685static bool AllParametersMatch(Collection<ParameterDefinition> methodParameters, List<string> expectedParameters, ITryResolveMetadata resolver)
699static bool ParseParameterList(string id, ref int index, IGenericParameterProvider typeParameterContext, List<string> parameters)
Linker\LinkerAttributesInformation.cs (12)
16readonly List<(Type Type, List<Attribute> Attributes)>? _linkerAttributes;
18private LinkerAttributesInformation(List<(Type Type, List<Attribute> Attributes)>? cache)
23private static bool TryFindAttributeList(List<(Type Type, List<Attribute> Attributes)> list, Type type, [NotNullWhen(returnValue: true)] out List<Attribute>? foundAttributes)
41List<(Type Type, List<Attribute> Attributes)>? cache = null;
76cache ??= new List<(Type Type, List<Attribute> Attributes)>();
80if (!TryFindAttributeList(cache, attributeValueType, out var attributeList))
107if (!TryFindAttributeList(_linkerAttributes, typeof(T), out var attributeList))
Linker\TypeMapHandler.cs (16)
22readonly Dictionary<TypeDefinition, Dictionary<TypeReference, List<CustomAttributeWithOrigin>>> _unmarkedExternalTypeMapEntries = [];
25readonly Dictionary<TypeDefinition, Dictionary<TypeReference, List<CustomAttributeWithOrigin>>> _unmarkedProxyTypeMapEntries = [];
29Dictionary<TypeReference, List<CustomAttributeWithOrigin>> _pendingExternalTypeMapEntries = null!;
30Dictionary<TypeReference, List<CustomAttributeWithOrigin>> _pendingProxyTypeMapEntries = null!;
31Dictionary<TypeReference, List<CustomAttributeWithOrigin>> _pendingAssemblyTargets = null!;
66if (_pendingExternalTypeMapEntries.Remove(typeMapGroup, out List<CustomAttributeWithOrigin>? pendingEntries))
73if (_pendingAssemblyTargets.Remove(typeMapGroup, out List<CustomAttributeWithOrigin>? assemblyTargets))
87if (_pendingProxyTypeMapEntries.Remove(typeMapGroup, out List<CustomAttributeWithOrigin>? pendingEntries))
94if (_pendingAssemblyTargets.Remove(typeMapGroup, out List<CustomAttributeWithOrigin>? assemblyTargets))
122Dictionary<TypeDefinition, Dictionary<TypeReference, List<CustomAttributeWithOrigin>>> unmarkedTypeMapAttributes,
124Dictionary<TypeReference, List<CustomAttributeWithOrigin>> typeMapAttributesPendingUniverseMarking)
126if (!unmarkedTypeMapAttributes.Remove(targetType, out Dictionary<TypeReference, List<CustomAttributeWithOrigin>>? entries))
138else if (!typeMapAttributesPendingUniverseMarking.TryGetValue(typeMapGroup, out List<CustomAttributeWithOrigin>? value))
200void RecordTypeMapEntry(CustomAttributeWithOrigin attr, TypeReference group, TypeReference? dependencySource, Dictionary<TypeDefinition, Dictionary<TypeReference, List<CustomAttributeWithOrigin>>> pendingDependencySourceMarking, HashSet<TypeReference> seenTypeGroups, Dictionary<TypeReference, List<CustomAttributeWithOrigin>> pendingTypeMapGroupMarking)
237if (!pendingDependencySourceMarking.TryGetValue(dependencyTypeDef, out Dictionary<TypeReference, List<CustomAttributeWithOrigin>>? entries))
Linker\TypeMapInfo.cs (22)
46protected readonly Dictionary<MethodDefinition, List<OverrideInformation>> base_methods = new Dictionary<MethodDefinition, List<OverrideInformation>>();
47protected readonly Dictionary<MethodDefinition, List<OverrideInformation>> override_methods = new Dictionary<MethodDefinition, List<OverrideInformation>>();
48protected readonly Dictionary<MethodDefinition, List<OverrideInformation>> default_interface_implementations = new Dictionary<MethodDefinition, List<OverrideInformation>>();
69public List<OverrideInformation>? GetOverrides(MethodDefinition method)
72override_methods.TryGetValue(method, out List<OverrideInformation>? overrides);
83public List<OverrideInformation>? GetBaseMethods(MethodDefinition method)
86base_methods.TryGetValue(method, out List<OverrideInformation>? bases);
99default_interface_implementations.TryGetValue(baseMethod, out var ret);
119Dictionary<TypeDefinition, List<(TypeReference, List<InterfaceImplementation>)>> interfaces = new();
133internal List<(TypeReference InterfaceType, List<InterfaceImplementation> ImplementationChain)>? GetRecursiveInterfaces(TypeDefinition type)
136if (interfaces.TryGetValue(type, out var value))
141List<(TypeReference InterfaceType, List<InterfaceImplementation> ImplementationChain)> GetRecursiveInterfaceImplementations(TypeDefinition type)
143List<(TypeReference, List<InterfaceImplementation>)> firstImplementationChain = new();
150static void AddRecursiveInterfaces(TypeReference typeRef, IEnumerable<InterfaceImplementation> pathToType, List<(TypeReference, List<InterfaceImplementation>)> firstImplementationChain, LinkContext Context)
ILLink.CodeFixProvider (2)
ILLink.RoslynAnalyzer (12)
Infrastructure.Common (9)
Infrastructure.Tests (10)
InMemory.FunctionalTests (43)
InProcessWebSite (1)
installer.tasks (2)
IntegrationTestsWebsite (1)
InteractiveHost.UnitTests (1)
Interop.FunctionalTests (19)
InteropClient (7)
InteropWebsite (2)
IOperationGenerator (23)
Keycloak.Web (1)
KeyManagementSimulator (1)
LocalizationWebsite (1)
Metrics (119)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (2)
24public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
43public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\CompatAbstractFormattingRule.cs (6)
25public sealed override void AddAnchorIndentationOperations(List<AnchorIndentationOperation> list, SyntaxNode node, in NextAnchorIndentationOperationAction nextOperation)
33public sealed override void AddIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode node, in NextIndentBlockOperationAction nextOperation)
41public sealed override void AddAlignTokensOperations(List<AlignTokensOperation> list, SyntaxNode node, in NextAlignTokensOperationAction nextOperation)
78public virtual void AddAnchorIndentationOperationsSlow(List<AnchorIndentationOperation> list, SyntaxNode node, ref NextAnchorIndentationOperationAction nextOperation)
84public virtual void AddIndentBlockOperationsSlow(List<IndentBlockOperation> list, SyntaxNode node, ref NextIndentBlockOperationAction nextOperation)
90public virtual void AddAlignTokensOperationsSlow(List<AlignTokensOperation> list, SyntaxNode node, ref NextAlignTokensOperationAction nextOperation)
Metrics.Legacy (119)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (2)
24public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
43public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\CompatAbstractFormattingRule.cs (6)
25public sealed override void AddAnchorIndentationOperations(List<AnchorIndentationOperation> list, SyntaxNode node, in NextAnchorIndentationOperationAction nextOperation)
33public sealed override void AddIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode node, in NextIndentBlockOperationAction nextOperation)
41public sealed override void AddAlignTokensOperations(List<AlignTokensOperation> list, SyntaxNode node, in NextAlignTokensOperationAction nextOperation)
78public virtual void AddAnchorIndentationOperationsSlow(List<AnchorIndentationOperation> list, SyntaxNode node, ref NextAnchorIndentationOperationAction nextOperation)
84public virtual void AddIndentBlockOperationsSlow(List<IndentBlockOperation> list, SyntaxNode node, ref NextIndentBlockOperationAction nextOperation)
90public virtual void AddAlignTokensOperationsSlow(List<AlignTokensOperation> list, SyntaxNode node, ref NextAlignTokensOperationAction nextOperation)
Microsoft.Agents.AI.ProjectTemplates.Tests (1)
Microsoft.Analyzers.Extra (28)
Microsoft.Analyzers.Extra.Tests (10)
Microsoft.Analyzers.Local (27)
CallAnalysis\CallAnalyzer.State.cs (6)
16public readonly Dictionary<IMethodSymbol, List<Action<OperationAnalysisContext, IInvocationOperation>>> Methods = new(SymbolEqualityComparer.Default);
17public readonly Dictionary<IMethodSymbol, List<Action<OperationAnalysisContext, IObjectCreationOperation>>> Ctors = new(SymbolEqualityComparer.Default);
18public readonly Dictionary<IPropertySymbol, List<Action<OperationAnalysisContext, IPropertyReferenceOperation>>> Props = new(SymbolEqualityComparer.Default);
19public readonly Dictionary<ITypeSymbol, List<Action<OperationAnalysisContext, IThrowOperation>>> ExceptionTypes = new(SymbolEqualityComparer.Default);
20public readonly Dictionary<ITypeSymbol, List<MethodHandlers>> Interfaces = new(SymbolEqualityComparer.Default);
32public List<Action<OperationAnalysisContext, IInvocationOperation>> Actions { get; } = [];
Microsoft.Analyzers.Local.Tests (10)
Microsoft.Arcade.Test.Common (5)
Microsoft.AspNetCore (7)
Microsoft.AspNetCore.Analyzer.Testing (4)
Microsoft.AspNetCore.Analyzers (6)
Microsoft.AspNetCore.Analyzers.Test (1)
Microsoft.AspNetCore.Antiforgery (8)
Microsoft.AspNetCore.Antiforgery.Microbenchmarks (1)
Microsoft.AspNetCore.Antiforgery.Test (11)
Microsoft.AspNetCore.App.Analyzers (20)
Infrastructure\VirtualChars\CSharpVirtualCharService.cs (7)
267var charResults = new List<(char ch, TextSpan span)>();
304string tokenText, int offset, int startIndexInclusive, int endIndexExclusive, List<(char ch, TextSpan span)> charResults)
314private static void ConvertCharactersToRunes(List<(char ch, TextSpan span)> charResults, ImmutableList<VirtualChar>.Builder runeResults)
348List<(char ch, TextSpan span)> result, string tokenText, int offset, int index)
361List<(char ch, TextSpan span)> result, string tokenText, int offset, int index)
394List<(char ch, TextSpan span)> result, string tokenText, int offset, int index)
413List<(char ch, TextSpan span)> result, string tokenText, int offset, int index, char character)
Microsoft.AspNetCore.App.Analyzers.Test (13)
RouteEmbeddedLanguage\Infrastructure\MarkupTestFile.cs (7)
53string input, out string output, out int? position, out IDictionary<string, List<TextSpan>> spans)
56var tempSpans = new Dictionary<string, List<TextSpan>>();
70var matches = new List<(int matchIndex, string name)>();
88var orderedMatches = matches.OrderBy(t => t, Comparer<(int matchIndex, string name)>.Create((t1, t2) => t1.matchIndex - t2.matchIndex)).ToList();
191IDictionary<string, List<TextSpan>> spans,
200private static void AddMatch(string input, string value, int currentIndex, List<(int, string)> matches)
214var builder = GetOrAdd(dictionary, string.Empty, _ => new List<TextSpan>());
Microsoft.AspNetCore.App.UnitTests (2)
Microsoft.AspNetCore.Authentication.Abstractions (2)
Microsoft.AspNetCore.Authentication.Certificate (2)
Microsoft.AspNetCore.Authentication.Cookies (4)
Microsoft.AspNetCore.Authentication.Core (1)
Microsoft.AspNetCore.Authentication.Core.Test (7)
Microsoft.AspNetCore.Authentication.JwtBearer (6)
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (5)
Microsoft.AspNetCore.Authentication.Negotiate (1)
Microsoft.AspNetCore.Authentication.OAuth (2)
Microsoft.AspNetCore.Authentication.OpenIdConnect (1)
Microsoft.AspNetCore.Authentication.Test (13)
Microsoft.AspNetCore.Authentication.Twitter (15)
Microsoft.AspNetCore.Authentication.WsFederation (1)
Microsoft.AspNetCore.Authorization (1)
Microsoft.AspNetCore.Authorization.Test (1)
Microsoft.AspNetCore.BrowserTesting (6)
Microsoft.AspNetCore.Components (81)
Microsoft.AspNetCore.Components.Analyzers (2)
Microsoft.AspNetCore.Components.Analyzers.Tests (2)
Microsoft.AspNetCore.Components.Authorization (1)
Microsoft.AspNetCore.Components.Authorization.Tests (6)
Microsoft.AspNetCore.Components.Endpoints (83)
FormMapping\Factories\Collections\TypedCollectionConverterFactory.cs (5)
190CreateConverter<IReadOnlyList<TElement>, List<TElement>>(elementTypeConverter),
192CreateConverter<IReadOnlyCollection<TElement>, List<TElement>>(elementTypeConverter),
196CreateConverter<IList<TElement>, List<TElement>>(elementTypeConverter),
198CreateConverter<ICollection<TElement>, List<TElement>>(elementTypeConverter),
202CreateConverter<IEnumerable<TElement>, List<TElement>>(elementTypeConverter),
FormMapping\Factories\ComplexType\ComplexTypeExpressionConverterFactoryOfT.cs (20)
33var parameters = new List<ParameterExpression>() { readerParam, typeParam, optionsParam, resultParam, foundValueParam };
40var variables = new List<ParameterExpression>() { propertyFoundValue, succeeded, localFoundValueVar, exceptionVar };
42var propertyValueLocals = new List<ParameterExpression>();
43var constructorParameterValueLocals = new List<ParameterExpression>();
45var body = new List<Expression>()
112List<ParameterExpression> constructorParameterValueLocals,
114List<ParameterExpression> propsLocals,
115List<ParameterExpression> variables,
190var assignments = new List<Expression>();
226List<ParameterExpression> constructorParameters,
228List<ParameterExpression> properties,
329List<ParameterExpression> variables,
330List<ParameterExpression> propertyValueLocals,
331List<Expression> body)
428List<ParameterExpression> variables,
429List<ParameterExpression> constructorParameterValueLocals,
430List<Expression> body)
560List<ParameterExpression> parameters,
561List<ParameterExpression> variables,
562List<Expression> body)
Microsoft.AspNetCore.Components.Endpoints.Tests (97)
Binding\FormDataMapperTests.cs (62)
100var errors = new List<FormDataMappingError>();
138var errors = new List<FormDataMappingError>();
296var result = FormDataMapper.Map<List<int>>(reader, options);
311var result = FormDataMapper.Map<List<int>>(reader, options);
328var result = FormDataMapper.Map<List<int>>(reader, options);
346var result = FormDataMapper.Map<List<Colors>>(reader, options);
364var result = FormDataMapper.Map<List<Colors?>>(reader, options);
379var errors = new List<FormDataMappingError>();
388var result = FormDataMapper.Map<List<int>>(reader, options);
404var errors = new List<FormDataMappingError>();
413var result = FormDataMapper.Map<List<int>>(reader, options);
443var result = FormDataMapper.Map<List<int>>(reader, options);
459var rented = new List<int[]>();
460var returned = new List<int[]>();
505var rented = new List<int[]>();
506var returned = new List<int[]>();
575var errors = new List<FormDataMappingError>();
587var result = FormDataMapper.Map<List<int>>(reader, options);
608var expected = new List<int> { 0, 11, 12, 13, 0, 15, 16, 17, 18, 19 };
624var errors = new List<FormDataMappingError>();
632var result = FormDataMapper.Map<List<int>>(reader, options);
635var list = Assert.IsType<List<int>>(result);
665var expected = new List<int> { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 };
666CanDeserialize_Collection<IReadOnlyList<int>, List<int>, int>(expected);
673var expected = new List<int> { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 };
674CanDeserialize_Collection<IReadOnlyCollection<int>, List<int>, int>(expected);
689var expected = new List<int> { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 };
690CanDeserialize_Collection<IList<int>, List<int>, int>(expected);
697var expected = new List<int> { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 };
698CanDeserialize_Collection<ICollection<int>, List<int>, int>(expected);
705var expected = new List<int> { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 };
706CanDeserialize_Collection<IEnumerable<int>, List<int>, int>(expected);
753var expected = new List<int> { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 };
754CanDeserialize_Collection<List<int>, List<int>, int>(expected);
1072var errors = new List<FormDataMappingError>();
1133var errors = new List<FormDataMappingError>();
1192var errors = new List<FormDataMappingError>();
1432var errors = new List<FormDataMappingError>();
1599var errors = new List<FormDataMappingError>();
1793var errors = new List<FormDataMappingError>();
1854var errors = new List<FormDataMappingError>();
1877var errors = new List<FormDataMappingError>();
1908var errors = new List<FormDataMappingError>();
1936var errors = new List<FormDataMappingError>();
1969var errors = new List<FormDataMappingError>();
1991var errors = new List<FormDataMappingError>();
2014var errors = new List<FormDataMappingError>();
2047var errors = new List<FormDataMappingError>();
2418private readonly List<T> _inner = new();
2440public List<RecursiveTree> Children { get; set; }
Microsoft.AspNetCore.Components.Forms (7)
Microsoft.AspNetCore.Components.Forms.Tests (5)
Microsoft.AspNetCore.Components.Performance (1)
Microsoft.AspNetCore.Components.QuickGrid (5)
Microsoft.AspNetCore.Components.QuickGrid.Tests (5)
Microsoft.AspNetCore.Components.SdkAnalyzers (2)
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (2)
Microsoft.AspNetCore.Components.Server (14)
Microsoft.AspNetCore.Components.Server.Tests (43)
Circuits\ServerComponentDeserializerTest.cs (20)
34Assert.True(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
49Assert.True(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
68Assert.True(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
87Assert.True(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
101Assert.True(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
116Assert.True(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
135Assert.True(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
155Assert.True(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
177Assert.True(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
207Assert.True(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
232Assert.False(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
246Assert.False(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
258Assert.False(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
274Assert.False(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
289Assert.False(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
304Assert.False(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
321Assert.True(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
339Assert.False(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
356Assert.False(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
371Assert.False(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
Microsoft.AspNetCore.Components.Tests (57)
PersistentStateValueProviderKeyResolverTests.cs (13)
66var componentStates = CreateComponentState(renderer, [(component1, "key1"), (component2, "key2")], parentComponent);
121var componentStates = CreateComponentState(renderer, [(component1, componentKey1), (component2, componentKey2)], parentComponent);
172var componentStates = CreateComponentState(renderer, [(component1, null), (component2, null)], null);
193var messages = sink.Writes.Where(x => x.LogLevel >= LogLevel.Warning).ToList();
224var componentStates = CreateComponentState(renderer, [(component1, null), (component2, null)], parentComponent);
239var messages = sink.Writes.Where(x => x.LogLevel >= LogLevel.Warning).ToList();
262var componentStates = CreateComponentState(renderer, [(component1, "key1"), (component2, "key1")], parentComponent);
277var messages = sink.Writes.Where(x => x.LogLevel >= LogLevel.Warning).ToList();
301var componentStates = CreateComponentState(renderer, [(component1, componentKeyType1), (component2, componentKeyType2)], parentComponent);
316var messages = sink.Writes.Where(x => x.LogLevel >= LogLevel.Warning).ToList();
328private static List<ComponentState> CreateComponentState(
330List<(IComponent, object)> components,
336var result = new List<ComponentState>();
PersistentStateValueProviderTests.cs (7)
28var componentStates = CreateComponentState(renderer, [(component, null)], null);
61var componentStates = CreateComponentState(renderer, [(component, null)], null);
88var componentStates = CreateComponentState(renderer, [(component, null)], null);
102private static void InitializeState(PersistentComponentState state, List<(ComponentState componentState, string propertyName, string value)> items)
121private static List<ComponentState> CreateComponentState(
123List<(IComponent, object)> components,
129var result = new List<ComponentState>();
Microsoft.AspNetCore.Components.Web (32)
WebRendererSerializerContext.DictionaryStringListString.g.cs (13)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.List<string>>>? _DictionaryStringListString;
19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.List<string>>> DictionaryStringListString
22get => _DictionaryStringListString ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.List<string>>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.List<string>>));
25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.List<string>>> Create_DictionaryStringListString(global::System.Text.Json.JsonSerializerOptions options)
27if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.List<string>>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.List<string>>> jsonTypeInfo))
29var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.List<string>>>
31ObjectCreator = () => new global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.List<string>>(),
35jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateDictionaryInfo<global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.List<string>>, string, global::System.Collections.Generic.List<string>>(options, info);
45private void DictionaryStringListStringSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.List<string>>? value)
55foreach (global::System.Collections.Generic.KeyValuePair<string, global::System.Collections.Generic.List<string>> entry in value)
Microsoft.AspNetCore.Components.Web.Tests (8)
Microsoft.AspNetCore.Components.WebAssembly (13)
Microsoft.AspNetCore.Components.WebAssembly.Server (2)
Microsoft.AspNetCore.Components.WebAssembly.Tests (2)
Microsoft.AspNetCore.Components.WebView (3)
Microsoft.AspNetCore.Components.WebView.Test (4)
Microsoft.AspNetCore.Connections.Abstractions (1)
Microsoft.AspNetCore.CookiePolicy (1)
Microsoft.AspNetCore.CookiePolicy.Test (4)
Microsoft.AspNetCore.DataProtection (16)
Microsoft.AspNetCore.DataProtection.MicroBenchmarks (1)
Microsoft.AspNetCore.DataProtection.Tests (21)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (20)
Microsoft.AspNetCore.Diagnostics (9)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (3)
Microsoft.AspNetCore.Diagnostics.HealthChecks (1)
Microsoft.AspNetCore.Diagnostics.Middleware (4)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (22)
Microsoft.AspNetCore.Diagnostics.Tests (14)
Microsoft.AspNetCore.Grpc.JsonTranscoding (46)
src\Grpc\JsonTranscoding\src\Shared\ServiceDescriptorHelpers.cs (10)
66public static bool TryResolveDescriptors(MessageDescriptor messageDescriptor, IList<string> path, bool allowJsonName, [NotNullWhen(true)]out List<FieldDescriptor>? fieldDescriptors)
224public static void RecursiveSetValue(IMessage currentValue, List<FieldDescriptor> pathDescriptors, object? values)
388List<HttpRouteVariable> variables,
394var path = variable.FieldPath;
395if (!TryResolveDescriptors(messageDescriptor, path, allowJsonName: false, out var fieldDescriptors))
480var existingParameters = new List<FieldDescriptor>();
508static void RecursiveVisitMessages(Dictionary<string, FieldDescriptor> queryParameters, List<FieldDescriptor> existingParameters, MessageDescriptor messageDescriptor, List<FieldDescriptor> path)
671public List<FieldDescriptor> DescriptorsPath { get; }
678List<FieldDescriptor> descriptorsPath,
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (15)
Microsoft.AspNetCore.Grpc.Microbenchmarks (1)
Microsoft.AspNetCore.Grpc.Swagger (21)
src\Grpc\JsonTranscoding\src\Shared\ServiceDescriptorHelpers.cs (10)
66public static bool TryResolveDescriptors(MessageDescriptor messageDescriptor, IList<string> path, bool allowJsonName, [NotNullWhen(true)]out List<FieldDescriptor>? fieldDescriptors)
224public static void RecursiveSetValue(IMessage currentValue, List<FieldDescriptor> pathDescriptors, object? values)
388List<HttpRouteVariable> variables,
394var path = variable.FieldPath;
395if (!TryResolveDescriptors(messageDescriptor, path, allowJsonName: false, out var fieldDescriptors))
480var existingParameters = new List<FieldDescriptor>();
508static void RecursiveVisitMessages(Dictionary<string, FieldDescriptor> queryParameters, List<FieldDescriptor> existingParameters, MessageDescriptor messageDescriptor, List<FieldDescriptor> path)
671public List<FieldDescriptor> DescriptorsPath { get; }
678List<FieldDescriptor> descriptorsPath,
Microsoft.AspNetCore.Grpc.Swagger.Tests (3)
Microsoft.AspNetCore.HeaderParsing (1)
Microsoft.AspNetCore.HostFiltering (2)
Microsoft.AspNetCore.Hosting (15)
Internal\HostingMetrics.cs (1)
45public void RequestEnd(string protocol, string scheme, string method, string? route, int statusCode, bool unhandledRequest, Exception? exception, List<KeyValuePair<string, object?>>? customTags, long startTimestamp, long currentTimestamp, bool disableHttpRequestDurationMetric)
Microsoft.AspNetCore.Hosting.Tests (9)
Microsoft.AspNetCore.Html.Abstractions.Tests (1)
Microsoft.AspNetCore.Http (9)
Microsoft.AspNetCore.Http.Abstractions (7)
Microsoft.AspNetCore.Http.Abstractions.Microbenchmarks (1)
Microsoft.AspNetCore.Http.Abstractions.Tests (3)
Microsoft.AspNetCore.Http.Connections (8)
Microsoft.AspNetCore.Http.Connections.Client (1)
Microsoft.AspNetCore.Http.Connections.Common (1)
Microsoft.AspNetCore.Http.Connections.Tests (6)
Microsoft.AspNetCore.Http.Extensions (40)
src\Components\Endpoints\src\FormMapping\Factories\Collections\TypedCollectionConverterFactory.cs (5)
190CreateConverter<IReadOnlyList<TElement>, List<TElement>>(elementTypeConverter),
192CreateConverter<IReadOnlyCollection<TElement>, List<TElement>>(elementTypeConverter),
196CreateConverter<IList<TElement>, List<TElement>>(elementTypeConverter),
198CreateConverter<ICollection<TElement>, List<TElement>>(elementTypeConverter),
202CreateConverter<IEnumerable<TElement>, List<TElement>>(elementTypeConverter),
src\Components\Endpoints\src\FormMapping\Factories\ComplexType\ComplexTypeExpressionConverterFactoryOfT.cs (20)
33var parameters = new List<ParameterExpression>() { readerParam, typeParam, optionsParam, resultParam, foundValueParam };
40var variables = new List<ParameterExpression>() { propertyFoundValue, succeeded, localFoundValueVar, exceptionVar };
42var propertyValueLocals = new List<ParameterExpression>();
43var constructorParameterValueLocals = new List<ParameterExpression>();
45var body = new List<Expression>()
112List<ParameterExpression> constructorParameterValueLocals,
114List<ParameterExpression> propsLocals,
115List<ParameterExpression> variables,
190var assignments = new List<Expression>();
226List<ParameterExpression> constructorParameters,
228List<ParameterExpression> properties,
329List<ParameterExpression> variables,
330List<ParameterExpression> propertyValueLocals,
331List<Expression> body)
428List<ParameterExpression> variables,
429List<ParameterExpression> constructorParameterValueLocals,
430List<Expression> body)
560List<ParameterExpression> parameters,
561List<ParameterExpression> variables,
562List<Expression> body)
Microsoft.AspNetCore.Http.Features (1)
Microsoft.AspNetCore.Http.Microbenchmarks (8)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (6)
Microsoft.AspNetCore.Http.Results.Tests (28)
Microsoft.AspNetCore.Http.Tests (10)
Microsoft.AspNetCore.HttpLogging (10)
Microsoft.AspNetCore.HttpLogging.Tests (12)
Microsoft.AspNetCore.HttpOverrides (3)
Microsoft.AspNetCore.HttpOverrides.Tests (2)
Microsoft.AspNetCore.HttpsPolicy.Tests (12)
Microsoft.AspNetCore.Identity (1)
Microsoft.AspNetCore.Identity.EntityFrameworkCore (7)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (11)
Microsoft.AspNetCore.Identity.FunctionalTests (5)
Microsoft.AspNetCore.Identity.InMemory.Test (15)
Microsoft.AspNetCore.Identity.Specification.Tests (12)
Microsoft.AspNetCore.Identity.Test (19)
Microsoft.AspNetCore.Identity.UI (1)
Microsoft.AspNetCore.InternalTesting (3)
Microsoft.AspNetCore.InternalTesting.Tests (1)
Microsoft.AspNetCore.JsonPatch (12)
Microsoft.AspNetCore.JsonPatch.SystemTextJson (12)
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (35)
Internal\ListAdapterTest.cs (26)
54var targetObject = new List<string>() { "James", "Mike" };
76var targetObject = new List<string>() { "James", "Mike" };
94var targetObject = new List<string>() { "James", "Mike" };
105public static TheoryData<List<int>, List<int>> AppendAtEndOfListData
109return new TheoryData<List<int>, List<int>>()
125public void Add_Appends_AtTheEnd(List<int> targetObject, List<int> expected)
147var targetObject = new List<string>() { "James", "Mike" };
166var targetObject = new List<SimpleObject>() { sDto };
184var targetObject = new List<int>() { 10, 20 };
310var targetObject = new List<int>(input);
329var targetObject = new List<int>(input);
349var targetObject = new List<int>(input);
368var targetObject = new List<int>(input);
384var targetObject = new List<int>() { 10, 20 };
400var targetObject = new List<int>() { 10, 20 };
412public static TheoryData<string, List<int>> ReplacesValuesAtPositionData
416return new TheoryData<string, List<int>>()
432public void Replace_ReplacesValue_AtGivenPosition(string position, List<int> expected)
436var targetObject = new List<int>() { 10, 20 };
455var targetObject = new List<int>() { 10, 20 };
471var targetObject = new List<int>() { 10, 20 };
508var targetObject = new List<int>(input);
549var targetObject = new List<string> { "a", "b", "c" };
Microsoft.AspNetCore.JsonPatch.Tests (35)
Internal\ListAdapterTest.cs (25)
53var targetObject = new List<string>() { "James", "Mike" };
75var targetObject = new List<string>() { "James", "Mike" };
93var targetObject = new List<string>() { "James", "Mike" };
104public static TheoryData<List<int>, List<int>> AppendAtEndOfListData
108return new TheoryData<List<int>, List<int>>()
124public void Add_Appends_AtTheEnd(List<int> targetObject, List<int> expected)
146var targetObject = new List<string>() { "James", "Mike" };
165var targetObject = new List<SimpleObject>() { sDto };
183var targetObject = new List<int>() { 10, 20 };
309var targetObject = new List<int>(input);
328var targetObject = new List<int>(input);
348var targetObject = new List<int>(input);
367var targetObject = new List<int>(input);
383var targetObject = new List<int>() { 10, 20 };
399var targetObject = new List<int>() { 10, 20 };
411public static TheoryData<string, List<int>> ReplacesValuesAtPositionData
415return new TheoryData<string, List<int>>()
431public void Replace_ReplacesValue_AtGivenPosition(string position, List<int> expected)
435var targetObject = new List<int>() { 10, 20 };
452var targetObject = new List<int>() { 10, 20 };
468var targetObject = new List<int>() { 10, 20 };
485var targetObject = new List<int>() { 10, 20 };
Microsoft.AspNetCore.Localization (3)
Microsoft.AspNetCore.Mvc.Abstractions (3)
Microsoft.AspNetCore.Mvc.Abstractions.Test (2)
Microsoft.AspNetCore.Mvc.Api.Analyzers (4)
Microsoft.AspNetCore.Mvc.ApiExplorer (12)
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (24)
DefaultApiDescriptionProviderTest.cs (18)
665public static TheoryData<Type, string, List<FilterDescriptor>> ReturnsActionResultWithProducesAndProducesContentTypeData
669var filterDescriptors = new List<FilterDescriptor>()
685return new TheoryData<Type, string, List<FilterDescriptor>>
716List<FilterDescriptor> filterDescriptors)
762public static TheoryData<Type, string, List<FilterDescriptor>> ReturnsVoidOrTaskWithProducesContentTypeData
766var filterDescriptors = new List<FilterDescriptor>()
785return new TheoryData<Type, string, List<FilterDescriptor>>
826List<FilterDescriptor> filterDescriptors)
1216var formatters = CreateOutputFormatters();
1321var formatters = CreateInputFormatters();
2264List<MockInputFormatter> inputFormatters = null,
2265List<MockOutputFormatter> outputFormatters = null,
2302private List<MockInputFormatter> CreateInputFormatters()
2305var formatters = new List<MockInputFormatter>()
2320private List<MockOutputFormatter> CreateOutputFormatters()
2323var formatters = new List<MockOutputFormatter>()
2856public List<Type> SupportedTypes { get; } = new List<Type>();
2884public List<Type> SupportedTypes { get; } = new List<Type>();
Microsoft.AspNetCore.Mvc.Core (151)
ApplicationModels\ApplicationModelFactory.cs (19)
54public static List<TResult> Flatten<TResult>(
58var results = new List<TResult>();
60var actionsByMethod = new Dictionary<MethodInfo, List<(ActionModel, SelectorModel)>>();
61var actionsByRouteName = new Dictionary<string, List<(ActionModel, SelectorModel)>>(StringComparer.OrdinalIgnoreCase);
63var routeTemplateErrors = new List<string>();
102var namedRoutedErrors = ValidateNamedAttributeRoutedActions(actionsByRouteName);
122List<string> errors)
174Dictionary<MethodInfo, List<(ActionModel, SelectorModel)>> actionsByMethod,
178if (!actionsByMethod.TryGetValue(action.ActionMethod, out var actions))
188Dictionary<string, List<(ActionModel action, SelectorModel selector)>> actionsByRouteName,
198if (!actionsByRouteName.TryGetValue(routeName, out var actions))
207private static List<string> AddErrorNumbers(IEnumerable<string> namedRoutedErrors)
218private static List<string> ValidateNamedAttributeRoutedActions(
219Dictionary<string, List<(ActionModel action, SelectorModel selector)>> actionsByRouteName)
221var namedRouteErrors = new List<string>();
257List<(ActionModel action, SelectorModel selector)> actions,
292List<(ActionModel action, SelectorModel selector)> actions)
297var actionDescriptions = new List<string>(actions.Count);
339var errorMessages = AddErrorNumbers(individualErrors);
Microsoft.AspNetCore.Mvc.Core.Test (182)
Microsoft.AspNetCore.Mvc.Core.TestCommon (7)
Microsoft.AspNetCore.Mvc.DataAnnotations (3)
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (4)
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (8)
Microsoft.AspNetCore.Mvc.FunctionalTests (172)
Microsoft.AspNetCore.Mvc.IntegrationTests (158)
Microsoft.AspNetCore.Mvc.Localization.Test (5)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (7)
Microsoft.AspNetCore.Mvc.Razor (3)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (4)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (6)
Microsoft.AspNetCore.Mvc.Razor.Test (4)
Microsoft.AspNetCore.Mvc.RazorPages (16)
Microsoft.AspNetCore.Mvc.RazorPages.Test (13)
Microsoft.AspNetCore.Mvc.TagHelpers (8)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (31)
Microsoft.AspNetCore.Mvc.Test (2)
Microsoft.AspNetCore.Mvc.TestDiagnosticListener (1)
Microsoft.AspNetCore.Mvc.Testing (4)
Microsoft.AspNetCore.Mvc.ViewFeatures (29)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (123)
Buffers\ViewBufferTextWriterTest.cs (3)
65var expected = new List<object> { "False", newLine, "1.1", newLine, "3", newLine };
84var expected = new List<object> { "False", newLine, "1.1", newLine, "3", newLine };
162var pages = new List<ViewBufferPage>();
Rendering\HtmlHelperNameExtensionsTest.cs (14)
18private static readonly List<string> _staticCollection = new List<string>();
21private readonly List<string> _collection = new List<string>();
23private readonly List<string[]> _nestedCollection = new List<string[]>();
26private static List<string> StaticCollection { get; }
30private List<string> Collection { get; }
34private List<string[]> NestedCollection { get; }
248public static TheoryData<Expression<Func<List<OuterClass>, string>>, string, string> StaticExpressionNamesData
259private TheoryData<Expression<Func<List<OuterClass>, string>>, string, string> ExpressionNamesData
263var collection = new List<string>();
264var nestedCollection = new List<string[]>();
269return new TheoryData<Expression<Func<List<OuterClass>, string>>, string, string>
307Expression<Func<List<OuterClass>, string>> expression,
312var model = new List<OuterClass>();
328var collection = new List<string>();
ViewDataDictionaryTest.cs (6)
126{ new List<int>(), typeof(List<int>) },
127{ new List<string>(), typeof(List<string>) },
128{ new List<TestModel>(), typeof(List<TestModel>) },
152var model = new List<TestModel>()
227{ typeof(List<string>), new List<string>() },
271[InlineData(typeof(List<string>), new object[] { 1, 2, 3 }, typeof(object[]))]
Microsoft.AspNetCore.OpenApi (25)
Microsoft.AspNetCore.OpenApi.Microbenchmarks (1)
Microsoft.AspNetCore.OpenApi.SourceGenerators (16)
XmlCommentGenerator.Parser.cs (6)
44internal static List<(string, string)> ParseXmlFile(AdditionalText additionalText, CancellationToken cancellationToken)
61var comments = new List<(string, string)>();
73internal static List<(string, string)> ParseCompilation(Compilation compilation, CancellationToken cancellationToken)
78var comments = new List<(string, string)>();
114(List<(string, string)> RawComments, Compilation Compilation) input,
118var comments = new List<(string, XmlComment?)>();
Microsoft.AspNetCore.OpenApi.Tests (32)
Microsoft.AspNetCore.OutputCaching (5)
Microsoft.AspNetCore.OutputCaching.Microbenchmarks (1)
Microsoft.AspNetCore.OutputCaching.Tests (9)
Microsoft.AspNetCore.Owin.Microbenchmarks (1)
Microsoft.AspNetCore.Owin.Tests (4)
Microsoft.AspNetCore.RateLimiting (1)
Microsoft.AspNetCore.RateLimiting.Tests (7)
Microsoft.AspNetCore.Razor (4)
Microsoft.AspNetCore.Razor.Runtime (5)
Microsoft.AspNetCore.Razor.Runtime.Test (1)
Microsoft.AspNetCore.Razor.Test (6)
Microsoft.AspNetCore.RequestDecompression.Microbenchmarks (1)
Microsoft.AspNetCore.RequestDecompression.Tests (12)
Microsoft.AspNetCore.ResponseCaching (4)
Microsoft.AspNetCore.ResponseCaching.Microbenchmarks (1)
Microsoft.AspNetCore.ResponseCaching.Tests (10)
Microsoft.AspNetCore.ResponseCompression.Microbenchmarks (1)
Microsoft.AspNetCore.ResponseCompression.Tests (5)
Microsoft.AspNetCore.Rewrite (7)
Microsoft.AspNetCore.Rewrite.Tests (16)
Microsoft.AspNetCore.Routing (137)
Matching\DfaMatcherBuilder.cs (27)
18private readonly List<RouteEndpoint> _endpoints = new List<RouteEndpoint>();
29private readonly List<KeyValuePair<string, object>> _slots;
30private readonly List<(string parameterName, int segmentIndex, int slotIndex)> _captures;
31private readonly List<(RoutePatternPathSegment pathSegment, int segmentIndex)> _complexSegments;
32private readonly List<KeyValuePair<string, IRouteConstraint>> _constraints;
72var work = new List<DfaBuilderWorkerWorkItem>(_endpoints.Count);
163private List<DfaBuilderWorkerWorkItem> _previousWork;
164private List<DfaBuilderWorkerWorkItem> _work;
171List<DfaBuilderWorkerWorkItem> work,
192var nextWork = _previousWork;
212List<DfaNode> nextParents;
253List<DfaNode> parents,
254List<DfaNode> nextParents,
372private void AddParentsMatchingComplexSegment(RouteEndpoint endpoint, List<DfaNode> nextParents, RoutePatternPathSegment segment, DfaNode parent, RoutePatternParameterPart parameterPart)
425private void AddParentsWithMatchingLiteralConstraints(List<DfaNode> nextParents, DfaNode parent, RoutePatternParameterPart parameterPart, IReadOnlyList<RoutePatternParameterPolicyReference> parameterPolicyReferences)
473private void AddRequiredLiteralValue(RouteEndpoint endpoint, List<DfaNode> nextParents, DfaNode parent, RoutePatternParameterPart parameterPart, object requiredValue)
495private static void AddLiteralNode(bool includeLabel, List<DfaNode> nextParents, DfaNode parent, string literal)
649List<IEndpointSelectorPolicy> endpointSelectorPolicies = null;
889var work = new List<DfaNode>() { node, };
890List<DfaNode> previousWork = null;
896List<DfaNode> nextWork;
955var nodeBuilderPolicies = new List<INodeBuilderPolicy>();
956var endpointComparerPolicies = new List<IEndpointComparerPolicy>();
957var endpointSelectorPolicies = new List<IEndpointSelectorPolicy>();
996public List<DfaNode> Parents { get; }
998public DfaBuilderWorkerWorkItem(RouteEndpoint endpoint, int precedenceDigit, List<DfaNode> parents)
1005public void Deconstruct(out RouteEndpoint endpoint, out int precedenceDigit, out List<DfaNode> parents)
Microsoft.AspNetCore.Routing.Abstractions (7)
Microsoft.AspNetCore.Routing.FunctionalTests (12)
MinimalFormTests.cs (12)
55var nameValueCollection = new List<KeyValuePair<string, string>>
115var nameValueCollection = new List<KeyValuePair<string, string>>
161var nameValueCollection = new List<KeyValuePair<string, string>>
200var nameValueCollection = new List<KeyValuePair<string, string>>
277var nameValueCollection = new List<KeyValuePair<string, string>>
324var nameValueCollection = new List<KeyValuePair<string, string>>
420var nameValueCollection = new List<KeyValuePair<string, string>>
476var nameValueCollection = new List<KeyValuePair<string, string>>
535var nameValueCollection = new List<KeyValuePair<string, string>>
587var nameValueCollection = new List<KeyValuePair<string, string>>
639var nameValueCollection = new List<KeyValuePair<string, string>>
688var nameValueCollection = new List<KeyValuePair<string, string>>
Microsoft.AspNetCore.Routing.Microbenchmarks (12)
Microsoft.AspNetCore.Routing.Tests (108)
Tree\LinkGenerationDecisionTreeTest.cs (48)
16var entries = new List<OutboundMatch>();
36var entries = new List<OutboundMatch>();
56var entries = new List<OutboundMatch>();
76var entries = new List<OutboundMatch>();
98var entries = new List<OutboundMatch>();
122var entries = new List<OutboundMatch>();
146var entries = new List<OutboundMatch>();
166var entries = new List<OutboundMatch>();
188var entries = new List<OutboundMatch>();
213var entries = new List<OutboundMatch>();
229var matches = tree.GetMatches(context.Values, context.AmbientValues).Select(m => m.Match).ToList();
239var entries = new List<OutboundMatch>();
253var matches = tree.GetMatches(context.Values, context.AmbientValues).Select(m => m.Match).ToList();
264var entries = new List<OutboundMatch>();
280var matches = tree.GetMatches(context.Values, context.AmbientValues).Select(m => m.Match).ToList();
291var entries = new List<OutboundMatch>();
306var matches = tree.GetMatches(context.Values, context.AmbientValues).Select(m => m.Match).ToList();
317var entries = new List<OutboundMatch>();
332var matches = tree.GetMatches(context.Values, context.AmbientValues).Select(m => m.Match).ToList();
342var entries = new List<OutboundMatch>();
357var matches = tree.GetMatches(context.Values, context.AmbientValues).Select(m => m.Match).ToList();
370var entries = new List<OutboundMatch>();
385var matches = tree.GetMatches(context.Values, context.AmbientValues).Select(m => m.Match).ToList();
398var entries = new List<OutboundMatch>();
413var matches = tree.GetMatches(context.Values, context.AmbientValues).Select(m => m.Match).ToList();
426var entries = new List<OutboundMatch>();
441var matches = tree.GetMatches(context.Values, context.AmbientValues).Select(m => m.Match).ToList();
453var entries = new List<OutboundMatch>();
468var matches = tree.GetMatches(context.Values, context.AmbientValues).Select(m => m.Match).ToList();
481var entries = new List<OutboundMatch>();
496var matches = tree.GetMatches(context.Values, context.AmbientValues).Select(m => m.Match).ToList();
509var entries = new List<OutboundMatch>();
524var matches = tree.GetMatches(context.Values, context.AmbientValues).Select(m => m.Match).ToList();
536var entries = new List<OutboundMatch>();
551var matches = tree.GetMatches(context.Values, context.AmbientValues).Select(m => m.Match).ToList();
563var entries = new List<OutboundMatch>();
578var matches = tree.GetMatches(context.Values, context.AmbientValues).Select(m => m.Match).ToList();
588var entries = new List<OutboundMatch>();
603var matches = tree.GetMatches(context.Values, context.AmbientValues).Select(m => m.Match).ToList();
613var entries = new List<OutboundMatch>();
628var matches = tree.GetMatches(context.Values, context.AmbientValues).Select(m => m.Match).ToList();
640var entries = new List<OutboundMatch>();
655var matches = tree.GetMatches(context.Values, context.AmbientValues).Select(m => m.Match).ToList();
667var entries = new List<OutboundMatch>();
682var matches = tree.GetMatches(context.Values, context.AmbientValues).Select(m => m.Match).ToList();
692var entries = new List<OutboundMatch>();
707var matches = tree.GetMatches(context.Values, context.AmbientValues).Select(m => m.Match).ToList();
717var entries = new List<OutboundMatch>();
Microsoft.AspNetCore.Security.Microbenchmarks (1)
Microsoft.AspNetCore.Server.HttpSys (7)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (5)
Microsoft.AspNetCore.Server.HttpSys.Microbenchmarks (3)
Microsoft.AspNetCore.Server.IIS (8)
Microsoft.AspNetCore.Server.IntegrationTesting (6)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (2)
Microsoft.AspNetCore.Server.Kestrel.Core (71)
Internal\Infrastructure\KestrelMetrics.cs (2)
101public void ConnectionStop(ConnectionMetricsContext metricsContext, Exception? exception, List<KeyValuePair<string, object?>>? customTags, long startTimestamp, long currentTimestamp)
110private void ConnectionStopCore(ConnectionMetricsContext metricsContext, Exception? exception, List<KeyValuePair<string, object?>>? customTags, long startTimestamp, long currentTimestamp)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (46)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (9)
Microsoft.AspNetCore.Server.Kestrel.Tests (2)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (2)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (5)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (9)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (2)
Microsoft.AspNetCore.Session.Tests (6)
Microsoft.AspNetCore.Shared.Tests (83)
TestCertificateManager.cs (12)
17private readonly Dictionary<StoreKey, List<InMemoryCertificateEntry>> _stores = new();
20private readonly List<X509Certificate2> _correctedCertificates = new();
21private readonly List<X509Certificate2> _trustedCertificates = new();
63var store = GetOrCreateStore(storeName, storeLocation);
73if (!_stores.TryGetValue(new StoreKey(storeName, storeLocation), out var entries))
83if (_stores.Remove(new StoreKey(storeName, storeLocation), out var entries))
256protected override void PopulateCertificatesFromStore(X509Store store, List<X509Certificate2> certificates, bool requireExportable)
264if (!_stores.TryGetValue(storeKey, out var entries))
310if (!_stores.TryGetValue(new StoreKey(storeName, storeLocation), out var entries))
338private List<InMemoryCertificateEntry> GetOrCreateStore(StoreName storeName, StoreLocation storeLocation)
341if (!_stores.TryGetValue(key, out var entries))
379if (!_stores.TryGetValue(new StoreKey(storeName, storeLocation), out var entries))
TypeNameHelperTest.cs (16)
15[InlineData(typeof(List<int>), "System.Collections.Generic.List<int>")]
17[InlineData(typeof(Dictionary<int, List<string>>), "System.Collections.Generic.Dictionary<int, System.Collections.Generic.List<string>>")]
18[InlineData(typeof(List<List<string>>), "System.Collections.Generic.List<System.Collections.Generic.List<string>>")]
63[InlineData(typeof(List<int>), "List<int>")]
65[InlineData(typeof(Dictionary<int, List<string>>), "Dictionary<int, List<string>>")]
66[InlineData(typeof(List<List<string>>), "List<List<string>>")]
113[InlineData(typeof(List<int[,][,,]>), true, "System.Collections.Generic.List<int[,][,,]>")]
114[InlineData(typeof(List<int[,,][,]>[,][,,]), false, "List<int[,,][,]>[,][,,]")]
139{ typeof(List<>), false, "List<>" },
141{ typeof(List<>), true , "System.Collections.Generic.List<>" },
227{ typeof(List<int>), "System.Collections.Generic.List" },
229{ typeof(Dictionary<int, List<string>>), "System.Collections.Generic.Dictionary" },
230{ typeof(List<List<string>>), "System.Collections.Generic.List" },
Microsoft.AspNetCore.SignalR.Client.Core (7)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (15)
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (7)
Microsoft.AspNetCore.SignalR.Client.Tests (39)
Microsoft.AspNetCore.SignalR.Common (3)
Microsoft.AspNetCore.SignalR.Common.Tests (4)
Microsoft.AspNetCore.SignalR.Core (16)
DefaultHubLifetimeManager.cs (5)
101List<Task>? tasks = null;
147private static void SendToGroupConnections(string methodName, object?[] args, ConcurrentDictionary<string, HubConnectionContext> connections, Func<HubConnectionContext, object?, bool>? include, object? state, ref List<Task>? tasks, ref SerializedHubMessage? message, CancellationToken cancellationToken)
211List<Task>? tasks = null;
228List<Task>? tasks = null;
261List<Task>? tasks = null;
Microsoft.AspNetCore.SignalR.Microbenchmarks (13)
Microsoft.AspNetCore.SignalR.Protocols.Json (1)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (4)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (4)
Microsoft.AspNetCore.SignalR.Specification.Tests (6)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (13)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (10)
Microsoft.AspNetCore.SignalR.Tests (21)
Microsoft.AspNetCore.SignalR.Tests.Utils (10)
Microsoft.AspNetCore.SpaServices.Extensions.Tests (2)
Microsoft.AspNetCore.StaticAssets (37)
Microsoft.AspNetCore.StaticAssets.Tests (2)
Microsoft.AspNetCore.Tests (10)
Microsoft.AspNetCore.WebSockets (1)
Microsoft.AspNetCore.WebSockets.ConformanceTests (3)
Microsoft.AspNetCore.WebSockets.Microbenchmarks (1)
Microsoft.AspNetCore.WebUtilities (4)
Microsoft.AspNetCore.WebUtilities.Microbenchmarks (2)
Microsoft.AspNetCore.WebUtilities.Tests (2)
Microsoft.Build (768)
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupIntrinsicTask.cs (14)
54List<string> parameterValues = null;
57List<ItemBucket> buckets = null;
87var keepMetadataEvaluated = bucket.Expander.ExpandIntoStringListLeaveEscaped(child.KeepMetadata, ExpanderOptions.ExpandAll, child.KeepMetadataLocation).ToList();
96var removeMetadataEvaluated = bucket.Expander.ExpandIntoStringListLeaveEscaped(child.RemoveMetadata, ExpanderOptions.ExpandAll, child.RemoveMetadataLocation).ToList();
105var matchOnMetadataEvaluated = bucket.Expander.ExpandIntoStringListLeaveEscaped(child.MatchOnMetadata, ExpanderOptions.ExpandAll, child.MatchOnMetadataLocation).ToList();
170List<ProjectItemInstance> itemsToAdd = ExpandItemIntoItems(child, bucket.Expander, keepMetadata, removeMetadata, loggingContext);
261List<ProjectItemInstance> itemsToRemove;
356private void GetBatchableValuesFromBuildItemGroupChild(List<string> parameterValues, ProjectItemGroupTaskItemInstance child)
391private List<ProjectItemInstance> ExpandItemIntoItems(
400List<ProjectItemInstance> items = new List<ProjectItemInstance>();
492List<string> metadataToRemove = null;
586private List<ProjectItemInstance> FindItemsMatchingSpecification(
636List<ProjectItemInstance> itemsRemoved = new List<ProjectItemInstance>();
654private List<ProjectItemInstance> FindItemsMatchingMetadataSpecification(
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (22)
164out List<string> targetOutputItemSpecs);
165List<string> itemVectorsReferencedOnlyInTargetOutputs = null;
183out List<string> itemVectorsReferencedInBothTargetInputsAndOutputs,
184out List<string> itemVectorsReferencedOnlyInTargetInputs,
409out List<string> targetOutputItemSpecs)
520List<string> itemVectorsReferencedOnlyInTargetInputs,
521List<string> targetOutputItemSpecs)
528List<string> discreteTargetInputItemSpecs = GetItemSpecsFromItemVectors(itemVectorTransformsInTargetInputs);
550List<string> inputs = CollectionHelpers.RemoveNulls<string>(discreteTargetInputItemSpecs);
551List<string> outputs = CollectionHelpers.RemoveNulls<string>(targetOutputItemSpecs);
592List<string> itemVectorsReferencedInBothTargetInputsAndOutputs,
622List<ProjectItemInstance> upToDateInputItems = new List<ProjectItemInstance>(inputItems);
742List<string> targetOutputItemSpecs)
744List<string> targetInputItemSpecs = GetItemSpecsFromItemVectors(itemVectorsInTargetInputs);
748List<string> inputs = CollectionHelpers.RemoveNulls<string>(targetInputItemSpecs);
749List<string> outputs = CollectionHelpers.RemoveNulls<string>(targetOutputItemSpecs);
882private static List<string> GetItemSpecsFromItemVectors(ItemVectorPartitionCollection itemVectors)
884List<string> itemSpecs = new();
926private static void DiffHashtables<K, V>(IDictionary<K, V> h1, IDictionary<K, V> h2, out List<K> commonKeys, out List<K> uniqueKeysInH1, out List<K> uniqueKeysInH2) where K : class, IEquatable<K> where V : class
1247private readonly List<DependencyAnalysisLogDetail> _dependencyAnalysisDetail = new List<DependencyAnalysisLogDetail>();
BackEnd\Components\Scheduler\Scheduler.cs (34)
269internal delegate void AssignUnscheduledRequestsDelegate(List<ScheduleResponse> responses, HashSet<int> idleNodes);
336List<ScheduleResponse> responses = new List<ScheduleResponse>();
409List<ScheduleResponse> responses = new List<ScheduleResponse>();
554List<ScheduleResponse> responses = new List<ScheduleResponse>();
654public List<ScheduleResponse> ReleaseCores(int requestId, int coresToRelease)
659List<ScheduleResponse> responses = new List<ScheduleResponse>();
720private void ScheduleUnassignedRequests(List<ScheduleResponse> responses)
839private void AssignUnscheduledRequestsToNodes(List<ScheduleResponse> responses, HashSet<int> idleNodes)
965private void AssignUnscheduledRequestsWithPlanByMostImmediateReferences(List<ScheduleResponse> responses, HashSet<int> idleNodes)
973private void AssignUnscheduledRequestsWithPlanByGreatestPlanTime(List<ScheduleResponse> responses, HashSet<int> idleNodes)
978private void AssignUnscheduledRequestsWithPlan(List<ScheduleResponse> responses, HashSet<int> idleNodes, Func<SchedulingPlan.PlanConfigData, SchedulingPlan.PlanConfigData, bool> comparisonFunction)
1021private void AssignUnscheduledRequestsByTraversalsFirst(List<ScheduleResponse> responses, HashSet<int> idleNodes)
1030private void AssignUnscheduledProxyBuildRequestsToInProcNode(List<ScheduleResponse> responses, HashSet<int> idleNodes)
1035private void AssignUnscheduledRequestsToInProcNode(List<ScheduleResponse> responses, HashSet<int> idleNodes, Func<SchedulableRequest, bool> shouldBeScheduled)
1074private void AssignUnscheduledRequestsWithConfigurationCountLevelling(List<ScheduleResponse> responses, HashSet<int> idleNodes)
1113private void AssignUnscheduledRequestsWithSmallestFileSize(List<ScheduleResponse> responses, HashSet<int> idleNodes)
1155private void AssignUnscheduledRequestsWithLargestFileSize(List<ScheduleResponse> responses, HashSet<int> idleNodes)
1197private void AssignUnscheduledRequestsWithMaxWaitingRequests(List<ScheduleResponse> responses, HashSet<int> idleNodes)
1274private void AssignUnscheduledRequestsWithMaxWaitingRequests2(List<ScheduleResponse> responses, HashSet<int> idleNodes)
1302private void AssignUnscheduledRequestsFIFO(List<ScheduleResponse> responses, HashSet<int> idleNodes)
1334private void AssignUnscheduledRequestsUsingCustomSchedulerForSQL(List<ScheduleResponse> responses, HashSet<int> idleNodes)
1358List<int> nodesByConfigurationCountAscending = new List<int>(_availableNodes.Keys);
1407private void AssignUnscheduledRequestToNode(SchedulableRequest request, int nodeId, List<ScheduleResponse> responses)
1526private bool CreateNewNodeIfPossible(List<ScheduleResponse> responses, IEnumerable<SchedulableRequest> requests)
1712private void HandleRequestBlockedOnResultsTransfer(SchedulableRequest parentRequest, List<ScheduleResponse> responses)
1740private void HandleRequestBlockedByNewRequests(SchedulableRequest parentRequest, BuildRequestBlocker blocker, List<ScheduleResponse> responses)
1880private void ResumeReadyRequestIfAny(int nodeId, List<ScheduleResponse> responses)
1901private void ResolveRequestFromCacheAndResumeIfPossible(SchedulableRequest request, List<ScheduleResponse> responses)
1969private void ResumeRequiredWork(List<ScheduleResponse> responses)
2023private bool CheckIfCacheMissOnReferencedProjectIsAllowedAndErrorIfNot(int nodeForResults, BuildRequest request, List<ScheduleResponse> responses, bool emitNonErrorLogs)
2349private bool TargetsMatch(HashSet<string> firstTargetsSet, List<string> secondTargetsList)
2643List<SchedulableRequest> childRequests = new List<SchedulableRequest>(_schedulingData.GetRequestsByHierarchy(request));
2739List<SchedulableRequest> scheduledRequestsByNode = new List<SchedulableRequest>(_schedulingData.GetScheduledRequestsByNode(nodeId));
2838List<int> configurations = new List<int>(_schedulingData.Configurations);
BackEnd\Components\SdkResolution\SdkResolverLoader.cs (7)
39var resolvers = !string.Equals(IncludeDefaultResolver, "false", StringComparison.OrdinalIgnoreCase) ?
48var resolvers = !string.Equals(IncludeDefaultResolver, "false", StringComparison.OrdinalIgnoreCase) ?
106List<SdkResolverManifest> manifestsList = new List<SdkResolverManifest>();
175private bool TryAddAssemblyManifestFromXml(string pathToManifest, string manifestFolder, List<SdkResolverManifest> manifestsList, ElementLocation location)
212private bool TryAddAssemblyManifestFromDll(string assemblyPath, List<SdkResolverManifest> manifestsList)
284var resolvers = new List<SdkResolver>();
296protected virtual void LoadResolvers(string resolverPath, ElementLocation location, List<SdkResolver> resolvers)
BuildCheck\Infrastructure\BuildCheckCentralContext.cs (15)
21Action<List<CheckWrapper>?, ICheckContext> removeCheck)
28List<(CheckWrapper, Action<BuildCheckDataContext<EvaluatedPropertiesCheckData>>)> EvaluatedPropertiesActions,
30List<(CheckWrapper, Action<BuildCheckDataContext<ParsedItemsCheckData>>)> ParsedItemsActions,
32List<(CheckWrapper, Action<BuildCheckDataContext<EvaluatedItemsCheckData>>)> EvaluatedItemsActions,
33List<(CheckWrapper, Action<BuildCheckDataContext<TaskInvocationCheckData>>)> TaskInvocationActions,
34List<(CheckWrapper, Action<BuildCheckDataContext<PropertyReadData>>)> PropertyReadActions,
35List<(CheckWrapper, Action<BuildCheckDataContext<PropertyWriteData>>)> PropertyWriteActions,
36List<(CheckWrapper, Action<BuildCheckDataContext<ProjectRequestProcessingDoneData>>)> ProjectRequestProcessingDoneActions,
37List<(CheckWrapper, Action<BuildCheckDataContext<BuildFinishedCheckData>>)> BuildFinishedActions,
38List<(CheckWrapper, Action<BuildCheckDataContext<EnvironmentVariableCheckData>>)> EnvironmentVariableCheckDataActions,
39List<(CheckWrapper, Action<BuildCheckDataContext<ProjectImportedCheckData>>)> ProjectImportedCheckDataActions)
60private readonly Action<List<CheckWrapper>?, ICheckContext> _removeChecks;
114List<(CheckWrapper, Action<BuildCheckDataContext<T>>)> handlersRegistry)
208List<(CheckWrapper, Action<BuildCheckDataContext<T>>)> registeredCallbacks,
215List<CheckWrapper>? checksToRemove = null;
Collections\ItemDictionarySlim.cs (14)
14internal sealed class ItemDictionarySlim : IEnumerable<KeyValuePair<string, List<ProjectItemInstance>>>
16private readonly Dictionary<string, List<ProjectItemInstance>> _itemLists;
19_itemLists = new Dictionary<string, List<ProjectItemInstance>>(MSBuildNameIgnoreCaseComparer.Default);
24public List<ProjectItemInstance>? this[string itemType] =>
25_itemLists.TryGetValue(itemType, out List<ProjectItemInstance>? itemsOfType) ? itemsOfType : null;
37if (!_itemLists.TryGetValue(projectItem.ItemType, out List<ProjectItemInstance>? list))
55foreach (KeyValuePair<string, List<ProjectItemInstance>> kvp in other._itemLists)
58List<ProjectItemInstance> itemsToAdd = kvp.Value;
60if (_itemLists.TryGetValue(itemType, out List<ProjectItemInstance>? list))
78if (!_itemLists.TryGetValue(itemType, out List<ProjectItemInstance>? list))
95if (!_itemLists.TryGetValue(itemType, out List<ProjectItemInstance>? list))
107public Dictionary<string, List<ProjectItemInstance>>.Enumerator GetEnumerator() => _itemLists.GetEnumerator();
109IEnumerator<KeyValuePair<string, List<ProjectItemInstance>>> IEnumerable<KeyValuePair<string, List<ProjectItemInstance>>>.GetEnumerator() => GetEnumerator();
Definition\Project.cs (45)
659public IDictionary<string, List<string>> ConditionedProperties => implementation.ConditionedProperties;
926public List<GlobResult> GetAllGlobs()
938public List<GlobResult> GetAllGlobs(EvaluationContext evaluationContext)
947public List<GlobResult> GetAllGlobs(string itemType)
960public List<GlobResult> GetAllGlobs(string itemType, EvaluationContext evaluationContext)
1009public List<ProvenanceResult> GetItemProvenance(string itemToMatch)
1022public List<ProvenanceResult> GetItemProvenance(string itemToMatch, EvaluationContext evaluationContext)
1032public List<ProvenanceResult> GetItemProvenance(string itemToMatch, string itemType)
1046public List<ProvenanceResult> GetItemProvenance(string itemToMatch, string itemType, EvaluationContext evaluationContext)
1059public List<ProvenanceResult> GetItemProvenance(ProjectItem item)
1076public List<ProvenanceResult> GetItemProvenance(ProjectItem item, EvaluationContext evaluationContext)
1507var loggers = new List<ILogger>(1) { logger };
1685var relevantItems = new List<ProjectItem>();
2200public override IDictionary<string, List<string>> ConditionedProperties
2207return ReadOnlyEmptyDictionary<string, List<string>>.Instance;
2210return new ObjectModel.ReadOnlyDictionary<string, List<string>>(_data.ConditionedProperties);
2262var imports = new List<ResolvedImport>(_data.ImportClosure.Count - 1 /* outer project */);
2285var imports = new List<ResolvedImport>(_data.ImportClosureWithDuplicates.Count - 1 /* outer project */);
2514public override List<GlobResult> GetAllGlobs(EvaluationContext evaluationContext)
2527public override List<GlobResult> GetAllGlobs(string itemType, EvaluationContext evaluationContext)
2569private List<GlobResult> GetAllGlobs(List<ProjectItemElement> projectItemElements)
2597var globResults = new List<GlobResult>(projectItemElements.Count);
2627List<ItemSpecFragment> includeGlobFragmentsList = null;
2708public override List<ProvenanceResult> GetItemProvenance(string itemToMatch, EvaluationContext evaluationContext)
2722public override List<ProvenanceResult> GetItemProvenance(string itemToMatch, string itemType, EvaluationContext evaluationContext)
2739public override List<ProvenanceResult> GetItemProvenance(ProjectItem item, EvaluationContext evaluationContext)
2759private List<ProjectItemElement> GetEvaluatedItemElements(EvaluationContext evaluationContext)
2770private static IEnumerable<ProjectItemElement> GetItemElementsThatMightAffectItem(List<ProjectItemElement> evaluatedItemElements, ProjectItem item)
2789private static List<ProjectItemElement> GetItemElementsByType(IEnumerable<ProjectItemElement> itemElements, string itemType)
2794private List<ProvenanceResult> GetItemProvenance(string itemToMatch, IEnumerable<ProjectItemElement> projectItemElements)
3263var itemsList = new List<ProjectItem>(items);
3420var relevantItems = new List<ProjectItem>();
3548List<ProjectItem> items = Evaluator<ProjectProperty, ProjectItem, ProjectMetadata, ProjectItemDefinition>.CreateItemsFromInclude(
3611private List<ProjectItem> AddItemHelper(ProjectItemElement itemElement, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata)
3615List<ProjectItem> items = Evaluator<ProjectProperty, ProjectItem, ProjectMetadata, ProjectItemDefinition>.CreateItemsFromInclude(
4075public List<string> DefaultTargets { get; set; }
4099public List<string> InitialTargets { get; set; }
4104public IDictionary<string, List<TargetSpecification>> BeforeTargets { get; set; }
4109public IDictionary<string, List<TargetSpecification>> AfterTargets { get; set; }
4143public List<ProjectItemElement> EvaluatedItemElements { get; private set; }
4176public Dictionary<string, List<string>> ConditionedProperties { get; private set; }
4259internal List<ResolvedImport> ImportClosure { get; private set; }
4265internal List<ResolvedImport> ImportClosureWithDuplicates { get; private set; }
4292ConditionedProperties = new Dictionary<string, List<string>>(MSBuildNameIgnoreCaseComparer.Default);
Evaluation\Evaluator.cs (36)
81private readonly List<ProjectItemGroupElement> _itemGroupElements;
87private readonly List<ProjectItemDefinitionGroupElement> _itemDefinitionGroupElements;
95private readonly List<KeyValuePair<string, ProjectUsingTaskElement>> _usingTaskElements;
101private readonly List<ProjectTargetElement> _targetElements;
112private readonly List<string> _initialTargetsList;
192private List<string> _streamImports;
376internal static List<I> CreateItemsFromInclude(string rootDirectory, ProjectItemElement itemElement, IItemFactory<I, I> itemFactory, string unevaluatedIncludeEscaped, Expander<P, I> expander, ILoggingService loggingService, string buildEventFileInfoFullPath, BuildEventContext buildEventContext)
380List<I> items = new List<I>();
439List<ProjectTaskInstanceChild> taskOutputs = new List<ProjectTaskInstanceChild>(taskElement.Count);
481List<ProjectPropertyGroupTaskPropertyInstance> properties = new List<ProjectPropertyGroupTaskPropertyInstance>(propertyGroupElement.Count);
511List<ProjectItemGroupTaskItemInstance> items = new List<ProjectItemGroupTaskItemInstance>(itemGroupElement.Count);
515List<ProjectItemGroupTaskMetadataInstance> metadata = itemElement.Metadata.Count > 0 ? new List<ProjectItemGroupTaskMetadataInstance>() : null;
562List<ProjectTargetInstanceChild> targetChildren = new List<ProjectTargetInstanceChild>(targetElement.Count);
563List<ProjectOnErrorInstance> targetOnErrorChildren = new List<ProjectOnErrorInstance>();
673List<string> initialTargets = new List<string>(_initialTargetsList.Count);
767Dictionary<string, List<TargetSpecification>> targetsWhichRunBeforeByTarget = new Dictionary<string, List<TargetSpecification>>(StringComparer.OrdinalIgnoreCase);
768Dictionary<string, List<TargetSpecification>> targetsWhichRunAfterByTarget = new Dictionary<string, List<TargetSpecification>>(StringComparer.OrdinalIgnoreCase);
839List<P> list = new(dictionary.Count);
893List<ProjectImportElement> implicitImports = currentProjectOrImport.GetImplicitImportNodes(currentProjectOrImport);
970List<string> temp = new List<string>(expanded.Split(s_splitter, StringSplitOptions.RemoveEmptyEntries));
1067private void AddBeforeAndAfterTargetMappings(ProjectTargetElement targetElement, Dictionary<string, LinkedListNode<ProjectTargetElement>> activeTargets, Dictionary<string, List<TargetSpecification>> targetsWhichRunBeforeByTarget, Dictionary<string, List<TargetSpecification>> targetsWhichRunAfterByTarget)
1078List<TargetSpecification> beforeTargetsForTarget;
1101List<TargetSpecification> afterTargetsForTarget;
1408List<ProjectRootElement> importedProjectRootElements = ExpandAndLoadImports(directoryOfImportingFile, importElement, out var sdkResult);
1515private List<ProjectRootElement> ExpandAndLoadImports(string directoryOfImportingFile, ProjectImportElement importElement, out SdkResult sdkResult)
1524List<ProjectRootElement> projects;
1588var allProjects = new List<ProjectRootElement>();
1625List<ProjectRootElement> projects;
1698out List<ProjectRootElement> projects,
1851List<ProjectRootElement> projectList = null;
1868throwOnFileNotExistsError: true, out var additionalProjects);
2020bool throwOnFileNotExistsError, out List<ProjectRootElement> imports)
2558var onlyFallbackSearchPaths = searchPathMatch.SearchPaths.Select(s => _data.ExpandString(s)).ToList();
Evaluation\Expander.cs (53)
569List<T> result = new List<T>();
664out List<KeyValuePair<string, I>> itemsFromCapture)
865List<string> arguments = null;
1919internal static List<KeyValuePair<string, S>> Transform<S>(
1924List<ExpressionShredder.ItemExpressionCapture> captures,
1931List<KeyValuePair<string, S>> sourceItems = IntrinsicItemFunctions<S>.GetItemPairs(itemsOfType);
1932List<KeyValuePair<string, S>> transformedItems = new(itemsOfType.Count);
2172List<KeyValuePair<string, S>> itemsFromCapture;
2243out List<KeyValuePair<string, S>> itemsFromCapture)
2253List<ExpressionShredder.ItemExpressionCapture> captures = expressionCapture.Captures;
2387List<KeyValuePair<string, S>> itemsFromCapture;
2494internal static List<KeyValuePair<string, S>> GetItemPairs(ICollection<S> itemsOfType)
2496List<KeyValuePair<string, S>> itemsFromCapture = new(itemsOfType.Count);
2524internal static void Count(List<KeyValuePair<string, S>> itemsOfType, List<KeyValuePair<string, S>> transformedItems)
2533internal static void ItemSpecModifierFunction(IElementLocation elementLocation, bool includeNullEntries, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
2583internal static void Exists(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
2632internal static void Combine(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
2656internal static void GetPathsOfAllDirectoriesAbove(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
2734internal static void DirectoryName(IElementLocation elementLocation, bool includeNullEntries, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
2803internal static void Metadata(IElementLocation elementLocation, bool includeNullEntries, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
2857internal static void DistinctWithCase(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
2866internal static void Distinct(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
2875internal static void DistinctWithComparer(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, StringComparer comparer, List<KeyValuePair<string, S>> transformedItems)
2894internal static void Reverse(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
2907internal static void ExpandQuotedExpressionFunction(IElementLocation elementLocation, bool includeNullEntries, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
3017List<MetadataMatch> multipleMatches = null;
3101List<KeyValuePair<string, S>> itemsOfType,
3103List<KeyValuePair<string, S>> transformedItems)
3140internal static void ClearMetadata(IElementLocation elementLocation, bool includeNullEntries, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
3157internal static void HasMetadata(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
3191internal static void WithMetadataValue(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
3224internal static void WithoutMetadataValue(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
3257internal static void AnyHaveMetadataValue(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
3396public OneOrMultipleMetadataMatches(List<MetadataMatch> allMatches)
3404internal List<MetadataMatch> Multiple { get; }
3623List<ReadOnlyMemory<char>> list = new List<ReadOnlyMemory<char>>();
Evaluation\ExpressionShredder.cs (4)
167List<ItemExpressionCapture> transformExpressions = null;
724public ItemExpressionCapture(int index, int length, string subExpression, string itemType, string separator, int separatorStart, List<ItemExpressionCapture> captures)
733public ItemExpressionCapture(int index, int length, string subExpression, string itemType, string separator, int separatorStart, List<ItemExpressionCapture> captures, string functionName, string functionArguments)
749public List<ItemExpressionCapture> Captures { get; }
Instance\ProjectInstance.cs (36)
95private List<string> _defaultTargets;
97private List<string> _initialTargets;
189private IDictionary<string, List<TargetSpecification>> _beforeTargets;
190private IDictionary<string, List<TargetSpecification>> _afterTargets;
492static List<string> GetImportFullPaths(ObjectModelRemoting.ProjectLink projectLink)
497var paths = new List<string>(imports.Count);
509static List<string> GetImportFullPathsIncludingDuplicates(ObjectModelRemoting.ProjectLink projectLink)
512var paths = new List<string>(imports.Count);
593thisAsIEvaluatorData.AfterTargets = new Dictionary<string, List<TargetSpecification>>();
594thisAsIEvaluatorData.BeforeTargets = new Dictionary<string, List<TargetSpecification>>();
1185/// Gets a <see cref="List{ProjectItemElement}"/> object containing evaluated items.
1187public List<ProjectItemElement> EvaluatedItemElements
1270public List<string> DefaultTargets
1281public List<string> InitialTargets
1480List<string> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.InitialTargets
1498List<string> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.DefaultTargets
1516IDictionary<string, List<TargetSpecification>> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.BeforeTargets
1526IDictionary<string, List<TargetSpecification>> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.AfterTargets
1539Dictionary<string, List<string>> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.ConditionedProperties
2557translator.TranslateDictionary(ref _beforeTargets, TranslatorForTargetSpecificDictionaryKey, TranslatorForTargetSpecificDictionaryValue, count => new Dictionary<string, List<TargetSpecification>>(count));
2558translator.TranslateDictionary(ref _afterTargets, TranslatorForTargetSpecificDictionaryKey, TranslatorForTargetSpecificDictionaryValue, count => new Dictionary<string, List<TargetSpecification>>(count));
2571private static void TranslatorForTargetSpecificDictionaryValue(ITranslator translator, ref List<TargetSpecification> value)
2846List<TargetSpecification> beforeTargetsForTarget;
2863List<TargetSpecification> afterTargetsForTarget;
3049List<DictionaryEntry> clearedVariables = null;
3311List<string> defaultTargets,
3312List<string> initialTargets,
3313IDictionary<string, List<TargetSpecification>> beforeTargets,
3314IDictionary<string, List<TargetSpecification>> afterTargets)
3322private void InitializeTargetsData(List<string> defaultTargets,
3323List<string> initialTargets,
3324IDictionary<string, List<TargetSpecification>> beforeTargets,
3325IDictionary<string, List<TargetSpecification>> afterTargets)
3338var importPaths = new List<string>(Math.Max(0, importClosure.Count - 1) /* outer project */);
3351var importPathsIncludingDuplicates = new List<string>(Math.Max(0, importClosureWithDuplicates.Count - 1) /* outer project */);
3431List<ProjectItemDefinitionInstance> inheritedItemDefinitions = null;
Instance\TaskRegistry.cs (15)
146private Dictionary<RegisteredTaskIdentity, List<RegisteredTaskRecord>> _taskRegistrations;
153private readonly Dictionary<string, List<RegisteredTaskRecord>> _overriddenTasks = new Dictionary<string, List<RegisteredTaskRecord>>();
222internal IDictionary<RegisteredTaskIdentity, List<RegisteredTaskRecord>> TaskRegistrations
523if (_overriddenTasks.TryGetValue(taskName, out List<RegisteredTaskRecord> recs))
652if (_taskRegistrations.TryGetValue(taskIdentity, out List<RegisteredTaskRecord> taskAssemblies))
695List<RegisteredTaskRecord> registeredTaskEntries;
720if (_overriddenTasks.TryGetValue(unqualifiedTaskName, out List<RegisteredTaskRecord> recs))
735List<RegisteredTaskRecord> unqualifiedTaskNameMatches = new();
745private static Dictionary<RegisteredTaskIdentity, List<RegisteredTaskRecord>> CreateRegisteredTaskDictionary(int? capacity = null)
748? new Dictionary<RegisteredTaskIdentity, List<RegisteredTaskRecord>>(capacity.Value, RegisteredTaskIdentity.RegisteredTaskIdentityComparer.Exact)
749: new Dictionary<RegisteredTaskIdentity, List<RegisteredTaskRecord>>(RegisteredTaskIdentity.RegisteredTaskIdentityComparer.Exact);
1897IDictionary<RegisteredTaskIdentity, List<RegisteredTaskRecord>> copy = _taskRegistrations;
1902_taskRegistrations = (Dictionary<RegisteredTaskIdentity, List<RegisteredTaskRecord>>)copy;
1916private void TranslateTaskRegistrationValue(ITranslator translator, ref List<RegisteredTaskRecord> taskRecords)
Microsoft.Build.BuildCheck.UnitTests (13)
Microsoft.Build.CommandLine.UnitTests (24)
Microsoft.Build.Engine.OM.UnitTests (235)
Definition\Project_Tests.cs (73)
21using GlobResultList = System.Collections.Generic.List<(string, string[], System.Collections.Immutable.ImmutableHashSet<string>, System.Collections.Immutable.ImmutableHashSet<string>)>;
24using ProvenanceResultTupleList = System.Collections.Generic.List<(string, Microsoft.Build.Evaluation.Operation, Microsoft.Build.Evaluation.Provenance, int)>;
603List<ProjectItem> items = Helpers.MakeList(project.GetItems("i"));
619List<ProjectElement> logicalElements = new List<ProjectElement>(project.GetLogicalProject());
1669List<ProjectItem> items = Helpers.MakeList(project.GetItemsByEvaluatedInclude("i1"));
1692List<ProjectItem> items = Helpers.MakeList(project.GetItemsByEvaluatedInclude("i&1"));
1714List<ProjectItem> items = Helpers.MakeList(project.GetItemsByEvaluatedInclude("i2"));
1725List<string> filePaths = new List<string>();
1794List<ProjectItem> items = Helpers.MakeList(project.GetItemsByEvaluatedInclude("i1"));
1814List<ProjectItem> items = Helpers.MakeList(project.GetItemsByEvaluatedInclude("i1"));
1829List<ProjectItem> items = Helpers.MakeList(project.GetItemsByEvaluatedInclude("i1"));
2293List<ProjectItem> list = new List<ProjectItem>() { project.GetItems("i").FirstOrDefault(), project.GetItems("j").FirstOrDefault() };
2437List<ILogger> loggers = new List<ILogger>();
2461List<ILogger> loggers = new List<ILogger>();
2531List<ILogger> loggers = new List<ILogger>();
2573List<ProjectElement> logicalProject = new List<ProjectElement>(project.GetLogicalProject());
2619List<ProjectElement> logicalProject = new List<ProjectElement>(project.GetLogicalProject());
2671var expected = new ProvenanceResultTupleList();
2719var expected = new ProvenanceResultTupleList();
2737var expected = new ProvenanceResultTupleList
2757var expected = new ProvenanceResultTupleList();
2773var expected = new ProvenanceResultTupleList
2796var expected = new ProvenanceResultTupleList
2817var expected = new ProvenanceResultTupleList
2836var expected = new ProvenanceResultTupleList();
2871var expected = new ProvenanceResultTupleList
2881var provenanceResult = project.GetItemProvenance("2.foo");
2904var expected = new ProvenanceResultTupleList
2923var expected = new ProvenanceResultTupleList();
2941var expected = new ProvenanceResultTupleList
2964var expected = new ProvenanceResultTupleList
3069public void GetItemProvenanceByProjectItem(string items, string itemValue, int itemPosition, ProvenanceResultTupleList expected)
3091var expected = new ProvenanceResultTupleList
3117var expected = new ProvenanceResultTupleList
3143var expected = new ProvenanceResultTupleList
3171var expected = new ProvenanceResultTupleList
3191var expected = new ProvenanceResultTupleList();
3207var expected = new ProvenanceResultTupleList();
3225var expected = new ProvenanceResultTupleList();
3242var expected1Foo = new ProvenanceResultTupleList
3256var expected2Foo = new ProvenanceResultTupleList
3286var expectedProvenance = new ProvenanceResultTupleList
3310var expected = new ProvenanceResultTupleList();
3332var expected = new ProvenanceResultTupleList();
3348var expected = new ProvenanceResultTupleList
3490public void GetItemProvenanceShouldWorkWithEscapedCharacters(string project, string provenanceArgument, ProvenanceResultTupleList expectedProvenance)
3514var expected = new ProvenanceResultTupleList
3544var expected = new ProvenanceResultTupleList
3577ProvenanceResultTupleList expectedProvenance = null;
3601var expected = new GlobResultList();
3618var expected = new GlobResultList();
3636var expected = new GlobResultList();
3656var expected = new GlobResultList
3679var expected = new GlobResultList
3737var getAllGlobsResult = ObjectModelHelpers.CreateInMemoryProject(projectContents).GetAllGlobs();
3796var expected = new GlobResultList
3819var expected = new GlobResultList
3845var globResult = new Project(testFiles.ProjectFile, null, MSBuildConstants.CurrentToolsVersion, projectCollection).GetAllGlobs();
3847var expected = new GlobResultList
4336private static void AssertGlobResult(GlobResultList expected, string project)
4338var globs = ObjectModelHelpers.CreateInMemoryProject(project).GetAllGlobs();
4342private static void AssertGlobResult(GlobResultList expected, string project, string itemType)
4344var globs = ObjectModelHelpers.CreateInMemoryProject(project).GetAllGlobs(itemType);
4348private static void AssertGlobResultsEqual(GlobResultList expected, List<GlobResult> globs)
4361private static void AssertProvenanceResult(ProvenanceResultTupleList expected, string project, string itemValue)
4363var provenanceResult = ObjectModelHelpers.CreateInMemoryProject(project).GetItemProvenance(itemValue);
4367private static void AssertProvenanceResult(ProvenanceResultTupleList expected, string project, string itemValue, string itemType)
4369var provenanceResult = ObjectModelHelpers.CreateInMemoryProject(project).GetItemProvenance(itemValue, itemType);
4373private static void AssertProvenanceResult(ProvenanceResultTupleList expected, string project, string itemValue, int position)
4379var provenanceResult = p.GetItemProvenance(item);
4395private static void AssertProvenanceResult(ProvenanceResultTupleList expected, List<ProvenanceResult> actual)
Microsoft.Build.Engine.UnitTests (319)
BackEnd\Scheduler_Tests.cs (28)
115List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
133List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
157List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
180List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
211List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
231List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
254List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
282List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
306List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
333List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
359List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
402List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, new BuildRequestBlocker(-1, Array.Empty<string>(), new BuildRequest[] { _defaultParentRequest, request1, request2, request3 })));
408List<NodeInfo> nodeInfos = new List<NodeInfo>(new NodeInfo[] { new NodeInfo(1, NodeProviderType.InProc) });
409List<ScheduleResponse> moreResponses = new List<ScheduleResponse>(_scheduler.ReportNodesCreated(nodeInfos));
437List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
467List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
497List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
530List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
554List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
596List<ScheduleResponse> responses = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, new BuildRequestBlocker(-1, Array.Empty<string>(), new BuildRequest[] { _defaultParentRequest, request1, request2, request3 })));
632List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
651List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
671List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
687List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker));
881var results = _scheduler.ReportResult(1, CreateBuildResult(_defaultParentRequest, "", BuildResultUtilities.GetSuccessResult()))
913var results = _scheduler.ReportResult(1, CreateBuildResult(duplicateRequest, "", BuildResultUtilities.GetSuccessResult()))
935List<NodeInfo> nodeInfos = new List<NodeInfo>();
961List<ScheduleResponse> moreResponses = new List<ScheduleResponse>(_scheduler.ReportNodesCreated(nodeInfos));
BackEnd\TaskRegistry_Tests.cs (77)
104List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
117List<TaskRegistry.RegisteredTaskRecord> registrationRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity(taskElement.TaskName, TaskHostParameters.Empty)];
138List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
157List<TaskRegistry.RegisteredTaskRecord> registrationRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity(taskElement.TaskName, TaskHostParameters.Empty)];
180List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
201List<TaskRegistry.RegisteredTaskRecord> singletonBucket = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity(elementList[1].TaskName, TaskHostParameters.Empty)];
210List<TaskRegistry.RegisteredTaskRecord> duplicateBucket = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity(elementList[0].TaskName, TaskHostParameters.Empty)];
245List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
264List<TaskRegistry.RegisteredTaskRecord> registrationRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity(taskElement.TaskName, TaskHostParameters.Empty)];
284List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
312List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
353List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
389List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
425List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
463List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
501List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
564List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
652List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
725List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
777List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
891List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
939List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
1000List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
1021IDictionary<TaskRegistry.RegisteredTaskIdentity, List<TaskRegistry.RegisteredTaskRecord>> registeredTasks = registry.TaskRegistrations;
1034List<TaskRegistry.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity(expandedtaskName, TaskHostParameters.Empty)];
1053List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
1077IDictionary<TaskRegistry.RegisteredTaskIdentity, List<TaskRegistry.RegisteredTaskRecord>> registeredTasks = registry.TaskRegistrations;
1089List<TaskRegistry.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity(expandedtaskName, TaskHostParameters.Empty)];
1104List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
1115IDictionary<TaskRegistry.RegisteredTaskIdentity, List<TaskRegistry.RegisteredTaskRecord>> registeredTasks = registry.TaskRegistrations;
1118List<TaskRegistry.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Hello", TaskHostParameters.Empty)];
1128List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
1153List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
1167IDictionary<TaskRegistry.RegisteredTaskIdentity, List<TaskRegistry.RegisteredTaskRecord>> registeredTasks = registry.TaskRegistrations;
1170List<TaskRegistry.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", TaskHostParameters.Empty)];
1185List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
1203IDictionary<TaskRegistry.RegisteredTaskIdentity, List<TaskRegistry.RegisteredTaskRecord>> registeredTasks = registry.TaskRegistrations;
1206List<TaskRegistry.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", TaskHostParameters.Empty)];
1240List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1255List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1272List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1315List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1361List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1379List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1450List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1465List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1480List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1497List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1512List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1527List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1544List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1555List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
1576IDictionary<TaskRegistry.RegisteredTaskIdentity, List<TaskRegistry.RegisteredTaskRecord>> registeredTasks = registry.TaskRegistrations;
1579List<TaskRegistry.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", TaskHostParameters.Empty)];
1618List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
1628List<TaskRegistry.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", TaskHostParameters.Empty)];
1642List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
1652List<TaskRegistry.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", TaskHostParameters.Empty)];
1667List<ProjectUsingTaskElement> elementList = CreateTaskBodyElementWithAttributes(bool.FalseString, body);
1681List<ProjectUsingTaskElement> elementList = CreateTaskBodyElementWithAttributes(bool.TrueString, body);
1701List<ProjectUsingTaskElement> elementList = CreateTaskBodyElementWithAttributes(evaluate, "");
1713List<ProjectUsingTaskElement> elementList = CreateTaskBodyElementWithAttributes(evaluate, "");
1725List<ProjectUsingTaskElement> elementList = CreateTaskBodyElementWithAttributes(evaluate, "");
1737List<ProjectUsingTaskElement> elementList = CreateTaskBodyElementWithAttributes(evaluate, "");
1870public void TaskRegistryCanSerializeViaTranslator(List<ProjectUsingTaskElement> usingTaskElements, Toolset toolset)
1975List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1999private static List<ProjectUsingTaskElement> CreateParameterElementWithAttributes(string output, string required, string type)
2001List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
2017private static List<ProjectUsingTaskElement> CreateTaskBodyElementWithAttributes(string evaluate, string body)
2019List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
2037internal static int GetDeepCountOfRegisteredTasks(IDictionary<TaskRegistry.RegisteredTaskIdentity, List<TaskRegistry.RegisteredTaskRecord>> registryRecords)
2045internal TaskRegistry CreateTaskRegistryAndRegisterTasks(List<ProjectUsingTaskElement> usingTaskElements, Toolset toolset = null)
2079List<ProjectItemInstance> intermediateAssemblyItemGroup = new List<ProjectItemInstance>();
2088List<ProjectItemInstance> firstItemGroup = new List<ProjectItemInstance>();
2095List<ProjectItemInstance> secondItemGroup = new List<ProjectItemInstance>();
2102List<ProjectItemInstance> thirdItemGroup = new List<ProjectItemInstance>();
2106List<ProjectItemInstance> trueItemGroup = new List<ProjectItemInstance>();
Microsoft.Build.Framework (48)
Microsoft.Build.Framework.UnitTests (8)
Microsoft.Build.Tasks.CodeAnalysis (15)
Microsoft.Build.Tasks.CodeAnalysis.Sdk (15)
Microsoft.Build.Tasks.CodeAnalysis.Sdk.UnitTests (1)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (6)
Microsoft.Build.Tasks.Core (375)
AssemblyDependency\ReferenceTable.cs (50)
398internal List<string> ListOfExcludedAssemblies { get; private set; }
535List<Exception> exceptions)
1057var dependencies = new List<AssemblyNameExtension>(dependentAssemblies?.Length ?? 0);
1125List<KeyValuePair<AssemblyNameExtension, Reference>> newEntries)
1246internal static void CalculateParentAssemblyDirectories(List<DirectoryWithParentAssembly> parentReferenceFolders, Reference parentReference)
1297var assembliesConsideredAndRejected = new List<ResolutionSearchLocation>();
1302var parentReferenceFolders = new List<DirectoryWithParentAssembly>();
1309var jaggedResolvers = new List<Resolver[]>();
1393var removedReferences = new List<Reference>();
1396var dependencyGraph = new Dictionary<Reference, List<ReferenceAssemblyExtensionPair>>();
1484private static void AddToDependencyGraph(Dictionary<Reference, List<ReferenceAssemblyExtensionPair>> dependencyGraph, AssemblyNameExtension assemblyName, Reference assemblyReference)
1491if (!dependencyGraph.TryGetValue(dependee, out List<ReferenceAssemblyExtensionPair> dependencies))
1504private void RemoveDependencyMarkedForExclusion(LogExclusionReason logExclusionReason, bool removeOnlyNoWarning, string subsetName, Dictionary<AssemblyNameExtension, Reference> goodReferences, List<Reference> removedReferences, AssemblyNameExtension assemblyName, Reference assemblyReference)
1553private static void RemovePrimaryReferenceMarkedForExclusion(LogExclusionReason logExclusionReason, bool removeOnlyNoWarning, string subsetName, List<Reference> removedReferences, AssemblyNameExtension assemblyName, Reference assemblyReference)
1588private static void RemoveDependencies(Reference removedReference, Dictionary<AssemblyNameExtension, Reference> referenceList, Dictionary<Reference, List<ReferenceAssemblyExtensionPair>> dependencyList)
1591if (!dependencyList.TryGetValue(removedReference, out List<ReferenceAssemblyExtensionPair> dependencies))
1638List<Exception> exceptions)
1708var newEntries = new List<KeyValuePair<AssemblyNameExtension, Reference>>();
1821private void ResolveConflictsBetweenReferences(Dictionary<string, List<AssemblyNameReference>> baseNameToReferences)
1824foreach (List<AssemblyNameReference> assemblyReferences in baseNameToReferences.Values)
1830private void ResolveConflictsBetweenReferences(List<AssemblyNameReference> assemblyReferences)
1859out List<DependentAssembly> idealRemappings,
1860out List<AssemblyNameReference> conflictingReferences)
1866Dictionary<string, List<AssemblyNameReference>> baseNameToReferences = BuildSimpleNameTable();
1884foreach (List<AssemblyNameReference> references in baseNameToReferences.Values)
1932var assemblyNamesList = new List<AssemblyNameReference>(conflictingFullNames.Count);
1939var idealRemappingsList = new List<DependentAssembly>(assemblyNamesList.Count);
2063var assemblyTableInfos = new List<AssemblyTableInfo>();
2195private Dictionary<string, List<AssemblyNameReference>> BuildSimpleNameTable()
2199var baseNameToReferences = new Dictionary<string, List<AssemblyNameReference>>(References.Count, StringComparer.OrdinalIgnoreCase);
2212if (!baseNameToReferences.TryGetValue(baseName, out List<AssemblyNameReference> refs))
2225Dictionary<string, List<AssemblyNameReference>> baseNameToReferences)
2227List<string> toRemove = new(baseNameToReferences.Count);
2228foreach (KeyValuePair<string, List<AssemblyNameReference>> kvp in baseNameToReferences)
2603var primaryItems = new List<ITaskItem>();
2604var dependencyItems = new List<ITaskItem>();
2605var relatedItems = new List<ITaskItem>();
2606var satelliteItems = new List<ITaskItem>();
2607var serializationAssemblyItems = new List<ITaskItem>();
2608var scatterItems = new List<ITaskItem>();
2609var copyLocalItems = new List<ITaskItem>();
2685private ITaskItem SetItemMetadata(List<ITaskItem> relatedItems, List<ITaskItem> satelliteItems, List<ITaskItem> serializationAssemblyItems, List<ITaskItem> scatterItems, string fusionName, Reference reference, AssemblyNameExtension assemblyName)
2730List<string> relatedFileExtensions = reference.GetRelatedFileExtensions();
2731List<string> satellites = reference.GetSatelliteFiles();
2732List<string> serializationAssemblyFiles = reference.GetSerializationAssemblyFiles();
2848static void AddRelatedItem(List<ITaskItem> relatedItems, TaskItem relatedItemBase, string relatedFilePath)
2981private static void FindCopyLocalItems(ITaskItem[] items, List<ITaskItem> copyLocalItems)
GenerateResource.cs (28)
165private List<ITaskItem> _satelliteInputs;
565private void LogResgenCommandLine(List<ITaskItem> inputFiles, List<ITaskItem> outputFiles)
667List<ITaskItem> newSources = new List<ITaskItem>();
711List<ITaskItem> inputsToProcess;
712List<ITaskItem> outputsToProcess;
713List<ITaskItem> cachedOutputFiles; // For incremental builds, this is the set of already-existing, up to date files.
877List<ResGenDependencies.PortableLibraryFile> portableLibraryCacheInfo = process.PortableLibraryCacheInfo;
1118private bool GenerateResourcesUsingResGen(List<ITaskItem> inputsToProcess, List<ITaskItem> outputsToProcess)
1370private void GetResourcesToProcess(out List<ITaskItem> inputsToProcess, out List<ITaskItem> outputsToProcess, out List<ITaskItem> cachedOutputFiles)
1444private void AppendCachedOutputTaskItems(ResGenDependencies.PortableLibraryFile library, List<ITaskItem> cachedOutputFiles)
1622private void GetStronglyTypedResourceToProcess(ref List<ITaskItem> inputsToProcess, ref List<ITaskItem> outputsToProcess)
2216private List<ReaderInfo> _readers = new List<ReaderInfo>();
2296private List<ITaskItem> _inFiles;
2308private List<ITaskItem> _outFiles;
2317internal List<ITaskItem> ExtractedResWFiles
2328private List<ITaskItem> _extractedResWFiles;
2333internal List<ResGenDependencies.PortableLibraryFile> PortableLibraryCacheInfo
2337private List<ResGenDependencies.PortableLibraryFile> _portableLibraryCacheInfo;
2384List<ITaskItem> inputs,
2385List<ITaskItem> satelliteInputs,
2386List<ITaskItem> outputs,
2663List<string> resWFilesForThisAssembly = new List<string>();
3879public List<IResource> resources;
GetSDKReferenceFiles.cs (20)
449var resolvedReferenceAssemblies = new List<ITaskItem>();
450var copyLocalReferenceAssemblies = new List<ITaskItem>();
451var redistReferenceItems = new List<ITaskItem>();
570if (info.DirectoryToFileList != null && info.DirectoryToFileList.TryGetValue(FileUtilities.EnsureNoTrailingSlash(path), out List<string> referenceFiles) && referenceFiles != null)
619foreach (KeyValuePair<string, List<string>> directoryToFileList in info.DirectoryToFileList)
624List<string> redistFiles = directoryToFileList.Value;
996var directoryToFileList = new ConcurrentDictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase);
998var directoriesToHash = new List<string>();
1025private void PopulateReferencesDictionaryFromManifestPaths(ConcurrentDictionary<string, List<string>> referencesByDirectory, ConcurrentDictionary<string, SdkReferenceInfo> references, string[] sdkManifestReferences)
1043private void PopulateReferencesDictionaryFromPaths(ConcurrentDictionary<string, List<string>> referencesByDirectory, ConcurrentDictionary<string, SdkReferenceInfo> references, IEnumerable<string> referenceDirectories)
1050List<string> files = Directory.GetFiles(path, "*", SearchOption.TopDirectoryOnly).ToList();
1060private static void PopulateRedistDictionaryFromPaths(ConcurrentDictionary<string, List<string>> redistFilesByDirectory, IEnumerable<string> redistDirectories)
1067List<string> files = Directory.GetFiles(path, "*", SearchOption.TopDirectoryOnly).ToList();
1080var directoriesToHash = new List<string>();
1220private IDictionary<string, List<string>> _directoryToFileList;
1226_directoryToFileList = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase);
1235public SDKInfo(IDictionary<string, SdkReferenceInfo> pathToReferenceMetadata, IDictionary<string, List<string>> directoryToFileList, int cacheHash)
1247public IDictionary<string, List<string>> DirectoryToFileList { get { return _directoryToFileList; } }
1273translator.TranslateDictionary(ref _directoryToFileList, (ITranslator t, ref string s) => t.Translate(ref s), (ITranslator t, ref List<string> fileList) =>
1276}, count => new Dictionary<string, List<string>>(count, StringComparer.OrdinalIgnoreCase));
MSBuild.cs (12)
53private readonly List<ITaskItem> _targetOutputs = new List<ITaskItem>();
255List<string[]> targetLists = CreateTargetLists(Targets, RunEachTargetSeparately);
258List<ITaskItem> singleProject = null;
374private bool BuildProjectsInParallel(Dictionary<string, string> propertiesTable, string[] undefinePropertiesArray, List<string[]> targetLists, bool success, bool[] skipProjects)
378var projectsToBuildInParallel = new List<ITaskItem>();
414var expandedProperties = new List<string>();
415var expandedTargets = new List<string>();
454internal static List<string[]> CreateTargetLists(string[] targets, bool runEachTargetSeparately)
460var targetLists = new List<string[]>(runEachTargetSeparately ? targets.Length : 1);
481List<ITaskItem> projects,
484List<string[]> targetLists,
489List<ITaskItem> targetOutputs,
RedistList.cs (15)
94var errors = new List<Exception>();
95var errorFilenames = new List<string>();
96var assemblyList = new List<AssemblyEntry>();
97var remappingEntries = new List<AssemblyRemapping>();
564internal Dictionary<string, string> GenerateDenyList(AssemblyTableInfo[] allowListAssemblyTableInfo, List<Exception> allowListErrors, List<string> allowListErrorFileNames)
588var allowListAssemblies = new List<AssemblyEntry>();
596var allowListAssembliesReadIn = new List<AssemblyEntry>();
690internal static string ReadFile(AssemblyTableInfo assemblyTableInfo, List<AssemblyEntry> assembliesList, List<Exception> errorsList, List<string> errorFilenamesList, List<AssemblyRemapping> remapEntries)
768private static void ParseRemapSection(AssemblyTableInfo assemblyTableInfo, string path, string redistName, XmlReader reader, List<AssemblyRemapping> mapping)
825private static void ParseFileListSection(AssemblyTableInfo assemblyTableInfo, string path, string redistName, XmlReader reader, Dictionary<string, AssemblyEntry> assemblyEntries, List<AssemblyRemapping> remapEntries)
1086var subsetFilesForFrameworkDirectory = new List<string>();
ResolveManifestFiles.cs (18)
172GetPublishInfo(out List<PublishInfo> assemblyPublishInfoList, out List<PublishInfo> filePublishInfoList, out List<PublishInfo> satellitePublishInfoList, out List<PublishInfo> manifestEntryPointList);
385private void GetOutputAssemblies(List<PublishInfo> publishInfos, List<ITaskItem> assemblyList)
497private ITaskItem[] GetOutputAssembliesAndSatellites(List<PublishInfo> assemblyPublishInfos, List<PublishInfo> satellitePublishInfos)
499var assemblyList = new List<ITaskItem>();
505private ITaskItem[] GetOutputFiles(List<PublishInfo> publishInfos, IEnumerable<ITaskItem> outputAssemblies)
507var fileList = new List<ITaskItem>();
604private void GetOutputSatellites(List<PublishInfo> publishInfos, List<ITaskItem> assemblyList)
667private ITaskItem GetOutputEntryPoint(ITaskItem entryPoint, List<PublishInfo> manifestEntryPointList)
705out List<PublishInfo> assemblyPublishInfos,
706out List<PublishInfo> filePublishInfos,
707out List<PublishInfo> satellitePublishInfos,
708out List<PublishInfo> manifestEntryPointPublishInfos)
Microsoft.Build.Tasks.UnitTests (64)
XslTransformation_Tests.cs (25)
103List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs;
104List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs;
168List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs;
169List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs;
214List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs;
215List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs;
264List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs;
265List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs;
294List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs;
295List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs;
328List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs;
329List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs;
362List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs;
363List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs;
399List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs;
400List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs;
435List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs;
436List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs;
489List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs;
490List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs;
614List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs;
615List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs;
1107private void Prepare(out string dir, out TaskItem[] xmlPaths, out TaskItem xslPath, out TaskItem xslCompiledPath, out TaskItem[] outputPaths, out List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs, out List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs, out MockEngine engine)
1142List<bool> results = new List<bool>();
Microsoft.Build.UnitTests.Shared (40)
Microsoft.Build.Utilities.Core (76)
ToolLocationHelper.cs (31)
268private static List<string> s_targetFrameworkMonikers = null;
336var assemblyFolders = new List<AssemblyFoldersExInfo>();
662var referenceDirectories = new List<string>(4);
679private static void AddSDKPaths(string sdkRoot, string folderName, string targetConfiguration, string targetArchitecture, List<string> directories)
726var redistDirectories = new List<string>(4);
756var designTimeDirectories = new List<string>(4);
789var filteredTargetPlatformSdkList = new List<TargetPlatformSDK>();
1130var contractWinMDs = new List<string>();
1344var platforms = new List<string>();
1381var availablePlatformVersions = new List<Version>();
2111var referencePaths = new List<string>();
2137var referencePaths = new List<string>();
2161var referencePaths = new List<string>();
2333var referencePaths = new List<string>();
2424private static void AddSDKPath(string sdkRoot, string contentFolderName, string targetConfiguration, string targetArchitecture, List<string> contentDirectories)
2441List<string> sdkDiskRoots = GetTargetPlatformMonikerDiskRoots(diskRoots);
2442List<string> extensionSdkDiskRoots = GetExtensionSdkDiskRoots(extensionDiskRoots);
2579internal static void GatherSDKListFromDirectory(List<string> diskroots, Dictionary<TargetPlatformSDK, TargetPlatformSDK> platformSDKs)
2606SortedDictionary<Version, List<string>> versionsInRoot = VersionUtilities.GatherVersionStrings(null, rootPathWithIdentifier.GetDirectories().Select<DirectoryInfo, string>(directory => directory.Name));
2611foreach (KeyValuePair<Version, List<string>> directoryUnderRoot in versionsInRoot)
2715SortedDictionary<Version, List<string>> sortedVersions = VersionUtilities.GatherVersionStrings(null, versions);
2717foreach (KeyValuePair<Version, List<string>> registryVersions in sortedVersions)
2893private static void GetDefaultSDKDiskRoots(List<string> diskRoots)
2924private static void ExtractSdkDiskRootsFromEnvironment(List<string> diskRoots, string directoryRoots)
2945private static List<string> GetTargetPlatformMonikerDiskRoots(string[] diskRoots)
2947var sdkDiskRoots = new List<string>();
2972private static List<string> GetExtensionSdkDiskRoots(string[] diskRoots)
2974var sdkDiskRoots = new List<string>();
3771var frameworkIdentifiers = new List<string>();
3845var frameworkVersions = new List<string>();
3917var frameworkProfiles = new List<string>();
Microsoft.Build.Utilities.UnitTests (12)
Microsoft.Cci.Extensions (13)
Differs\ListMerger.cs (3)
22public static List<Tuple<DifferenceType, T>> Merge<T>(T[] list0, T[] list1) where T : class
27public static List<Tuple<DifferenceType, T>> Merge<T>(T[] list0, int list0Start, int list0End, T[] list1, int list1Start, int list1End) where T : class
29List<Tuple<DifferenceType, T>> list = new List<Tuple<DifferenceType, T>>();
Microsoft.CodeAnalysis (194)
DocumentationCommentId.cs (45)
22private class ListPool<T> : ObjectPool<List<T>>
28public void ClearAndFree(List<T> list)
35public new void Free(List<T> list)
110var results = s_symbolListPool.Allocate();
126private static bool TryGetSymbolsForDeclarationId(string id, Compilation compilation, List<ISymbol> results)
161var results = s_symbolListPool.Allocate();
188var results = s_symbolListPool.Allocate();
204private static bool TryGetSymbolsForReferenceId(string id, Compilation compilation, List<ISymbol> results)
249var results = s_symbolListPool.Allocate();
724public static bool ParseDeclaredSymbolId(string id, Compilation compilation, List<ISymbol> results)
743public static bool ParseReferencedSymbolId(string id, Compilation compilation, List<ISymbol> results)
756private static void ParseDeclaredId(string id, ref int index, Compilation compilation, List<ISymbol> results)
792var containers = s_namespaceOrTypeListPool.Allocate();
889var results = s_symbolListPool.Allocate();
908private static void ParseTypeSymbol(string id, ref int index, Compilation compilation, ISymbol? typeParameterContext, List<ISymbol> results)
916var contexts = s_symbolListPool.Allocate();
996private static void ParseTypeParameterSymbol(string id, ref int index, ISymbol? typeParameterContext, List<ISymbol> results)
1033private static void ParseNamedTypeSymbol(string id, ref int index, Compilation compilation, ISymbol? typeParameterContext, List<ISymbol> results)
1035var containers = s_namespaceOrTypeListPool.Allocate();
1045List<ITypeSymbol>? typeArguments = null;
1144private static bool ParseTypeArguments(string id, ref int index, Compilation compilation, ISymbol? typeParameterContext, List<ITypeSymbol> typeArguments)
1178private static void GetMatchingTypes(List<INamespaceOrTypeSymbol> containers, string memberName, int arity, bool isTerminal, List<ISymbol> results)
1190private static void GetMatchingTypes(INamespaceOrTypeSymbol container, string memberName, int arity, bool isTerminal, List<ISymbol> results)
1218private static void GetMatchingNamespaceOrTypes(List<INamespaceOrTypeSymbol> containers, string memberName, List<ISymbol> results)
1226private static void GetMatchingNamespaceOrTypes(INamespaceOrTypeSymbol container, string memberName, List<ISymbol> results)
1241private static void GetMatchingExtensions(INamespaceOrTypeSymbol container, string memberName, int arity, List<ISymbol> results)
1260private static void GetMatchingNamespaces(List<INamespaceOrTypeSymbol> containers, string memberName, List<ISymbol> results)
1268private static void GetMatchingNamespaces(INamespaceOrTypeSymbol container, string memberName, List<ISymbol> results)
1281private static void GetMatchingMethods(string id, ref int index, List<INamespaceOrTypeSymbol> containers, string memberName, int arity, Compilation compilation, List<ISymbol> results)
1283var parameters = s_parameterListPool.Allocate();
1348private static void GetMatchingProperties(string id, ref int index, List<INamespaceOrTypeSymbol> containers, string memberName, Compilation compilation, List<ISymbol> results)
1353List<ParameterInfo>? parameters = null;
1406private static void GetMatchingFields(List<INamespaceOrTypeSymbol> containers, string memberName, List<ISymbol> results)
1422private static void GetMatchingEvents(List<INamespaceOrTypeSymbol> containers, string memberName, List<ISymbol> results)
1438private static bool AllParametersMatch(ImmutableArray<IParameterSymbol> symbolParameters, List<ParameterInfo> expectedParameters)
1512private static bool ParseParameterList(string id, ref int index, Compilation compilation, ISymbol typeParameterContext, List<ParameterInfo> parameters)
1624private static void CopyTo<TSource, TDestination>(List<TSource> source, List<TDestination> destination)
ReferenceManager\CommonReferenceManager.Binding.cs (8)
101[In, Out] Dictionary<string, List<ReferencedAssemblyIdentity>> assemblyReferencesBySimpleName,
218[In, Out] Dictionary<string, List<ReferencedAssemblyIdentity>> assemblyReferencesBySimpleName,
724private static readonly ObjectPool<List<TAssemblySymbol?>> s_candidateReferencedSymbolsPool = new ObjectPool<List<TAssemblySymbol?>>(() => new List<TAssemblySymbol?>(capacity: 1024));
733List<TAssemblySymbol?> candidateReferencedSymbols = s_candidateReferencedSymbolsPool.Allocate();
985private static bool IsSuperseded(AssemblyIdentity identity, IReadOnlyDictionary<string, List<ReferencedAssemblyIdentity>> assemblyReferencesBySimpleName)
992private static int IndexOfCorLibrary(ImmutableArray<AssemblyData> assemblies, IReadOnlyDictionary<string, List<ReferencedAssemblyIdentity>> assemblyReferencesBySimpleName, bool supersedeLowerVersions)
1079protected abstract void GetActualBoundReferencesUsedBy(TAssemblySymbol assemblySymbol, List<TAssemblySymbol?> referencedAssemblySymbols);
Microsoft.CodeAnalysis.Analyzers (163)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (2)
24public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
43public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\CompatAbstractFormattingRule.cs (6)
25public sealed override void AddAnchorIndentationOperations(List<AnchorIndentationOperation> list, SyntaxNode node, in NextAnchorIndentationOperationAction nextOperation)
33public sealed override void AddIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode node, in NextIndentBlockOperationAction nextOperation)
41public sealed override void AddAlignTokensOperations(List<AlignTokensOperation> list, SyntaxNode node, in NextAlignTokensOperationAction nextOperation)
78public virtual void AddAnchorIndentationOperationsSlow(List<AnchorIndentationOperation> list, SyntaxNode node, ref NextAnchorIndentationOperationAction nextOperation)
84public virtual void AddIndentBlockOperationsSlow(List<IndentBlockOperation> list, SyntaxNode node, ref NextIndentBlockOperationAction nextOperation)
90public virtual void AddAlignTokensOperationsSlow(List<AlignTokensOperation> list, SyntaxNode node, ref NextAlignTokensOperationAction nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
86var result = new List<ITypeSymbol>
Microsoft.CodeAnalysis.AnalyzerUtilities (124)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (2)
24public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
43public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\CompatAbstractFormattingRule.cs (6)
25public sealed override void AddAnchorIndentationOperations(List<AnchorIndentationOperation> list, SyntaxNode node, in NextAnchorIndentationOperationAction nextOperation)
33public sealed override void AddIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode node, in NextIndentBlockOperationAction nextOperation)
41public sealed override void AddAlignTokensOperations(List<AlignTokensOperation> list, SyntaxNode node, in NextAlignTokensOperationAction nextOperation)
78public virtual void AddAnchorIndentationOperationsSlow(List<AnchorIndentationOperation> list, SyntaxNode node, ref NextAnchorIndentationOperationAction nextOperation)
84public virtual void AddIndentBlockOperationsSlow(List<IndentBlockOperation> list, SyntaxNode node, ref NextIndentBlockOperationAction nextOperation)
90public virtual void AddAlignTokensOperationsSlow(List<AlignTokensOperation> list, SyntaxNode node, ref NextAlignTokensOperationAction nextOperation)
Microsoft.CodeAnalysis.BannedApiAnalyzers (141)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (2)
24public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
43public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\CompatAbstractFormattingRule.cs (6)
25public sealed override void AddAnchorIndentationOperations(List<AnchorIndentationOperation> list, SyntaxNode node, in NextAnchorIndentationOperationAction nextOperation)
33public sealed override void AddIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode node, in NextIndentBlockOperationAction nextOperation)
41public sealed override void AddAlignTokensOperations(List<AlignTokensOperation> list, SyntaxNode node, in NextAlignTokensOperationAction nextOperation)
78public virtual void AddAnchorIndentationOperationsSlow(List<AnchorIndentationOperation> list, SyntaxNode node, ref NextAnchorIndentationOperationAction nextOperation)
84public virtual void AddIndentBlockOperationsSlow(List<IndentBlockOperation> list, SyntaxNode node, ref NextIndentBlockOperationAction nextOperation)
90public virtual void AddAlignTokensOperationsSlow(List<AlignTokensOperation> list, SyntaxNode node, ref NextAlignTokensOperationAction nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
86var result = new List<ITypeSymbol>
Microsoft.CodeAnalysis.CodeStyle (127)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (14)
157using var _1 = PooledDictionary<string, List<(SyntaxTrivia pragma, bool isDisable)>>.GetInstance(out var idToPragmasMap);
166using var _5 = PooledDictionary<string, List<SyntaxNode>>.GetInstance(out var idToSuppressMessageAttributesMap);
200if (idToPragmasMap.TryGetValue(id, out var pragmas))
208if (idToSuppressMessageAttributesMap.TryGetValue(id, out var attributeNodes))
228PooledDictionary<string, List<(SyntaxTrivia pragma, bool isDisable)>> idToPragmasMap,
268if (!idToPragmasMap.TryGetValue(id, out var pragmasForIdInReverseOrder))
510PooledDictionary<string, List<(SyntaxTrivia pragma, bool isDisable)>> idToPragmasMap,
512PooledDictionary<string, List<SyntaxNode>> idToSuppressMessageAttributesMap,
546PooledDictionary<string, List<(SyntaxTrivia pragma, bool isDisable)>> idToPragmasMap,
549if (!idToPragmasMap.TryGetValue(diagnostic.Id, out var pragmasForIdInReverseOrder))
586PooledDictionary<string, List<SyntaxNode>> idToSuppressMessageAttributesMap,
591!idToSuppressMessageAttributesMap.TryGetValue(diagnostic.Id, out var suppressMessageAttributesForId))
736PooledDictionary<string, List<SyntaxNode>> idToSuppressMessageAttributesMap,
813if (!idToSuppressMessageAttributesMap.TryGetValue(id, out var nodesForId))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (2)
24public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
43public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\CompatAbstractFormattingRule.cs (6)
25public sealed override void AddAnchorIndentationOperations(List<AnchorIndentationOperation> list, SyntaxNode node, in NextAnchorIndentationOperationAction nextOperation)
33public sealed override void AddIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode node, in NextIndentBlockOperationAction nextOperation)
41public sealed override void AddAlignTokensOperations(List<AlignTokensOperation> list, SyntaxNode node, in NextAlignTokensOperationAction nextOperation)
78public virtual void AddAnchorIndentationOperationsSlow(List<AnchorIndentationOperation> list, SyntaxNode node, ref NextAnchorIndentationOperationAction nextOperation)
84public virtual void AddIndentBlockOperationsSlow(List<IndentBlockOperation> list, SyntaxNode node, ref NextIndentBlockOperationAction nextOperation)
90public virtual void AddAlignTokensOperationsSlow(List<AlignTokensOperation> list, SyntaxNode node, ref NextAlignTokensOperationAction nextOperation)
Microsoft.CodeAnalysis.CodeStyle.Fixes (44)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
86var result = new List<ITypeSymbol>
Microsoft.CodeAnalysis.Collections.Package (6)
Microsoft.CodeAnalysis.CSharp (62)
CommandLine\CSharpCommandLineParser.cs (24)
56List<Diagnostic> diagnostics = new List<Diagnostic>();
58List<string>? scriptArgs = IsScriptCommandLineParser ? new List<string>() : null;
59List<string>? responsePaths = IsScriptCommandLineParser ? new List<string>() : null;
103List<CommandLineResource> managedResources = new List<CommandLineResource>();
104List<CommandLineSourceFile> sourceFiles = new List<CommandLineSourceFile>();
105List<CommandLineSourceFile> additionalFiles = new List<CommandLineSourceFile>();
107List<CommandLineSourceFile> embeddedFiles = new List<CommandLineSourceFile>();
114List<CommandLineReference> metadataReferences = new List<CommandLineReference>();
115List<CommandLineAnalyzerReference> analyzers = new List<CommandLineAnalyzerReference>();
116List<string> libPaths = new List<string>();
117List<string> sourcePaths = new List<string>();
118List<string> keyFileSearchPaths = new List<string>();
119List<string> usings = new List<string>();
129List<string> features = new List<string>();
1632private static void ParseAndResolveReferencePaths(string? switchName, ReadOnlyMemory<char>? switchValue, string? baseDirectory, List<string> builder, MessageID origin, List<Diagnostic> diagnostics)
1659private static string? GetWin32Setting(string arg, string? value, List<Diagnostic> diagnostics)
1682List<Diagnostic> diagnostics,
1684List<CommandLineSourceFile> sourceFiles,
1752private ImmutableArray<string> BuildSearchPaths(string? sdkDirectoryOpt, List<string> libPaths, List<string>? responsePathsOpt)
1901private static void ParseAnalyzers(string arg, ReadOnlyMemory<char>? valueMemory, List<CommandLineAnalyzerReference> analyzerReferences, List<Diagnostic> diagnostics)
1928private static void ParseAssemblyReferences(string arg, ReadOnlyMemory<char>? valueMemory, IList<Diagnostic> diagnostics, bool embedInteropTypes, List<CommandLineReference> commandLineReferences)
Microsoft.CodeAnalysis.CSharp.CodeStyle (45)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\BaseFormattingRule.cs (9)
18List<IndentBlockOperation> list,
33List<IndentBlockOperation> list,
46List<IndentBlockOperation> list,
60List<IndentBlockOperation> list,
74List<IndentBlockOperation> list,
89List<IndentBlockOperation> list,
99List<IndentBlockOperation> list,
124protected static void AddAnchorIndentationOperation(List<AnchorIndentationOperation> list, SyntaxToken anchorToken, SyntaxToken endToken)
134protected static void AddAlignIndentationOfTokensToBaseTokenOperation(List<AlignTokensOperation> list, SyntaxNode containingNode, SyntaxToken baseNode, IEnumerable<SyntaxToken> tokens, AlignTokensOption option = AlignTokensOption.AlignIndentationOfTokensToBaseToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (11)
47public override void AddIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode node, in NextIndentBlockOperationAction nextOperation)
61private static void AddTypeParameterConstraintClauseOperation(List<IndentBlockOperation> list, SyntaxNode node)
70private void AddSwitchIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
129private void AddLabelIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
145private static void AddAlignmentBlockOperation(List<IndentBlockOperation> list, SyntaxNode node)
200private static void SetAlignmentBlockOperation(List<IndentBlockOperation> list, SyntaxNode baseNode, SyntaxNode body)
211private void AddBlockIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
248private static void AddBracketIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
283private static void AddParenthesizedPatternIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
303private static void AddAlignmentBlockOperationRelativeToFirstTokenOnBaseTokenLine(List<IndentBlockOperation> list, (SyntaxToken openBrace, SyntaxToken closeBrace) bracePair)
309private static void AddEmbeddedStatementsIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (29)
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
222var switchArms = node.Sections
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamespaceGenerator.cs (1)
141var usingDirectives =
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (19)
Microsoft.CodeAnalysis.CSharp.CSharp15.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (230)
Completion\CompletionProviders\AbstractCSharpCompletionProviderTests.cs (6)
59List<CompletionFilter> matchingFilters = null, CompletionItemFlags? flags = null,
72List<CompletionFilter> matchingFilters, CompletionItemFlags? flags, CompletionOptions options, bool skipSpeculation = false)
85bool? isComplexTextEdit = null, List<CompletionFilter> matchingFilters = null, CompletionItemFlags? flags = null,
110string displayTextPrefix, string inlineDescription, bool? isComplexTextEdit, List<CompletionFilter> matchingFilters,
130List<CompletionFilter> matchingFilters, CompletionOptions options, bool skipSpeculation = false)
143List<CompletionFilter> matchingFilters, CompletionOptions options, bool skipSpeculation = false)
SymbolKey\SymbolKeyTestBase.cs (14)
43var newlist = newSymbols.OrderBy(s => s.Name).ToList();
44var origlist = originalSymbols.OrderBy(s => s.Name).ToList();
124internal static List<BlockSyntax> GetBlockSyntaxList(IMethodSymbol symbol)
126var list = new List<BlockSyntax>();
154var kinds = new List<SymbolKind>();
200var list = new List<ISymbol>();
218private static void GetSourceMemberSymbols(INamespaceOrTypeSymbol symbol, List<ISymbol> list, LocalSymbolDumper localDumper)
248private static void GetSourceAliasSymbols(CSharpCompilation comp, List<ISymbol> list)
277public void GetLocalSymbols(FieldSymbol symbol, List<ISymbol> list)
294public void GetLocalSymbols(MethodSymbol symbol, List<ISymbol> list)
336private static void GetLocalAndType(DataFlowAnalysis df, List<ISymbol> list)
348private static void GetLabelSymbols(BlockSyntax body, SemanticModel model, List<ISymbol> list)
370private static void GetAnonymousTypeOrFuncSymbols(BlockSyntax body, SemanticModel model, List<ISymbol> list)
387private static void GetAnonymousExprSymbols(ExpressionSyntax expr, SemanticModel model, List<ISymbol> list)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (18)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (12)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (18)
Microsoft.CodeAnalysis.CSharp.Features (125)
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
222var switchArms = node.Sections
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (5)
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (10)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (175)
Semantics\LookupTests.cs (108)
24internal List<string> GetLookupNames(string testSrc)
34internal List<ISymbol> GetLookupSymbols(string testSrc, NamespaceOrTypeSymbol container = null, string name = null, int? arity = null, bool isScript = false, IEnumerable<string> globalUsings = null)
57var expected_lookupNames = new List<string>
85var expected_lookupNames = new List<string>
146List<string> expected_lookupNames = new List<string>
161List<string> expected_lookupSymbols = new List<string>
179var actual_lookupNames = GetLookupNames(testSrc);
182var actual_lookupSymbols = GetLookupSymbols(testSrc);
203List<string> expected_in_lookupNames = new List<string>
209List<string> expected_in_lookupSymbols = new List<string>
216var actual_lookupNames = GetLookupNames(testSrc);
219var actual_lookupSymbols = GetLookupSymbols(testSrc);
245var actual_lookupSymbols = GetLookupSymbols(testSrc, name: "i", arity: 1);
306List<string> expected_in_lookupNames = new List<string>
312List<string> expected_in_lookupSymbols = new List<string>
319var actual_lookupNames = GetLookupNames(testSrc);
322var actual_lookupSymbols = GetLookupSymbols(testSrc);
357List<string> expected_in_lookupNames = new List<string>
364List<string> expected_in_lookupSymbols = new List<string>
373var actual_lookupNames = GetLookupNames(testSrc);
376var actual_lookupSymbols = GetLookupSymbols(testSrc);
402List<string> expected_in_lookupNames = new List<string>
413List<string> expected_in_lookupSymbols = new List<string>
503List<string> expected_in_lookupNames = new List<string>
508List<string> expected_in_lookupSymbols = new List<string>
514List<string> not_expected_in_lookupSymbols = new List<string>
521var actual_lookupNames = GetLookupNames(testSrc);
524var actual_lookupSymbols = GetLookupSymbols(testSrc, name: "F", arity: 0);
566List<string> expected_in_lookupNames = new List<string>
571List<string> expected_in_lookupSymbols = new List<string>
594var actual_lookupNames = model.LookupNames(position);
624List<string> not_expected_in_lookup = new List<string>
631var actual_lookupNames = model.LookupNames(GetPositionForBinding(tree), null).ToList();
632var actual_lookupNames_ignoreAcc = model.LookupNames(GetPositionForBinding(tree), null).ToList();
697var names = model.LookupNames(baseExprLocation, useBaseReferenceAccessibility: true);
712List<string> expected_in_lookupNames = new List<string>
719List<string> expected_in_lookupSymbols = new List<string>
727var actual_lookupNames = GetLookupNames(testSrc);
730var actual_lookupSymbols = GetLookupSymbols(testSrc);
755List<string> expected_in_lookupNames = new List<string>
761List<string> expected_in_lookupSymbols = new List<string>
767List<string> not_expected_in_lookupNames = new List<string>
772List<string> not_expected_in_lookupSymbols = new List<string>
778var actual_lookupNames = GetLookupNames(testSrc);
781var actual_lookupSymbols = GetLookupSymbols(testSrc);
814List<string> expected_in_lookupNames = new List<string>
821List<string> expected_in_lookupSymbols = new List<string>
829var actual_lookupNames = GetLookupNames(testSrc);
832var actual_lookupSymbols = GetLookupSymbols(testSrc);
859List<string> not_expected_in_lookupNames = new List<string>
864List<string> not_expected_in_lookupSymbols = new List<string>
870var actual_lookupNames = GetLookupNames(testSrc);
873var actual_lookupSymbols = GetLookupSymbols(testSrc);
898List<string> not_expected_in_lookupNames = new List<string>
903List<string> not_expected_in_lookupSymbols = new List<string>
909var actual_lookupNames = GetLookupNames(testSrc);
912var actual_lookupSymbols = GetLookupSymbols(testSrc);
933List<string> expected_in_lookupNames = new List<string>
939List<string> expected_in_lookupSymbols = new List<string>
946var actual_lookupNames = GetLookupNames(testSrc);
949var actual_lookupSymbols = GetLookupSymbols(testSrc);
975List<string> expected_in_lookupNames = new List<string>
980List<string> expected_in_lookupSymbols = new List<string>
986var actual_lookupNames = GetLookupNames(testSrc);
989var actual_lookupSymbols = GetLookupSymbols(testSrc);
1015List<string> expected_in_lookupNames = new List<string>
1020List<string> expected_in_lookupSymbols = new List<string>
1026var actual_lookupNames = GetLookupNames(testSrc);
1029var actual_lookupSymbols = GetLookupSymbols(testSrc);
1058var lookupNames = GetLookupNames(testSrc);
1059var lookupSymbols = GetLookupSymbols(testSrc).Select(e => e.ToTestDisplayString()).ToList();
1088var lookupNames = GetLookupNames(testSrc);
1089var lookupSymbols = GetLookupSymbols(testSrc).Select(e => e.ToTestDisplayString()).ToList();
1117var lookupNames = GetLookupNames(testSrc);
1118var lookupSymbols = GetLookupSymbols(testSrc).Select(e => e.ToTestDisplayString()).ToList();
1141List<string> expected_in_lookupNames = new List<string>
1146List<string> expected_in_lookupSymbols = new List<string>
1152var actual_lookupNames = GetLookupNames(testSrc);
1155var actual_lookupSymbols = GetLookupSymbols(testSrc);
1179List<string> expected_in_lookupNames = new List<string>
1184List<string> expected_in_lookupSymbols = new List<string>
1190var actual_lookupNames = GetLookupNames(testSrc);
1193var actual_lookupSymbols = GetLookupSymbols(testSrc);
1214List<string> expected_in_lookupNames = new List<string>
1219List<string> expected_in_lookupSymbols = new List<string>
1225var actual_lookupNames = GetLookupNames(testSrc);
1228var actual_lookupSymbols = GetLookupSymbols(testSrc);
1242var actual_lookupNames = GetLookupNames(testSrc);
1245var actual_lookupSymbols = GetLookupSymbols(testSrc);
1271var actual_lookupNames = GetLookupNames(testSrc);
1274var actual_lookupSymbols = GetLookupSymbols(testSrc);
1338List<string> expected_in_lookupNames = new List<string>
1343List<string> expected_in_lookupSymbols = new List<string>
1349var actual_lookupNames = GetLookupNames(testSrc);
1352var actual_lookupSymbols = GetLookupSymbols(testSrc);
1353var actual_lookupSymbols_as_string = actual_lookupSymbols.Select(e => e.ToString()).ToList();
1391var actual_lookupSymbols = GetLookupSymbols(source);
1442var actual_lookupSymbols = GetLookupSymbols(usings + source, isScript: false);
1522private void TestLookupSymbolsNestedNamespaces(List<ISymbol> actual_lookupSymbols)
1563var exprs = GetExprSyntaxList(tree);
1595var exprs = GetExprSyntaxList(tree);
1842var symbols = GetLookupSymbols(source);
1864var symbols = GetLookupSymbols(source);
1886var symbols = GetLookupSymbols(source);
1909var symbols = GetLookupSymbols(source);
1931var symbols = GetLookupSymbols(source);
1954var symbols = GetLookupSymbols(source);
2137var names = GetLookupNames(source);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (82)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (114)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (25)
Microsoft.CodeAnalysis.CSharp.Workspaces (85)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\BaseFormattingRule.cs (9)
18List<IndentBlockOperation> list,
33List<IndentBlockOperation> list,
46List<IndentBlockOperation> list,
60List<IndentBlockOperation> list,
74List<IndentBlockOperation> list,
89List<IndentBlockOperation> list,
99List<IndentBlockOperation> list,
124protected static void AddAnchorIndentationOperation(List<AnchorIndentationOperation> list, SyntaxToken anchorToken, SyntaxToken endToken)
134protected static void AddAlignIndentationOfTokensToBaseTokenOperation(List<AlignTokensOperation> list, SyntaxNode containingNode, SyntaxToken baseNode, IEnumerable<SyntaxToken> tokens, AlignTokensOption option = AlignTokensOption.AlignIndentationOfTokensToBaseToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (11)
47public override void AddIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode node, in NextIndentBlockOperationAction nextOperation)
61private static void AddTypeParameterConstraintClauseOperation(List<IndentBlockOperation> list, SyntaxNode node)
70private void AddSwitchIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
129private void AddLabelIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
145private static void AddAlignmentBlockOperation(List<IndentBlockOperation> list, SyntaxNode node)
200private static void SetAlignmentBlockOperation(List<IndentBlockOperation> list, SyntaxNode baseNode, SyntaxNode body)
211private void AddBlockIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
248private static void AddBracketIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
283private static void AddParenthesizedPatternIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
303private static void AddAlignmentBlockOperationRelativeToFirstTokenOnBaseTokenLine(List<IndentBlockOperation> list, (SyntaxToken openBrace, SyntaxToken closeBrace) bracePair)
309private static void AddEmbeddedStatementsIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamespaceGenerator.cs (1)
141var usingDirectives =
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (7)
Microsoft.CodeAnalysis.EditorFeatures (62)
Preview\AbstractPreviewFactoryService.cs (15)
78var previewItems = new List<SolutionPreviewItem>();
432var conflictSpans = conflictNodes.Select(n => n.Span.ToSpan()).ToList();
438var warningSpans = warningNodes.Select(n => n.Span.ToSpan()).ToList();
444var suppressDiagnosticsSpans = suppressDiagnosticsNodes.Select(n => n.Span.ToSpan()).ToList();
457var originalLineSpans = CreateLineSpans(oldBuffer.CurrentSnapshot, originalSpans, cancellationToken);
458var changedLineSpans = CreateLineSpans(newBuffer.CurrentSnapshot, allSpans, cancellationToken);
514var originalLineSpans = CreateLineSpans(oldBuffer.CurrentSnapshot, originalSpans, cancellationToken);
515var changedLineSpans = CreateLineSpans(newBuffer.CurrentSnapshot, changedSpans, cancellationToken);
543List<LineSpan> originalSpans, List<LineSpan> changedSpans, ReferenceCountedDisposable<PreviewWorkspace> leftWorkspace, ReferenceCountedDisposable<PreviewWorkspace> rightWorkspace,
686private static List<LineSpan> CreateLineSpans(ITextSnapshot textSnapshot, NormalizedSpanCollection allSpans, CancellationToken cancellationToken)
690var result = new List<LineSpan>();
728private static void MergeLineSpans(List<LineSpan> lineSpans, LineSpan nextLineSpan)
762var lineSpans = new List<Span>();
777var lineSpans = new List<Span>();
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (47)
Completion\AbstractCompletionProviderTests.cs (26)
124List<CompletionFilter> matchingFilters, CompletionItemFlags? flags, CompletionOptions options,
130List<CompletionFilter> matchingFilters, CompletionItemFlags? flags, CompletionOptions options, bool skipSpeculation = false);
148List<CompletionFilter> matchingFilters,
171List<CompletionFilter> matchingFilters,
302private static bool FiltersMatch(List<CompletionFilter> expectedMatchingFilters, RoslynCompletion.CompletionItem item)
304var matchingFilters = FilterSet.GetFilters(item);
316List<CompletionFilter> matchingFilters, CompletionItemFlags? flags, CompletionOptions options, bool skipSpeculation = false)
342List<CompletionFilter> matchingFilters, CompletionItemFlags? flags, CompletionOptions options, bool skipSpeculation = false)
434bool? isComplexTextEdit = null, List<CompletionFilter> matchingFilters = null,
449bool? isComplexTextEdit = null, List<CompletionFilter> matchingFilters = null, CompletionItemFlags? flags = null,
501List<CompletionFilter> matchingFilters, CompletionItemFlags? flags,
532List<CompletionFilter> matchingFilters,
566List<CompletionFilter> matchingFilters,
1070List<CompletionFilter> matchingFilters, CompletionItemFlags? flags, CompletionOptions options, bool skipSpeculation = false)
1083List<CompletionFilter> matchingFilters, CompletionItemFlags? flags, CompletionOptions options, bool skipSpeculation = false)
1091List<CompletionFilter> matchingFilters, CompletionItemFlags? flags, CompletionOptions options, bool skipSpeculation = false)
1102bool? isComplexTextEdit = null, List<CompletionFilter> matchingFilters = null, CompletionItemFlags? flags = null, CompletionOptions options = null, bool skipSpeculation = false)
1120List<CompletionFilter> matchingFilters = null, CompletionItemFlags? flags = null, CompletionOptions options = null, bool skipSpeculation = false)
1133List<CompletionFilter> matchingFilters = null, CompletionItemFlags? flags = null,
1145List<CompletionFilter> matchingFilters, CompletionItemFlags? flags, CompletionOptions options, bool skipSpeculation = false)
1164List<CompletionFilter> matchingFilters, CompletionItemFlags? flags, CompletionOptions options, bool skipSpeculation = false)
1172List<CompletionFilter> matchingFilters, CompletionItemFlags? flags, CompletionOptions options)
1183List<CompletionFilter> matchingFilters = null, CompletionItemFlags? flags = null,
1208List<CompletionFilter> matchingFilters = null, CompletionItemFlags? flags = null,
1218List<CompletionFilter> matchingFilters, CompletionItemFlags? flags, CompletionOptions options)
1230List<CompletionFilter> matchingFilters = null, CompletionItemFlags? flags = null,
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (37)
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver.UnitTests (5)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
Microsoft.CodeAnalysis.Extensions.Package (13)
Microsoft.CodeAnalysis.ExternalAccess.FSharp (9)
Microsoft.CodeAnalysis.ExternalAccess.HotReload (1)
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (1)
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (2)
Microsoft.CodeAnalysis.ExternalAccess.Xaml (1)
Microsoft.CodeAnalysis.Features (234)
CodeFixes\Service\CodeFixService.cs (14)
125var spanToErrorDiagnostics = new SortedDictionary<TextSpan, List<DiagnosticData>>();
126var spanToOtherDiagnostics = new SortedDictionary<TextSpan, List<DiagnosticData>>();
152SortedDictionary<TextSpan, List<DiagnosticData>> spanToDiagnostics,
260private static SortedDictionary<TextSpan, List<DiagnosticData>> ConvertToMap(
267var spanToDiagnostics = new SortedDictionary<TextSpan, List<DiagnosticData>>();
316var spanToDiagnostics = new SortedDictionary<TextSpan, List<DiagnosticData>>
437SortedDictionary<TextSpan, List<DiagnosticData>> spanToDiagnostics,
457using var _2 = PooledDictionary<CodeFixProvider, List<(TextSpan range, List<DiagnosticData> diagnostics)>>.GetInstance(out var fixerToRangesAndDiagnostics);
588List<DiagnosticData> diagnostics,
590PooledDictionary<CodeFixProvider, List<(TextSpan range, List<DiagnosticData> diagnostics)>> fixerToRangesAndDiagnostics)
739List<DiagnosticData> diagnostics,
774List<DiagnosticData> diagnosticsWithSameSpan,
DocumentationComments\AbstractDocumentationCommentSnippetService.cs (9)
25protected abstract List<string> GetDocumentationCommentStubLines(TMemberNode member, string existingCommentText, DocumentationCommentOptions options);
88var lines = GetDocumentationCommentLines(token, text, options, out var indentText, out var caretOffset, out var spanToReplaceLength);
103private List<string>? GetDocumentationCommentLines(SyntaxToken token, SourceText text, in DocumentationCommentOptions options, out string? indentText, out int caretOffset, out int spanToReplaceLength)
107var lines = GetDocumentationStubLines(token, text, options, out caretOffset, out spanToReplaceLength, out var existingCommentText);
145private List<string>? GetDocumentationStubLines(SyntaxToken token, SourceText text, in DocumentationCommentOptions options, out int caretOffset, out int spanToReplaceLength, out string? existingCommentText)
172var lines = GetDocumentationCommentStubLines(targetMember, existingCommentText, options);
238private static void IndentLines(List<string> lines, string? indentText)
281var lines = GetDocumentationCommentLines(token, text, options, out var indentText, out _, out _);
329var lines = GetDocumentationCommentStubLines(targetMember, string.Empty, options);
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (20)
394protected abstract List<SyntaxNode> GetExceptionHandlingAncestors(SyntaxNode node, SyntaxNode root, bool isNonLeaf);
1033var ancestors = GetExceptionHandlingAncestors(newStatement, newBody.EncompassingAncestor, oldActiveStatements[i].Statement.IsNonLeaf);
1075public readonly List<int>? ActiveNodeIndices;
1081public LambdaInfo(List<int> activeNodeIndices)
1086private LambdaInfo(List<int>? activeNodeIndices, DeclarationBodyMap bodyMap, LambdaBody? newLambdaBody)
1553var oldAncestors = GetExceptionHandlingAncestors(oldStatementSyntax, oldEncompassingAncestor, isNonLeaf);
1554var newAncestors = GetExceptionHandlingAncestors(newStatementSyntax, newEncompassingAncestor, isNonLeaf);
1735private static List<KeyValuePair<SyntaxNode, SyntaxNode>>? GetMatchingActiveNodes(IEnumerable<ActiveNode> activeNodes)
1738List<KeyValuePair<SyntaxNode, SyntaxNode>>? lazyKnownMatches = null;
1757var ancestors = GetExceptionHandlingAncestors(node, root, isNonLeaf);
1761private ActiveStatementExceptionRegions GetExceptionRegions(List<SyntaxNode> exceptionHandlingAncestors, SyntaxTree tree, CancellationToken cancellationToken)
2014var newNodes = GetAncestors(newEncompassingAncestor, newActiveStatement, nodeSelector);
2020var oldNodes = GetAncestors(oldEncompassingAncestor, oldActiveStatement, nodeSelector);
2044private void ReportRudeEditsAndInserts(List<SyntaxNode?>? oldNodes, List<SyntaxNode?> newNodes, RudeEditDiagnosticsBuilder diagnostics)
2070List<SyntaxNode?> oldNodes,
2072List<SyntaxNode?> newNodes,
2167private static int IndexOfEquivalent<TSyntaxNode>(SyntaxNode newNode, List<SyntaxNode?> oldNodes, int startIndex, Func<TSyntaxNode, TSyntaxNode, bool> comparer)
2182private static List<SyntaxNode?>? GetAncestors(SyntaxNode? root, SyntaxNode node, Func<SyntaxNode, bool> nodeSelector)
2184List<SyntaxNode?>? list = null;
ExtractMethod\MethodExtractor.Analyzer.cs (4)
81bestEffort: false, dataFlowAnalysisData, symbolMap, isInPrimaryConstructorBaseType, out var variableInfoMap, out var failedVariables);
89bestEffort: true, dataFlowAnalysisData, symbolMap, isInPrimaryConstructorBaseType, out variableInfoMap, out var unused);
407out List<ISymbol> failedVariables)
757var typeParametersInConstraint = new List<ITypeParameterSymbol>();
Highlighting\Keywords\AbstractKeywordHighlighter.cs (7)
21protected sealed override void AddHighlightsForNode(SyntaxNode node, List<TextSpan> highlights, CancellationToken cancellationToken)
24protected abstract void AddHighlights(TNode node, List<TextSpan> highlights, CancellationToken cancellationToken);
31private static readonly ObjectPool<List<TextSpan>> s_textSpanListPool = new(() => []);
39SyntaxNode root, int position, List<TextSpan> highlights, CancellationToken cancellationToken)
47using var _2 = s_textSpanListPool.GetPooledObject(out var highlightsBuffer);
67private static bool AnyIntersects(int position, List<TextSpan> highlights)
78protected abstract void AddHighlightsForNode(SyntaxNode node, List<TextSpan> highlights, CancellationToken cancellationToken);
MetadataAsSource\AbstractMetadataAsSourceService+CompatAbstractMetadataFormattingRule.cs (6)
30public sealed override void AddAnchorIndentationOperations(List<AnchorIndentationOperation> list, SyntaxNode node, in NextAnchorIndentationOperationAction nextOperation)
38public sealed override void AddIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode node, in NextIndentBlockOperationAction nextOperation)
46public sealed override void AddAlignTokensOperations(List<AlignTokensOperation> list, SyntaxNode node, in NextAlignTokensOperationAction nextOperation)
83public virtual void AddAnchorIndentationOperationsSlow(List<AnchorIndentationOperation> list, SyntaxNode node, ref NextAnchorIndentationOperationAction nextOperation)
89public virtual void AddIndentBlockOperationsSlow(List<IndentBlockOperation> list, SyntaxNode node, ref NextIndentBlockOperationAction nextOperation)
95public virtual void AddAlignTokensOperationsSlow(List<AlignTokensOperation> list, SyntaxNode node, ref NextAlignTokensOperationAction nextOperation)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (14)
157using var _1 = PooledDictionary<string, List<(SyntaxTrivia pragma, bool isDisable)>>.GetInstance(out var idToPragmasMap);
166using var _5 = PooledDictionary<string, List<SyntaxNode>>.GetInstance(out var idToSuppressMessageAttributesMap);
200if (idToPragmasMap.TryGetValue(id, out var pragmas))
208if (idToSuppressMessageAttributesMap.TryGetValue(id, out var attributeNodes))
228PooledDictionary<string, List<(SyntaxTrivia pragma, bool isDisable)>> idToPragmasMap,
268if (!idToPragmasMap.TryGetValue(id, out var pragmasForIdInReverseOrder))
510PooledDictionary<string, List<(SyntaxTrivia pragma, bool isDisable)>> idToPragmasMap,
512PooledDictionary<string, List<SyntaxNode>> idToSuppressMessageAttributesMap,
546PooledDictionary<string, List<(SyntaxTrivia pragma, bool isDisable)>> idToPragmasMap,
549if (!idToPragmasMap.TryGetValue(diagnostic.Id, out var pragmasForIdInReverseOrder))
586PooledDictionary<string, List<SyntaxNode>> idToSuppressMessageAttributesMap,
591!idToSuppressMessageAttributesMap.TryGetValue(diagnostic.Id, out var suppressMessageAttributesForId))
736PooledDictionary<string, List<SyntaxNode>> idToSuppressMessageAttributesMap,
813if (!idToSuppressMessageAttributesMap.TryGetValue(id, out var nodesForId))
Microsoft.CodeAnalysis.Features.Test.Utilities (16)
Microsoft.CodeAnalysis.Features.UnitTests (1)
Microsoft.CodeAnalysis.InteractiveHost (10)
Microsoft.CodeAnalysis.LanguageServer (7)
Microsoft.CodeAnalysis.LanguageServer.Protocol (16)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (15)
Microsoft.CodeAnalysis.LanguageServer.UnitTests (1)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (136)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (2)
24public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
43public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\CompatAbstractFormattingRule.cs (6)
25public sealed override void AddAnchorIndentationOperations(List<AnchorIndentationOperation> list, SyntaxNode node, in NextAnchorIndentationOperationAction nextOperation)
33public sealed override void AddIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode node, in NextIndentBlockOperationAction nextOperation)
41public sealed override void AddAlignTokensOperations(List<AlignTokensOperation> list, SyntaxNode node, in NextAlignTokensOperationAction nextOperation)
78public virtual void AddAnchorIndentationOperationsSlow(List<AnchorIndentationOperation> list, SyntaxNode node, ref NextAnchorIndentationOperationAction nextOperation)
84public virtual void AddIndentBlockOperationsSlow(List<IndentBlockOperation> list, SyntaxNode node, ref NextIndentBlockOperationAction nextOperation)
90public virtual void AddAlignTokensOperationsSlow(List<AlignTokensOperation> list, SyntaxNode node, ref NextAlignTokensOperationAction nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
86var result = new List<ITypeSymbol>
Microsoft.CodeAnalysis.PublicApiAnalyzers (122)
DeclarePublicApiAnalyzer.cs (5)
114var errors = new List<Diagnostic>();
134bool TryGetAndValidateApiFiles(CompilationStartAnalysisContext context, bool isPublic, List<Diagnostic> errors, [NotNullWhen(true)] out ImmutableDictionary<AdditionalText, SourceText>? additionalFiles, [NotNullWhen(true)] out ApiData? shippedData, [NotNullWhen(true)] out ApiData? unshippedData)
197private static bool TryGetApiData(CompilationStartAnalysisContext context, bool isPublic, List<Diagnostic> errors, [NotNullWhen(true)] out ImmutableDictionary<AdditionalText, SourceText>? additionalFiles, [NotNullWhen(true)] out ApiData? shippedData, [NotNullWhen(true)] out ApiData? unshippedData)
363private static bool ValidateApiFiles(ImmutableDictionary<AdditionalText, SourceText> additionalFiles, ApiData shippedData, ApiData unshippedData, bool isPublic, List<Diagnostic> errors)
391private static void ValidateApiList(ImmutableDictionary<AdditionalText, SourceText> additionalFiles, Dictionary<string, ApiLine> publicApiMap, ImmutableArray<ApiLine> apiList, bool isPublic, List<Diagnostic> errors)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (2)
24public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
43public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\CompatAbstractFormattingRule.cs (6)
25public sealed override void AddAnchorIndentationOperations(List<AnchorIndentationOperation> list, SyntaxNode node, in NextAnchorIndentationOperationAction nextOperation)
33public sealed override void AddIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode node, in NextIndentBlockOperationAction nextOperation)
41public sealed override void AddAlignTokensOperations(List<AlignTokensOperation> list, SyntaxNode node, in NextAlignTokensOperationAction nextOperation)
78public virtual void AddAnchorIndentationOperationsSlow(List<AnchorIndentationOperation> list, SyntaxNode node, ref NextAnchorIndentationOperationAction nextOperation)
84public virtual void AddIndentBlockOperationsSlow(List<IndentBlockOperation> list, SyntaxNode node, ref NextIndentBlockOperationAction nextOperation)
90public virtual void AddAlignTokensOperationsSlow(List<AlignTokensOperation> list, SyntaxNode node, ref NextAlignTokensOperationAction nextOperation)
Microsoft.CodeAnalysis.PublicApiAnalyzers.CodeFixes (21)
DeclarePublicApiFix.cs (10)
136List<string> lines = GetLinesFromSourceText(sourceText);
149static void insertInList(List<string> list, string name)
171List<string> lines = GetLinesFromSourceText(sourceText);
179internal static List<string> GetLinesFromSourceText(SourceText? sourceText)
186var lines = new List<string>();
223private readonly List<KeyValuePair<Project, ImmutableArray<Diagnostic>>> _diagnosticsToFix;
228public FixAllAdditionalDocumentChangeAction(string title, DocumentId? apiDocId, Solution solution, List<KeyValuePair<Project, ImmutableArray<Diagnostic>>> diagnosticsToFix, bool isPublic)
241var updatedPublicSurfaceAreaText = new List<KeyValuePair<DocumentId, SourceText>>();
242var addedPublicSurfaceAreaText = new List<KeyValuePair<ProjectId, SourceText>>();
354var diagnosticsToFix = new List<KeyValuePair<Project, ImmutableArray<Diagnostic>>>();
Microsoft.CodeAnalysis.Rebuild (1)
Microsoft.CodeAnalysis.Rebuild.UnitTests (6)
Microsoft.CodeAnalysis.Remote.ServiceHub (21)
Microsoft.CodeAnalysis.ResxSourceGenerator (116)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (2)
24public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
43public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\CompatAbstractFormattingRule.cs (6)
25public sealed override void AddAnchorIndentationOperations(List<AnchorIndentationOperation> list, SyntaxNode node, in NextAnchorIndentationOperationAction nextOperation)
33public sealed override void AddIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode node, in NextIndentBlockOperationAction nextOperation)
41public sealed override void AddAlignTokensOperations(List<AlignTokensOperation> list, SyntaxNode node, in NextAlignTokensOperationAction nextOperation)
78public virtual void AddAnchorIndentationOperationsSlow(List<AnchorIndentationOperation> list, SyntaxNode node, ref NextAnchorIndentationOperationAction nextOperation)
84public virtual void AddIndentBlockOperationsSlow(List<IndentBlockOperation> list, SyntaxNode node, ref NextIndentBlockOperationAction nextOperation)
90public virtual void AddAlignTokensOperationsSlow(List<AlignTokensOperation> list, SyntaxNode node, ref NextAlignTokensOperationAction nextOperation)
Microsoft.CodeAnalysis.Scripting (17)
Microsoft.CodeAnalysis.Scripting.TestUtilities (1)
Microsoft.CodeAnalysis.Test.Utilities (70)
Microsoft.CodeAnalysis.Threading.Package (6)
Microsoft.CodeAnalysis.UnitTests (84)
Collections\HashSet\SegmentedHashSet_Generic_Tests`1.cs (5)
110List<T> sourceElements = source.ToList();
199List<T> expected = set.ToList();
213List<T> expected = set.ToList();
294List<T> objects = new List<T>() { CreateT(1), CreateT(2), CreateT(3), CreateT(4), CreateT(5), CreateT(6) };
328List<T> objects = new List<T>() { CreateT(1), CreateT(2), CreateT(3), CreateT(4), CreateT(5), CreateT(6) };
Collections\ImmutableSegmentedListTest.cs (9)
42var expected = new List<int>();
221var list = new List<int>();
448var expectedList = new List<string>(new[] { "Microsoft", "Windows", "Bing", "Visual Studio", "Comics", "Computers", "Laptops" });
842var expected = list.ToList();
850var expected = list.ToList();
856private protected override List<T> SortTestHelper<T>(ImmutableSegmentedList<T> list)
861private protected override List<T> SortTestHelper<T>(ImmutableSegmentedList<T> list, Comparison<T> comparison)
866private protected override List<T> SortTestHelper<T>(ImmutableSegmentedList<T> list, IComparer<T>? comparer)
871private protected override List<T> SortTestHelper<T>(ImmutableSegmentedList<T> list, int index, int count, IComparer<T>? comparer)
Microsoft.CodeAnalysis.VisualBasic (3)
Microsoft.CodeAnalysis.Workspaces (276)
Diagnostics\DiagnosticAnalysisResultBuilder.cs (10)
23private Dictionary<DocumentId, List<DiagnosticData>>? _lazySyntaxLocals = null;
24private Dictionary<DocumentId, List<DiagnosticData>>? _lazySemanticLocals = null;
25private Dictionary<DocumentId, List<DiagnosticData>>? _lazyNonLocals = null;
27private List<DiagnosticData>? _lazyOthers = null;
48ref Dictionary<DocumentId, List<DiagnosticData>>? lazyLocals, DocumentId documentId, ImmutableArray<Diagnostic> diagnostics)
93private static void AddDocumentDiagnostic(ref Dictionary<DocumentId, List<DiagnosticData>>? map, TextDocument document, Diagnostic diagnostic)
119Dictionary<DocumentId, List<DiagnosticData>>? dummy = null;
127ref Dictionary<DocumentId, List<DiagnosticData>>? lazyLocals, SyntaxTree? tree, Diagnostic diagnostic)
180ref Dictionary<DocumentId, List<DiagnosticData>>? lazyLocals, SyntaxTree? tree, ImmutableArray<Diagnostic> diagnostics)
186private static ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> Convert(Dictionary<DocumentId, List<DiagnosticData>>? map)
Rename\ConflictEngine\RenamedSpansTracker.cs (12)
25private readonly Dictionary<DocumentId, List<(TextSpan oldSpan, TextSpan newSpan)>> _documentToModifiedSpansMap = [];
26private readonly Dictionary<DocumentId, List<MutableComplexifiedSpan>> _documentToComplexifiedSpansMap = [];
33if (!_documentToModifiedSpansMap.TryGetValue(documentId, out var spans))
42internal void AddComplexifiedSpan(DocumentId documentId, TextSpan oldSpan, TextSpan newSpan, List<(TextSpan oldSpan, TextSpan newSpan)> modifiedSubSpans)
44if (!_documentToComplexifiedSpansMap.TryGetValue(documentId, out var spans))
56var documentReplacementSpans = _documentToModifiedSpansMap.TryGetValue(documentId, out var modifiedSpans)
66var documentComplexifiedSpans = _documentToComplexifiedSpansMap.TryGetValue(documentId, out var complexifiedSpans)
122TextSpan originalSpan, TextSpan newSpan, List<(TextSpan oldSpan, TextSpan newSpan)> modifiedSubSpans)
126public List<(TextSpan oldSpan, TextSpan newSpan)> ModifiedSubSpans = modifiedSubSpans;
172if (_documentToModifiedSpansMap.TryGetValue(documentId, out var modifiedSpans))
177if (_documentToComplexifiedSpansMap.TryGetValue(documentId, out var complexifiedSpans))
197var modifiedSubSpans = new List<(TextSpan oldSpan, TextSpan newSpan)>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (2)
24public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
43public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\CompatAbstractFormattingRule.cs (6)
25public sealed override void AddAnchorIndentationOperations(List<AnchorIndentationOperation> list, SyntaxNode node, in NextAnchorIndentationOperationAction nextOperation)
33public sealed override void AddIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode node, in NextIndentBlockOperationAction nextOperation)
41public sealed override void AddAlignTokensOperations(List<AlignTokensOperation> list, SyntaxNode node, in NextAlignTokensOperationAction nextOperation)
78public virtual void AddAnchorIndentationOperationsSlow(List<AnchorIndentationOperation> list, SyntaxNode node, ref NextAnchorIndentationOperationAction nextOperation)
84public virtual void AddIndentBlockOperationsSlow(List<IndentBlockOperation> list, SyntaxNode node, ref NextIndentBlockOperationAction nextOperation)
90public virtual void AddAlignTokensOperationsSlow(List<AlignTokensOperation> list, SyntaxNode node, ref NextAlignTokensOperationAction nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
86var result = new List<ITypeSymbol>
Workspace\ProjectSystem\ProjectSystemProject.cs (18)
52private readonly List<(string path, MetadataReferenceProperties properties)> _metadataReferencesAddedInBatch = [];
53private readonly List<(string path, MetadataReferenceProperties properties)> _metadataReferencesRemovedInBatch = [];
54private readonly List<ProjectReference> _projectReferencesAddedInBatch = [];
55private readonly List<ProjectReference> _projectReferencesRemovedInBatch = [];
70private readonly List<string> _analyzersAddedInBatch = [];
75private readonly List<string> _analyzersRemovedInBatch = [];
77private readonly List<Func<SolutionChangeAccumulator, ProjectUpdateState, ProjectUpdateState>> _projectPropertyModificationsInBatch = [];
676List<(string path, MetadataReferenceProperties properties)> metadataReferencesRemovedInBatch,
677List<(string path, MetadataReferenceProperties properties)> metadataReferencesAddedInBatch)
714var projectReferencesCreated = new List<ProjectReference>();
748List<ProjectReference> projectReferencesRemovedInBatch,
749List<ProjectReference> projectReferencesAddedInBatch)
767List<string> analyzersRemovedInBatch,
768List<string> analyzersAddedInBatch)
787List<string> analyzersRemoved,
788List<string> analyzersAdded)
1337var newList = projectReferencesInWorkspace.ToList();
1434private static void ClearAndZeroCapacity<T>(List<T> list)
Microsoft.CodeAnalysis.Workspaces.MSBuild (8)
Rpc\RpcClient.cs (4)
120public Task InvokeAsync(int targetObject, string methodName, List<object?> parameters, CancellationToken cancellationToken)
126public async Task<T?> InvokeNullableAsync<T>(int targetObject, string methodName, List<object?> parameters, CancellationToken cancellationToken) where T : class
132public async Task<T> InvokeAsync<T>(int targetObject, string methodName, List<object?> parameters, CancellationToken cancellationToken) where T : notnull
139private async Task<object?> InvokeCoreAsync(int targetObject, string methodName, List<object?> parameters, Type? expectedReturnType, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (43)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (25)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (21)
Microsoft.CodeAnalysis.Workspaces.UnitTests (76)
ExtensionOrdererTests.cs (11)
26var extensions = new List<Lazy<Extension, OrderableMetadata>>() { d, b, a, c, e };
43var extensions = new List<Lazy<Extension, OrderableMetadata>>() { d, b, a, c, e };
60var extensions = new List<Lazy<Extension, OrderableMetadata>>() { d, b, a, c, e };
77var extensions = new List<Lazy<Extension, OrderableMetadata>>() { a, b, c, d, e };
94var extensions = new List<Lazy<Extension, OrderableMetadata>>() { a, b, c, d, e };
109var extensions = new List<Lazy<Extension, OrderableMetadata>>() { a, b, c };
124var extensions = new List<Lazy<Extension, OrderableMetadata>>() { a, b, c };
143var extensions = new List<Lazy<Extension, OrderableMetadata>>() { a, b, c, d, e, f, g };
162var extensions = new List<Lazy<Extension, OrderableMetadata>>() { a, b, c, d, e, f, g };
180var extensions = new List<Lazy<Extension, OrderableMetadata>>() { a, b, c, d, e, f };
198var extensions = new List<Lazy<Extension, OrderableMetadata>>() { a, b, c, d, e, f };
Microsoft.CommonLanguageServerProtocol.Framework.UnitTests (1)
Microsoft.CSharp (66)
Microsoft\CSharp\RuntimeBinder\Semantics\Operators.cs (15)
185private bool GetSpecialBinopSignatures(List<BinOpFullSig> prgbofs, BinOpArgInfo info)
202private bool GetStandardAndLiftedBinopSignatures(List<BinOpFullSig> rgbofs, BinOpArgInfo info)
408List<BinOpFullSig> binopSignatures,
513List<BinOpFullSig> binopSignatures = new List<BinOpFullSig>();
710private bool GetDelBinOpSigs(List<BinOpFullSig> prgbofs, BinOpArgInfo info)
824private static void RecordBinOpSigFromArgs(List<BinOpFullSig> prgbofs, BinOpArgInfo info)
861private bool GetEnumBinOpSigs(List<BinOpFullSig> prgbofs, BinOpArgInfo info)
934private bool GetRefEqualSigs(List<BinOpFullSig> prgbofs, BinOpArgInfo info)
1208List<UnaOpFullSig> pSignatures = new List<UnaOpFullSig>();
1322private UnaryOperatorSignatureFindResult PopulateSignatureList(Expr pArgument, UnaOpKind unaryOpKind, UnaOpMask unaryOpMask, ExpressionKind exprKind, EXPRFLAG flags, List<UnaOpFullSig> pSignatures, out Expr ppResult)
1417List<UnaOpFullSig> pSignatures)
2510private bool UserDefinedBinaryOperatorIsApplicable(List<CandidateFunctionMember> candidateList,
2550List<CandidateFunctionMember> candidateList, ExpressionKind ek, AggregateType type,
2571List<CandidateFunctionMember> candidateList, ExpressionKind ek, AggregateType type,
2589List<CandidateFunctionMember> methFirst = new List<CandidateFunctionMember>();
Microsoft.Data.Analysis (53)
Microsoft.Data.Analysis.Interactive (8)
Microsoft.Data.Analysis.Interactive.Tests (1)
Microsoft.Data.Analysis.Tests (10)
DataFrameTests.cs (3)
327List<int> verify = new List<int>() { 0, 3, 1, 4, 2, 5 };
349List<int> originalColumnVerify = new List<int>() { 6, 8, 7, 9 };
350List<int> tailColumnVerity = new List<int>() { 1, 2, 4, 5 };
Microsoft.DotNet.Arcade.Sdk (2)
Microsoft.DotNet.ArcadeAzureIntegration (1)
Microsoft.DotNet.Baselines.Tasks (15)
Microsoft.DotNet.Build.Manifest (6)
Microsoft.DotNet.Build.Manifest.Tests (3)
Microsoft.DotNet.Build.Tasks.Feed (24)
Microsoft.DotNet.Build.Tasks.Feed.Tests (24)
Microsoft.DotNet.Build.Tasks.Installers (33)
Microsoft.DotNet.Build.Tasks.Packaging (47)
Microsoft.DotNet.Build.Tasks.TargetFramework (2)
Microsoft.DotNet.Build.Tasks.Workloads (20)
Microsoft.DotNet.CMake.Sdk (6)
Microsoft.DotNet.Deployment.Tasks.Links (3)
Microsoft.DotNet.GenFacades (2)
Microsoft.DotNet.Helix.Client (3)
Microsoft.DotNet.Helix.JobSender (2)
Microsoft.DotNet.Helix.Sdk (5)
Microsoft.DotNet.Helix.Sdk.Tests (4)
Microsoft.DotNet.MacOsPkg.Core (1)
Microsoft.DotNet.MacOsPkg.Tests (1)
Microsoft.DotNet.NuGetRepack.Tasks (3)
Microsoft.DotNet.NuGetRepack.Tests (5)
Microsoft.DotNet.Open.Api.Tools.Tests (5)
Microsoft.DotNet.PackageTesting (7)
Microsoft.DotNet.PackageTesting.Tests (2)
Microsoft.DotNet.SetupNugetSources.Tests (3)
Microsoft.DotNet.SharedFramework.Sdk (6)
Microsoft.DotNet.SignCheckLibrary (19)
Microsoft.DotNet.SignCheckTask (7)
Microsoft.DotNet.SignTool (34)
Microsoft.DotNet.SignTool.Tests (162)
Microsoft.DotNet.StrongName (1)
Microsoft.DotNet.SwaggerGenerator.CmdLine (2)
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (9)
HelperFactory.cs (7)
33var helpers = CreateHelpersForType(type, instance);
40var blockHelpers = CreateBlockHelpersForType(type, instance);
48private static List<(string name, HandlebarsBlockHelper helper)> CreateBlockHelpersForType(Type type, object instance)
50var helpers = new List<(string name, HandlebarsBlockHelper helper)>();
74private static List<(string name, HandlebarsHelper helper)> CreateHelpersForType(Type type, object instance)
76var helpers = new List<(string name, HandlebarsHelper helper)>();
247private static IEnumerable<Expression> GetParameterExpressions(MethodInfo method, ParameterExpression argumentsParameter, List<ProvidedParameter> providedParameters)
Microsoft.DotNet.SwaggerGenerator.MSBuild (2)
Microsoft.DotNet.XliffTasks (3)
Microsoft.DotNet.XliffTasks.Tests (5)
Microsoft.DotNet.XUnitAssert.Tests (63)
Asserts\CollectionAssertsTests.cs (43)
77 var indices = new List<int>();
150 var indices = new List<int>();
163 var list = new List<int>();
173 var list = new List<int>();
197 var list = new List<int> { 42, 2112 };
208 var list = new List<int> { 42, 2112 };
236 var list = new List<int>();
246 var list = new List<int>();
270 var list = new List<int> { 42, 2112 };
289 var list = new List<int> { 42, 2112 };
331 var list = new List<object?> { 16, null, "Hi there" };
339 var list = new List<int> { 42 };
347 var list = new List<int> { 41, 43 };
363 var list = new List<object?> { null, 16, "Hi there" };
403 var list = new List<int> { 42 };
477 var list = new List<object?> { 16, "Hi there", null };
485 var list = new List<int> { 42, 42 };
501 var list = new List<string?> { "a", null, "b", null, "c", "d" };
551 var list = new List<object?> { 16, "Hi there" };
559 var list = new List<int> { 42 };
576 var list = new List<int>();
584 var list = new List<object?> { null, 16, "Hi there" };
642 var list = new List<int> { 42 };
710 var list = new List<int>();
718 var list = new List<int> { 42 };
1005 var actual = new List<int>(expected);
1060 var actual = actualArray is null ? null : new List<int>(actualArray);
1086 var actual = new List<int> { 1, 2, 3, 4, 5 };
1105 var actual = new List<int> { 0, 0, 0, 0, 0 };
1123 var actual = new List<EnumerableItem> { new(0), new(2) };
1124 var expected = new List<EnumerableItem> { new(1), new(3) };
1232 var actual = new List<int> { 1, 2, 3, 4, 5 };
1251 var actual = new List<int> { 0, 0, 0, 0, 0 };
1260 var expected = new List<EnumerableItem> { new(1), new(3) };
1261 var actual = new List<EnumerableItem> { new(0), new(2) };
1702 var list = new List<int>();
1716 var list = new List<int> { 42 };
1827 var actual = new List<int>(expected);
1844 var actual = new List<int> { 1, 2, 3, 4, 0, 6, 7, 8, 9, 10 };
1856 var actual = new List<int> { 1, 2, 3, 4, 5 };
1865 var actual = new List<int> { 0, 0, 0, 0, 0 };
1968 var actual = new List<int> { 1, 2, 3, 4, 5 };
1977 var actual = new List<int> { 0, 0, 0, 0, 0 };
Microsoft.DotNet.XUnitExtensions (6)
Microsoft.DotNet.XUnitExtensions.Tests (1)
Microsoft.DotNet.XUnitV3Extensions (1)
Microsoft.DotNet.XUnitV3Extensions.Tests (1)
Microsoft.Extensions.AI (78)
ChatCompletion\FunctionInvokingChatClient.cs (46)
279List<ChatMessage> originalMessages = [.. messages];
282List<ChatMessage>? augmentedHistory = null; // the actual history of messages sent on turns other than the first
284List<ChatMessage>? responseMessages = null; // tracked list of messages, across multiple turns, to be used for the final response
286List<FunctionCallContent>? functionCallContents = null; // function call contents that need responding to in the current turn
297(responseMessages, var notInvokedApprovals) = ProcessFunctionApprovalResponses(
432List<ChatMessage> originalMessages = [.. messages];
435List<ChatMessage>? augmentedHistory = null; // the actual history of messages sent on turns other than the first
436List<FunctionCallContent>? functionCallContents = null; // function call contents that need responding to in the current turn
437List<ChatMessage>? responseMessages = null; // tracked list of messages, across multiple turns, to be used in fallback cases to reconstitute history
439List<ChatResponseUpdate> updates = []; // updates from the current response
604if (TryReplaceFunctionCallsWithApprovalRequests(updateToYield.Contents, out var updatedContents))
728[NotNull] ref List<ChatMessage>? augmentedHistory,
730List<ChatMessage> allTurnsResponseMessages,
844private static bool HasAnyApprovalContent(List<ChatMessage> messages) =>
849IList<ChatMessage> messages, [NotNullWhen(true)] ref List<FunctionCallContent>? functionCalls)
863IList<AIContent> content, [NotNullWhen(true)] ref List<FunctionCallContent>? functionCalls)
928private static void MarkServerHandledFunctionCalls(List<ChatResponseUpdate> updates, List<FunctionCallContent>? functionCallContents)
1023List<AITool>? remainingTools = null;
1051private bool ShouldTerminateLoopBasedOnHandleableFunctions(List<FunctionCallContent>? functionCalls, ChatOptions? options)
1119List<ChatMessage> messages, ChatOptions? options,
1120List<FunctionCallContent> functionCallContents, int iteration, int consecutiveErrorCount,
1146List<FunctionInvocationResult> results = [];
1248List<ChatMessage> messages, ChatOptions? options,
1249List<FunctionCallContent> callContents,
1325var contents = new List<AIContent>(results.Length);
1515private (List<ChatMessage>? preDownstreamCallHistory, List<ApprovalResultWithRequestMessage>? approvals) ProcessFunctionApprovalResponses(
1516List<ChatMessage> originalMessages, bool hasConversationId, string? toolMessageId, string? functionCallContentFallbackMessageId)
1528List<AIContent>? rejectedFunctionCallResults = GenerateRejectedFunctionResults(notInvokedResponses.rejections);
1536List<ChatMessage>? preDownstreamCallHistory = null;
1566private (List<ApprovalResultWithRequestMessage>? approvals, List<ApprovalResultWithRequestMessage>? rejections) ExtractAndRemoveApprovalRequestsAndResponses(
1567List<ChatMessage> messages)
1570List<FunctionApprovalResponseContent>? allApprovalResponses = null;
1585List<AIContent>? keptContents = null;
1654List<ApprovalResultWithRequestMessage>? approvedFunctionCalls = null, rejectedFunctionCalls = null;
1668ref List<ApprovalResultWithRequestMessage>? targetList = ref approvalResponse.Approved ? ref approvedFunctionCalls : ref rejectedFunctionCalls;
1685private List<AIContent>? GenerateRejectedFunctionResults(List<ApprovalResultWithRequestMessage>? rejections) =>
1709List<ApprovalResultWithRequestMessage>? resultWithRequestMessages, string? fallbackMessageId)
1794List<FunctionCallContent>? functionCallContents,
1829private static bool TryReplaceFunctionCallsWithApprovalRequests(IList<AIContent> content, out List<AIContent>? updatedContent)
1859List<(int, int)>? allFunctionCallContentIndices = null;
1917List<ApprovalResultWithRequestMessage>? notInvokedApprovals,
1918List<ChatMessage> originalMessages,
Microsoft.Extensions.AI.Abstractions (11)
Microsoft.Extensions.AI.Abstractions.Tests (37)
Microsoft.Extensions.AI.Evaluation (2)
Microsoft.Extensions.AI.Evaluation.Console (1)
Microsoft.Extensions.AI.Evaluation.Integration.Tests (9)
Microsoft.Extensions.AI.Evaluation.NLP (9)
Microsoft.Extensions.AI.Evaluation.Quality (33)
Microsoft.Extensions.AI.Evaluation.Reporting (1)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (3)
Microsoft.Extensions.AI.Evaluation.Safety (17)
Microsoft.Extensions.AI.Integration.Tests (72)
ToolReductionTests.cs (30)
28var tools = CreateTools("Weather", "Math");
48var tools = CreateTools("Req", "Opt1", "Opt2");
62var tools = CreateTools("Weather", "Translate", "Math", "Jokes");
70var reduced = (await strategy.SelectToolsForRequestAsync(messages, options)).ToList();
86var tools = CreateTools("Math", "Translate", "Weather");
87var reduced = (await strategy.SelectToolsForRequestAsync(
102var tools = CreateTools("Weather", "Math", "Jokes");
144var reduced = (await strategy.SelectToolsForRequestAsync(
159var tools = CreateTools("T1", "T2", "T3", "T4");
160var reduced = (await strategy.SelectToolsForRequestAsync(
223var tools = CreateTools("Weather", "Math", "Translate");
234var reduced = (await strategy.SelectToolsForRequestAsync(
248var tools = CreateTools("Weather", "Math");
269var tools = CreateTools("Weather", "Math");
304var tools = CreateTools("Alpha", "Beta");
332var tools = CreateTools("Core", "Weather", "Math");
333var reduced = (await strategy.SelectToolsForRequestAsync(
351var tools = CreateTools("R1", "R2", "R3", "Weather", "Math");
352var reduced = (await strategy.SelectToolsForRequestAsync(
365var tools = CreateTools("Weather", "Math", "Translate", "Jokes");
395var tools = CreateTools("Weather", "Math");
429var tools = CreateTools("ToolA", "ToolB", "ToolC");
453var tools = CreateTools("Req", "Optional1", "Optional2");
476var tools = CreateTools("One", "Two");
490private static List<AITool> CreateTools(params string[] names) =>
536var list = new List<Embedding<float>>();
571public List<string> Inputs { get; } = new();
578var list = new List<Embedding<float>>();
602var list = new List<Embedding<float>>();
628var list = new List<Embedding<float>>();
Microsoft.Extensions.AI.OpenAI (20)
Microsoft.Extensions.AI.OpenAI.Tests (91)
Microsoft.Extensions.AI.Templates.Tests (1)
Microsoft.Extensions.AI.Tests (263)
ChatCompletion\FunctionInvokingChatClientApprovalsTests.cs (105)
34List<ChatMessage> input =
39List<ChatMessage> downstreamClientOutput =
44List<ChatMessage> expectedOutput =
70List<ChatMessage> input =
75List<ChatMessage> downstreamClientOutput =
80List<ChatMessage> expectedOutput =
114List<ChatMessage> input =
119List<ChatMessage> downstreamClientOutput =
124List<ChatMessage> expectedOutput =
150List<ChatMessage> input =
165List<ChatMessage> expectedDownstreamClientInput =
172List<ChatMessage> downstreamClientOutput =
177List<ChatMessage> output =
202List<ChatMessage> input =
218List<ChatMessage> expectedDownstreamClientInput =
225List<ChatMessage> downstreamClientOutput =
230List<ChatMessage> output =
254List<ChatMessage> input =
275List<ChatMessage> expectedDownstreamClientInput =
283List<ChatMessage> downstreamClientOutput =
288List<ChatMessage> output =
313List<ChatMessage> input =
328List<ChatMessage> expectedDownstreamClientInput =
339List<ChatMessage> downstreamClientOutput =
344List<ChatMessage> output =
372List<ChatMessage> input =
387List<ChatMessage> expectedDownstreamClientInput =
395List<ChatMessage> downstreamClientOutput =
400List<ChatMessage> nonStreamingOutput =
408List<ChatMessage> streamingOutput =
436List<ChatMessage> input =
457List<ChatMessage> expectedDownstreamClientInput =
468List<ChatMessage> downstreamClientOutput =
473List<ChatMessage> output =
502List<ChatMessage> input =
519List<ChatMessage> expectedDownstreamClientInput =
536List<ChatMessage> downstreamClientOutput =
541List<ChatMessage> nonStreamingOutput =
558List<ChatMessage> streamingOutput =
594List<ChatMessage> input =
610List<ChatMessage> expectedDownstreamClientInput =
620List<ChatMessage> downstreamClientOutput =
625List<ChatMessage> output =
652List<ChatMessage> input =
667List<ChatMessage> expectedDownstreamClientInput =
674List<ChatMessage> downstreamClientOutput =
679List<ChatMessage> output =
706List<ChatMessage> input =
731List<ChatMessage> expectedDownstreamClientInput =
740List<ChatMessage> downstreamClientOutput =
745List<ChatMessage> output =
777List<ChatMessage> input =
782Func<Queue<List<ChatMessage>>> expectedDownstreamClientInput = () => new Queue<List<ChatMessage>>(
796Func<Queue<List<ChatMessage>>> downstreamClientOutput = () => new Queue<List<ChatMessage>>(
808List<ChatMessage> output =
832List<ChatMessage> input =
862List<ChatMessage> input =
872List<ChatMessage> expectedDownstreamClientInput =
879List<ChatMessage> downstreamClientOutput =
884List<ChatMessage> output =
909List<ChatMessage> input =
918List<ChatMessage> expectedDownstreamClientInput =
923List<ChatMessage> downstreamClientOutput =
928List<ChatMessage> output =
957List<ChatMessage> input = [new ChatMessage(ChatRole.User, "hello")];
1033List<ChatMessage> input = [new ChatMessage(ChatRole.User, "hello")];
1131List<ChatMessage> input = [new ChatMessage(ChatRole.User, "hello")];
1135List<ChatMessage> downstreamClientOutput =
1141List<ChatMessage> expectedOutput =
1173List<ChatMessage> input =
1186List<ChatMessage> downstreamClientOutput =
1192List<ChatMessage> expectedOutput =
1199var actualOutput = await InvokeAndAssertAsync(options, input, downstreamClientOutput, expectedOutput);
1208private static Task<List<ChatMessage>> InvokeAndAssertAsync(
1210List<ChatMessage> input,
1211List<ChatMessage> downstreamClientOutput,
1212List<ChatMessage> expectedOutput,
1213List<ChatMessage>? expectedDownstreamClientInput = null,
1219new Queue<List<ChatMessage>>(new[] { downstreamClientOutput }),
1221expectedDownstreamClientInput is null ? null : new Queue<List<ChatMessage>>(new[] { expectedDownstreamClientInput }),
1225private static async Task<List<ChatMessage>> InvokeAndAssertMultiRoundAsync(
1227List<ChatMessage> input,
1228Queue<List<ChatMessage>> downstreamClientOutput,
1229List<ChatMessage> expectedOutput,
1230Queue<List<ChatMessage>>? expectedDownstreamClientInput = null,
1256var output = downstreamClientOutput.Dequeue();
1267var actualOutput = result.Messages as List<ChatMessage> ?? result.Messages.ToList();
1296private static Task<List<ChatMessage>> InvokeAndAssertStreamingAsync(
1298List<ChatMessage> input,
1299List<ChatMessage> downstreamClientOutput,
1300List<ChatMessage> expectedOutput,
1301List<ChatMessage>? expectedDownstreamClientInput = null,
1307new Queue<List<ChatMessage>>(new[] { downstreamClientOutput }),
1309expectedDownstreamClientInput is null ? null : new Queue<List<ChatMessage>>(new[] { expectedDownstreamClientInput }),
1313private static async Task<List<ChatMessage>> InvokeAndAssertStreamingMultiRoundAsync(
1315List<ChatMessage> input,
1316Queue<List<ChatMessage>> downstreamClientOutput,
1317List<ChatMessage> expectedOutput,
1318Queue<List<ChatMessage>>? expectedDownstreamClientInput = null,
1338var output = downstreamClientOutput.Dequeue();
1349var actualOutput = result.Messages as List<ChatMessage> ?? result.Messages.ToList();
Functions\AIFunctionFactoryTest.cs (9)
38Assert.Throws<ArgumentException>("method", () => AIFunctionFactory.Create(typeof(List<>).GetMethod("Add")!, new List<int>()));
961await ValidateAsync<List<AIContent>>(
963AIFunctionFactory.Create(() => (List<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
964AIFunctionFactory.Create(async () => (List<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
965AIFunctionFactory.Create(async ValueTask<List<AIContent>> () => (List<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
972AIFunctionFactory.Create(async ValueTask<IList<AIContent>> () => (List<AIContent>)[new TextContent("text"), new DataContent(new byte[] { 1, 2, 3 }, "application/octet-stream")]),
1353List<string> requiredParams = required.EnumerateArray().Select(e => e.GetString()!).ToList();
1415List<string> requiredParams = required.EnumerateArray().Select(e => e.GetString()!).ToList();
Microsoft.Extensions.ApiDescription.Client (1)
Microsoft.Extensions.ApiDescription.Client.Tests (5)
Microsoft.Extensions.ApiDescription.Tool.Tests (6)
Microsoft.Extensions.AsyncState (17)
Microsoft.Extensions.AsyncState.Tests (4)
Microsoft.Extensions.Caching.Abstractions (4)
Microsoft.Extensions.Caching.Hybrid.Tests (6)
SerializerTests.cs (4)
109List<(int, string)> source = [(1, "a"), (2, "b")];
110var clone = RoundTrip(source, """[{"Item1":1,"Item2":"a"},{"Item1":2,"Item2":"b"}]"""u8, JsonSerializer.FieldEnabled);
125List<Tuple<int, string>> source = [Tuple.Create(1, "a"), Tuple.Create(2, "b")];
126var clone = RoundTrip(source, """[{"Item1":1,"Item2":"a"},{"Item1":2,"Item2":"b"}]"""u8, JsonSerializer.Default);
Microsoft.Extensions.Caching.Memory (16)
Microsoft.Extensions.Compliance.Abstractions (11)
Microsoft.Extensions.Compliance.Testing (2)
Microsoft.Extensions.Configuration (24)
Microsoft.Extensions.Configuration.Binder (9)
Microsoft.Extensions.Configuration.KeyPerFile.Tests (5)
Microsoft.Extensions.Configuration.Xml (5)
Microsoft.Extensions.DataIngestion (19)
Microsoft.Extensions.DataIngestion.Tests (32)
Microsoft.Extensions.DependencyInjection (18)
Microsoft.Extensions.DependencyInjection.Abstractions (1)
Microsoft.Extensions.DependencyModel (43)
Microsoft.Extensions.Diagnostics (4)
Microsoft.Extensions.Diagnostics.ExceptionSummarization (1)
Microsoft.Extensions.Diagnostics.HealthChecks (5)
Microsoft.Extensions.Diagnostics.HealthChecks.Common (11)
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (1)
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (3)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (24)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (10)
Microsoft.Extensions.Diagnostics.Testing (7)
Microsoft.Extensions.Diagnostics.Testing.Tests (6)
Microsoft.Extensions.FileProviders.Composite (3)
Microsoft.Extensions.FileProviders.Embedded (6)
Microsoft.Extensions.FileSystemGlobbing (21)
Microsoft.Extensions.Hosting (21)
Microsoft.Extensions.Hosting.Testing.Tests (2)
Microsoft.Extensions.Http (4)
Microsoft.Extensions.Http.Diagnostics (17)
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (1)
Microsoft.Extensions.Http.Diagnostics.Tests (39)
Logging\HttpClientLoggerTest.cs (6)
132It.IsAny<List<KeyValuePair<string, string>>>(),
533It.IsAny<List<KeyValuePair<string, string>>>(),
535.Returns((LogRecord a, HttpRequestMessage b, List<KeyValuePair<string, string>> c, CancellationToken d) =>
542It.IsAny<List<KeyValuePair<string, string>>>(),
766var enrichers = new List<IHttpClientLogEnricher> { enricher1.Object, enricher2.Object };
984.Setup(r => r.ReadResponseAsync(It.IsAny<LogRecord>(), It.IsAny<HttpResponseMessage>(), It.IsAny<List<KeyValuePair<string, string>>?>(), It.IsAny<CancellationToken>()))
Logging\HttpHeadersReaderTest.cs (9)
28var buffer = new List<KeyValuePair<string, string>>();
66var buffer = new List<KeyValuePair<string, string>>();
82var requestBuffer = new List<KeyValuePair<string, string>>();
83var responseBuffer = new List<KeyValuePair<string, string>>();
149List<KeyValuePair<string, string>> expectedRequest = [new KeyValuePair<string, string>("Header1", "Value.1")];
150List<KeyValuePair<string, string>> expectedResponse = [new KeyValuePair<string, string>("Header3", "Value.3")];
160List<KeyValuePair<string, string>> requestBuffer = [];
164List<KeyValuePair<string, string>> responseBuffer = [];
175List<KeyValuePair<string, string>>? responseBuffer = null;
Logging\HttpRequestReaderTest.cs (18)
103var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
104var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
162var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
163var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
234var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
235var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
310var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
311var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
371var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
372var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
443var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
444var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
512var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
513var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
582var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
583var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
634var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
874var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
Microsoft.Extensions.Http.Polly.Tests (2)
Microsoft.Extensions.Http.Resilience (14)
Microsoft.Extensions.Http.Resilience.Tests (14)
Microsoft.Extensions.Identity.Core (16)
Microsoft.Extensions.Identity.Stores (1)
Microsoft.Extensions.Localization (1)
Microsoft.Extensions.Localization.Tests (1)
Microsoft.Extensions.Logging (16)
Logger.cs (10)
35List<Exception>? exceptions = null;
52static void LoggerLog(LogLevel logLevel, EventId eventId, ILogger logger, Exception? exception, Func<TState, Exception?, string> formatter, ref List<Exception>? exceptions, in TState state)
74List<Exception>? exceptions = null;
97static bool LoggerIsEnabled(LogLevel logLevel, ILogger logger, ref List<Exception>? exceptions)
131List<Exception>? exceptions = null;
155private static void ThrowLoggingError(List<Exception> exceptions)
172public List<LoggerProviderDebugView> Providers
176List<LoggerProviderDebugView> providers = new List<LoggerProviderDebugView>();
209public List<object?>? Scopes
219List<object?> scopes = new List<object?>();
Microsoft.Extensions.Logging.Abstractions (2)
Microsoft.Extensions.Logging.AzureAppServices (1)
Microsoft.Extensions.Logging.EventSource (1)
Microsoft.Extensions.Logging.Generators (12)
Microsoft.Extensions.ObjectPool.Microbenchmark (1)
Microsoft.Extensions.ObjectPool.Tests (20)
Microsoft.Extensions.Options (5)
Microsoft.Extensions.Options.Contextual (2)
Microsoft.Extensions.Options.Contextual.Tests (81)
ContextualOptionsFactoryTests.cs (81)
23var sut = new ContextualOptionsFactory<List<string>>(
24Enumerable.Empty<ILoadContextualOptions<List<string>>>(),
25Enumerable.Empty<IConfigureOptions<List<string>>>(),
26Enumerable.Empty<IPostConfigureOptions<List<string>>>(),
27Enumerable.Empty<IValidateOptions<List<string>>>());
29var result = await new ContextualOptions<List<string>, IOptionsContext>(sut).GetAsync(Mock.Of<IOptionsContext>(), default);
37var sut = new ContextualOptionsFactory<List<string>>(
38Enumerable.Empty<ILoadContextualOptions<List<string>>>(),
39Enumerable.Empty<IConfigureOptions<List<string>>>(),
40Enumerable.Empty<IPostConfigureOptions<List<string>>>(),
41new[] { new ValidateOptions<List<string>>(null, _ => false, "epic fail") });
50var sut = new ContextualOptionsFactory<List<string>>(
51Enumerable.Empty<ILoadContextualOptions<List<string>>>(),
52Enumerable.Empty<IConfigureOptions<List<string>>>(),
53Enumerable.Empty<IPostConfigureOptions<List<string>>>(),
54new[] { new ValidateOptions<List<string>>("Foo", _ => false, "epic fail") });
65new LoadContextualOptions<List<string>>(
67(context, _) => new ValueTask<IConfigureContextualOptions<List<string>>>(new ConfigureContextualOptions<List<string>>((_, list) => list.Add("configure"), context))),
70var sut = new ContextualOptionsFactory<List<string>>(
72Enumerable.Empty<IConfigureOptions<List<string>>>(),
73new[] { new PostConfigureOptions<List<string>>(string.Empty, (list) => list.Add("post configure")) },
74Enumerable.Empty<IValidateOptions<List<string>>>());
86new LoadContextualOptions<List<string>>(
88(context, _) => new ValueTask<IConfigureContextualOptions<List<string>>>(new ConfigureContextualOptions<List<string>>((_, list) => list.Add("configure"), context)))
91var sut = new ContextualOptions<List<string>, IOptionsContext>(new ContextualOptionsFactory<List<string>>(
93Enumerable.Empty<IConfigureOptions<List<string>>>(),
94Enumerable.Empty<IPostConfigureOptions<List<string>>>(),
95Enumerable.Empty<IValidateOptions<List<string>>>()));
106new LoadContextualOptions<List<string>>(
108(context, _) => new ValueTask<IConfigureContextualOptions<List<string>>>(new ConfigureContextualOptions<List<string>>((_, list) => list.Add("configure"), context))),
111var sut = new ContextualOptionsFactory<List<string>>(
113Enumerable.Empty<IConfigureOptions<List<string>>>(),
114Enumerable.Empty<IPostConfigureOptions<List<string>>>(),
115Enumerable.Empty<IValidateOptions<List<string>>>());
124var sut = new ContextualOptionsFactory<List<string>>(
125Enumerable.Empty<ILoadContextualOptions<List<string>>>(),
126Enumerable.Empty<IConfigureOptions<List<string>>>(),
127new[] { new PostConfigureOptions<List<string>>(null, (list) => list.Add("post configure")) },
128Enumerable.Empty<IValidateOptions<List<string>>>());
137var sut = new ContextualOptionsFactory<List<string>>(
138Enumerable.Empty<ILoadContextualOptions<List<string>>>(),
139Enumerable.Empty<IConfigureOptions<List<string>>>(),
140new[] { new PostConfigureOptions<List<string>>("Foo", (list) => list.Add("post configure")) },
141Enumerable.Empty<IValidateOptions<List<string>>>());
150var sut = new ContextualOptionsFactory<List<string>>(
151Enumerable.Empty<ILoadContextualOptions<List<string>>>(),
152new[] { new ConfigureOptions<List<string>>((list) => list.Add("pre configure")) },
153Enumerable.Empty<IPostConfigureOptions<List<string>>>(),
154Enumerable.Empty<IValidateOptions<List<string>>>());
170var loaders = new LoadContextualOptions<List<string>>[]
175return new ValueTask<IConfigureContextualOptions<List<string>>>(new ConfigureContextualOptions<List<string>>((_, list) => list.Add("1"), context));
180return new ConfigureContextualOptions<List<string>>((_, list) => list.Add("2"), context);
185return new ValueTask<IConfigureContextualOptions<List<string>>>(new ConfigureContextualOptions<List<string>>((_, list) => list.Add("3"), context));
190return new ValueTask<IConfigureContextualOptions<List<string>>>(new ConfigureContextualOptions<List<string>>((_, list) => list.Add("4"), context));
194var sut = new ContextualOptionsFactory<List<string>>(
196Enumerable.Empty<IConfigureOptions<List<string>>>(),
197Enumerable.Empty<IPostConfigureOptions<List<string>>>(),
198Enumerable.Empty<IValidateOptions<List<string>>>());
210var loaders = new LoadContextualOptions<List<string>>[]
212new(string.Empty, (context, _) => new ValueTask<IConfigureContextualOptions<List<string>>>(Mock.Of<IConfigureContextualOptions<List<string>>>(MockBehavior.Strict))),
216var sut = new ContextualOptionsFactory<List<string>>(
218Enumerable.Empty<IConfigureOptions<List<string>>>(),
219Enumerable.Empty<IPostConfigureOptions<List<string>>>(),
220Enumerable.Empty<IValidateOptions<List<string>>>());
233var disposeMock = new Mock<IConfigureContextualOptions<List<string>>>();
235var loaders = new LoadContextualOptions<List<string>>[]
237new(string.Empty, (context, _) => new ValueTask<IConfigureContextualOptions<List<string>>>(Mock.Of<IConfigureContextualOptions<List<string>>>(MockBehavior.Strict))),
238new(string.Empty, (context, _) => new ValueTask<IConfigureContextualOptions<List<string>>>(disposeMock.Object)),
241var sut = new ContextualOptionsFactory<List<string>>(
243Enumerable.Empty<IConfigureOptions<List<string>>>(),
244Enumerable.Empty<IPostConfigureOptions<List<string>>>(),
245Enumerable.Empty<IValidateOptions<List<string>>>());
Microsoft.Extensions.Options.DataAnnotations (4)
Microsoft.Extensions.Options.SourceGeneration (19)
Parser.cs (14)
48var results = new List<ValidatorType>();
70var modelTypes = GetModelTypes(validatorType);
78var modelsValidatorTypeValidates = new List<ValidatedModel>(modelTypes.Count);
105var membersToValidate = GetMembersToValidate(modelType, true, lowerLocationInCompilation, validatorType);
125var parents = new List<string>();
266private List<ValidatedMember> GetMembersToValidate(ITypeSymbol modelType, bool speculate, Location lowerLocationInCompilation, ITypeSymbol validatorType)
276var members = modelType.GetMembers().ToList();
292var membersToValidate = new List<ValidatedMember>();
341var validationAttrs = new List<ValidationAttributeInfo>();
554var membersToValidate = GetMembersToValidate(memberType, false, location, validatorType);
570var membersToValidate = GetMembersToValidate(enumeratedType, false, location, validatorType);
699var membersToValidate = GetMembersToValidate(mt, true, location, validatorType);
747private List<ITypeSymbol> GetModelTypes(ITypeSymbol validatorType)
749var result = new List<ITypeSymbol>();
Microsoft.Extensions.Primitives (2)
Microsoft.Extensions.Resilience.Tests (1)
Microsoft.Extensions.SecretManager.Tools.Tests (5)
Microsoft.Extensions.ServiceDiscovery (9)
Microsoft.Extensions.ServiceDiscovery.Abstractions (2)
Microsoft.Extensions.ServiceDiscovery.Dns (33)
Resolver\DnsResolver.cs (14)
70var results = new List<ServiceResult>(response.Answers.Count);
81List<AddressResult> addresses = new List<AddressResult>();
176List<AddressResult> results = new List<AddressResult>(response.Answers.Count);
240Dictionary<EncodedDomainName, List<AddressResult>> aRecordMap = new();
265if (!aRecordMap.TryGetValue(answer.Name, out List<AddressResult>? addressList))
298aRecordMap.TryGetValue(currentAlias, out List<AddressResult>? finalAddressList);
557if (!TryReadRecords(header.AnswerCount, ref ttl, ref responseReader, out List<DnsResourceRecord>? answers) ||
558!TryReadRecords(header.AuthorityCount, ref ttl, ref responseReader, out List<DnsResourceRecord>? authorities) ||
559!TryReadRecords(header.AdditionalRecordCount, ref ttl, ref responseReader, out List<DnsResourceRecord>? additionals))
584static bool TryReadRecords(int count, ref int ttl, ref DnsDataReader reader, out List<DnsResourceRecord> records)
606internal static bool GetNegativeCacheExpiration(DateTime createdAt, List<DnsResourceRecord> authorities, out DateTime expiration)
633internal static SendQueryError ValidateResponse(QueryResponseCode responseCode, DateTime createdAt, List<DnsResourceRecord> answers, List<DnsResourceRecord> authorities, ref DateTime expiration)
902List<ReadOnlyMemory<byte>> labels = new();
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (13)
Resolver\LoopbackDnsServer.cs (13)
144public List<(string, QueryType, QueryClass)> Questions { get; } = new List<(string, QueryType, QueryClass)>();
145public List<DnsResourceRecord> Answers { get; } = new List<DnsResourceRecord>();
146public List<DnsResourceRecord> Authorities { get; } = new List<DnsResourceRecord>();
147public List<DnsResourceRecord> Additionals { get; } = new List<DnsResourceRecord>();
228var encodedLabels = name.Split('.', StringSplitOptions.RemoveEmptyEntries).Select(label => (ReadOnlyMemory<byte>)Encoding.UTF8.GetBytes(s_idnMapping.GetAscii(label)))
234public static List<DnsResourceRecord> AddAddress(this List<DnsResourceRecord> records, string name, int ttl, IPAddress address)
241public static List<DnsResourceRecord> AddCname(this List<DnsResourceRecord> records, string name, int ttl, string alias)
253public static List<DnsResourceRecord> AddService(this List<DnsResourceRecord> records, string name, int ttl, ushort priority, ushort weight, ushort port, string target)
272public static List<DnsResourceRecord> AddStartOfAuthority(this List<DnsResourceRecord> records, string name, int ttl, string mname, string rname, uint serial, uint refresh, uint retry, uint expire, uint minimum)
Microsoft.Extensions.ServiceDiscovery.Tests (2)
Microsoft.Extensions.ServiceDiscovery.Yarp (5)
Microsoft.Extensions.Telemetry (29)
Microsoft.Extensions.Telemetry.Abstractions (12)
Microsoft.Extensions.Telemetry.Abstractions.Tests (1)
Microsoft.Extensions.Telemetry.Tests (27)
Microsoft.Extensions.TimeProvider.Testing.Tests (4)
Microsoft.Extensions.Validation (4)
Microsoft.Extensions.Validation.GeneratorTests (7)
Microsoft.Extensions.Validation.Tests (7)
Microsoft.Extensions.Validation.ValidationsGenerator (8)
Microsoft.Gen.BuildMetadata.Unit.Tests (9)
Microsoft.Gen.ComplianceReports (8)
Microsoft.Gen.ComplianceReports.Unit.Tests (7)
Microsoft.Gen.ContextualOptions (7)
Microsoft.Gen.ContextualOptions.Generated.Tests (1)
Microsoft.Gen.ContextualOptions.Unit.Tests (9)
Microsoft.Gen.Logging (24)
Parsing\Parser.LogProperties.cs (7)
54var props = GetTypePropertiesToLog(paramTypeSymbol, typesChain, symbols, transitive, ref foundDataClassificationAttributes);
83List<LoggingProperty>? GetTypePropertiesToLog(
90var result = new List<LoggingProperty>();
104var sensitivePropsFromCtor = new Dictionary<string, List<INamedTypeSymbol>>();
113var maybeDataClasses = GetDataClassificationAttributes(parameter, symbols);
172if (sensitivePropsFromCtor.TryGetValue(property.Name, out var dataClassesFromCtor))
279var props = GetTypePropertiesToLog(extractedType, typesChain, symbols, transitive, ref foundDataClassificationAttributes);
Microsoft.Gen.Logging.Generated.Tests (3)
Microsoft.Gen.Logging.Unit.Tests (9)
Microsoft.Gen.MetadataExtractor (20)
Microsoft.Gen.MetadataExtractor.Unit.Tests (7)
Microsoft.Gen.Metrics (17)
Microsoft.Gen.Metrics.Unit.Tests (8)
Microsoft.Gen.MetricsReports (12)
Microsoft.Gen.MetricsReports.Unit.Tests (7)
Microsoft.Interop.ComInterfaceGenerator (17)
Microsoft.Interop.JavaScript.JSImportGenerator (10)
Microsoft.Interop.LibraryImportGenerator (15)
Microsoft.Interop.LibraryImportGenerator.Downlevel (4)
Microsoft.Interop.SourceGeneration (20)
Microsoft.JSInterop (1)
Microsoft.JSInterop.Tests (3)
Microsoft.Maui (62)
Microsoft.Maui.Controls (236)
Shapes\GeometryHelper.cs (4)
27 var points = new List<Point>();
232 public static void FlattenCubicBezier(List<Point> points, Point ptStart, Point ptCtrl1, Point ptCtrl2, Point ptEnd, double tolerance)
255 public static void FlattenQuadraticBezier(List<Point> points, Point ptStart, Point ptCtrl, Point ptEnd, double tolerance)
277 public static void FlattenArc(List<Point> points, Point pt1, Point pt2, double radiusX, double radiusY, double angleRotation,
Shell\ShellUriHandler.cs (40)
25 var pages = ShellNavigationManager.BuildFlattenedNavigationStack(shell);
27 List<string> restOfPath = new List<string>();
44 List<string> buildUpPages = new List<string>();
149 var segments = new List<string>(RetrievePaths(pathAndQuery[0]));
185 var possibleRouteMatches = GenerateRoutePaths(shell, request, uri, enableRelativeShellRoutes);
222 internal static List<RouteRequestBuilder> GenerateRoutePaths(Shell shell, Uri request)
228 internal static List<RouteRequestBuilder> GenerateRoutePaths(Shell shell, Uri request, Uri originalRequest, bool enableRelativeShellRoutes)
235 List<RouteRequestBuilder> possibleRoutePaths = new List<RouteRequestBuilder>();
246 var segments = new List<string>(RetrievePaths(localPath));
262 var result = ProcessRelativeRoute(shell, routeKeys, segments, enableRelativeShellRoutes, originalRequest);
270 var bestMatches = GetBestMatches(possibleRoutePaths);
288 var globalRouteMatches =
345 static List<RouteRequestBuilder> ProcessRelativeRoute(
348 List<string> segments,
357 var pureRoutesMatch = new List<RouteRequestBuilder>();
358 var pureGlobalRoutesMatch = new List<RouteRequestBuilder>();
377 var matches = SearchForGlobalRoutes(segments, shell.CurrentState.FullLocation, currentLocation, routeKeys);
428 static List<RouteRequestBuilder> SearchForGlobalRoutes(
429 List<string> segments,
434 List<RouteRequestBuilder> pureGlobalRoutesMatch = new List<RouteRequestBuilder>();
437 var newSegments = CollapsePath(newPath, currentSegments, true);
438 List<string> fullRouteWithNewSegments = new List<string>(currentSegments);
457 var existingGlobalRoutes = routeRequestBuilder.GlobalRouteMatches.ToList();
463 var additionalRouteMatches = routeRequestBuilder.GlobalRouteMatches;
480 internal static List<string> CollapsePath(
486 internal static List<string> CollapsePath(
491 var localRouteStack = currentRouteStack.ToList();
502 var paths = myRoute.ToList();
535 var collapsedRoutes = CollapsePath(routeKey, possibleRoutePath.SegmentsMatched, true);
607 internal static void ExpandOutGlobalRoutes(List<RouteRequestBuilder> possibleRoutePaths, HashSet<string> routeKeys)
618 List<RouteRequestBuilder> pureGlobalRoutesMatch = new List<RouteRequestBuilder>();
640 internal static List<RouteRequestBuilder> GetBestMatches(List<RouteRequestBuilder> possibleRoutePaths)
642 List<RouteRequestBuilder> bestMatches = new List<RouteRequestBuilder>();
678 List<RouteRequestBuilder> betterMatches = new List<RouteRequestBuilder>();
783 List<string> paths = new List<string>();
856 List<string> segments,
857 List<RouteRequestBuilder> possibleRoutePaths,
1005 var segments = RetrievePaths(_path).ToList().Skip(1).ToList();
1033 var segments = RetrievePaths(_path).ToList().Skip(1).ToList();
Microsoft.Maui.Controls.BindingSourceGen (29)
Microsoft.Maui.Controls.Build.Tasks (22)
Microsoft.Maui.Controls.Foldable (2)
Microsoft.Maui.Controls.SourceGen (14)
Microsoft.Maui.Controls.Xaml (18)
Microsoft.Maui.Essentials (13)
Microsoft.Maui.Graphics (34)
PathF.cs (22)
12 private readonly List<float> _arcAngles;
13 private readonly List<bool> _arcClockwise;
14 private readonly List<PointF> _points;
15 private readonly List<PathOperation> _operations;
17 private readonly List<bool> _subPathsClosed;
22 private PathF(List<PointF> points, List<float> arcSizes, List<bool> arcClockwise, List<PathOperation> operations, int subPathCount)
939 public List<PathF> Separate()
941 var paths = new List<PathF>();
989 var points = new List<PointF>(_points);
992 var arcSizes = new List<float>(_arcAngles);
995 var arcClockwise = new List<bool>(_arcClockwise);
998 var operations = new List<PathOperation>(_operations);
1456 List<PointF> flattenedPoints = null;
1457 List<PointF> curvePoints = null;
1525 private void QuadToCubic(int pointIndex, List<PointF> curvePoints)
1540 private void FlattenCubicSegment(int index, double flatness, List<PointF> curvePoints, List<PointF> flattenedPoints)
1591 private Vector2 DeCasteljau(List<PointF> curvePoints, int index, float t)
1604 private Vector2 GetPointAsVector(List<PointF> curvePoints, int index)
Microsoft.Maui.Graphics.Skia (6)
Microsoft.Maui.Graphics.Text.Markdig (1)
Microsoft.Maui.Maps (2)
Microsoft.Maui.Resizetizer (10)
Microsoft.McpServer.ProjectTemplates.Tests (1)
Microsoft.ML.AutoML (72)
Microsoft.ML.AutoML.Interactive (4)
Microsoft.ML.AutoML.SourceGenerator (14)
Microsoft.ML.AutoML.Tests (13)
Microsoft.ML.CodeGenerator (40)
Microsoft.ML.CodeGenerator.Tests (7)
Microsoft.ML.Core (49)
Data\RoleMappedSchema.cs (6)
196private RoleMappedSchema(DataViewSchema schema, Dictionary<string, List<DataViewSchema.Column>> map)
201private static void Add(Dictionary<string, List<DataViewSchema.Column>> map, ColumnRole role, DataViewSchema.Column column)
206if (!map.TryGetValue(role.Value, out var list))
214private static Dictionary<string, List<DataViewSchema.Column>> MapFromNames(DataViewSchema schema, IEnumerable<KeyValuePair<ColumnRole, string>> roles, bool opt = false)
219var map = new Dictionary<string, List<DataViewSchema.Column>>();
311private static Dictionary<string, IReadOnlyList<DataViewSchema.Column>> Copy(Dictionary<string, List<DataViewSchema.Column>> map)
Microsoft.ML.Core.Tests (15)
Microsoft.ML.Data (322)
DataDebuggerPreview.cs (7)
19private static readonly FuncInstanceMethodInfo1<DataDebuggerPreview, DataViewRow, int, Action<RowInfo, List<object>>> _makeSetterMethodInfo
20= FuncInstanceMethodInfo1<DataDebuggerPreview, DataViewRow, int, Action<RowInfo, List<object>>>.Create(target => target.MakeSetter<int>);
39var rows = new List<RowInfo>();
40var columns = new List<object>[n];
46var setters = new Action<RowInfo, List<object>>[n];
68private Action<RowInfo, List<object>> MakeSetter<T>(DataViewRow row, int col)
72Action<RowInfo, List<object>> result = (rowInfo, list) =>
Evaluators\EvaluatorUtils.cs (19)
527var naIndices = new List<int>();
795var overallList = new List<IDataView>();
816var firstDvKeyWithNamesColumns = new List<string>();
818var firstDvVectorKeyColumns = new List<string>();
819var variableSizeVectorColumnNamesList = new List<string>();
820var list = new List<IDataView>();
824var hidden = new List<int>();
991private static List<string> GetMetricNames(IChannel ch, DataViewSchema schema, DataViewRow row, Func<int, bool> ignoreCol,
1003var metricNames = new List<string>();
1056var nonAveragedCols = new List<string>();
1060var idvList = new List<IDataView>() { avgMetrics };
1123List<string> metricNames;
1175private static void UpdateSums(int isWeightedCol, int stratCol, int stratVal, AggregatedMetric[] aggregated, bool hasStdev, List<string> metricNames, bool hasWeighted, bool hasStrats, int colCount, ValueGetter<double>[] getters, ValueGetter<VBuffer<double>>[] vBufferGetters, ref double metricVal, ref VBuffer<double> metricVals)
1215int numFolds, int stratCol, int stratVal, int isWeightedCol, int foldCol, bool hasStdev, List<string> nonAveragedCols = null)
1442var predictedLabelNames = GetPredictedLabelNames(in labelNames, labelIndexToConfIndexMap);
1448private static List<ReadOnlyMemory<char>> GetPredictedLabelNames(in VBuffer<ReadOnlyMemory<char>> labelNames, int[] labelIndexToConfIndexMap)
1450List<ReadOnlyMemory<char>> result = new List<ReadOnlyMemory<char>>();
1541private static string GetOverallMetricsAsString(double[] sumMetrics, double[] sumSqMetrics, int numFolds, bool weighted, bool average, List<string> metricNames)
1703var nonAveragedCols = new List<string>();
Microsoft.ML.DataView (4)
Microsoft.ML.Ensemble (22)
Microsoft.ML.EntryPoints (42)
FeatureCombiner.cs (9)
60var concatNames = new List<KeyValuePair<string, string>>();
61List<TypeConvertingEstimator.ColumnOptions> cvt;
63var ktv = ConvertFeatures(feats.ToArray(), featNames, concatNames, ch, out cvt, out errCount);
87private static IDataView ApplyKeyToVec(List<KeyToVectorMappingEstimator.ColumnOptions> ktv, IDataView viewTrain, IHost host)
142private static IDataView ApplyConvert(List<TypeConvertingEstimator.ColumnOptions> cvt, IDataView viewTrain, IHostEnvironment env)
152private static List<KeyToVectorMappingEstimator.ColumnOptions> ConvertFeatures(IEnumerable<DataViewSchema.Column> feats, HashSet<string> featNames, List<KeyValuePair<string, string>> concatNames, IChannel ch,
153out List<TypeConvertingEstimator.ColumnOptions> cvt, out int errCount)
159List<KeyToVectorMappingEstimator.ColumnOptions> ktv = null;
TrainTestMacro.cs (7)
119var subGraphNodes = EntryPointNode.ValidateNodes(env, subGraphRunContext, input.Nodes, label: input.LabelColumn,
159Dictionary<string, List<ParameterBinding>> inputBindingMap;
168inputBindingMap = new Dictionary<string, List<ParameterBinding>>();
191inputBindingMap = new Dictionary<string, List<ParameterBinding>>();
225inputBindingMap = new Dictionary<string, List<ParameterBinding>>();
248inputBindingMap = new Dictionary<string, List<ParameterBinding>>();
270inputBindingMap = new Dictionary<string, List<ParameterBinding>>();
Microsoft.ML.FastTree (118)
FastTree.cs (41)
75private protected List<Test> Tests;
1012var result = new List<KeyValuePair<int, int>>();
1023List<int> features, int[] binnedValues, int[] lastOn, ValuesList[] instanceList,
1108List<int> features, int[] binnedValues, int[] lastOn, bool categorical)
1287private static int AddColumnIfNeeded(DataViewSchema.Column? info, List<int> toTranspose)
1363var toTranspose = new List<int>();
1461List<FeatureFlockBase> flocks = new List<FeatureFlockBase>();
1480List<int> pending = new List<int>();
1691List<int> minSlots = new List<int>();
1692List<int> maxSlots = new List<int>();
1715List<ulong> qids = new List<ulong>();
1716List<int> boundaries = new List<int>();
1745private readonly List<short> _targetsList;
1746private readonly List<double> _actualTargets;
1747private readonly List<double> _weights;
1748private readonly List<int> _boundaries;
1914List<int> trivialFeatures = new List<int>();
1944private NHotFeatureFlock CreateNHotFlock(IChannel ch, List<int> features)
1956var delta = new List<byte>();
1957var values = new List<int>();
2090List<int> pending = new List<int>();
2192List<int> pending = new List<int>();
2375private List<double> _dense;
2377private List<KeyValuePair<int, double>> _sparse;
2657var sp = values._sparse;
3047var nodesTreeids = new List<long>();
3048var nodesIds = new List<long>();
3049var nodesFeatureIds = new List<long>();
3050var nodeModes = new List<string>();
3051var nodesValues = new List<double>();
3052var nodeHitrates = new List<long>();
3053var missingValueTracksTrue = new List<bool>();
3054var nodesTrueNodeIds = new List<long>();
3055var nodesFalseNodeIds = new List<long>();
3056var nodesBaseValues = new List<float>();
3059var classTreeIds = new List<long>();
3060var classNodeIds = new List<long>();
3061var classIds = new List<long>();
3062var classWeights = new List<double>();
3167List<KeyValuePair<string, object>> results = new List<KeyValuePair<string, object>>();
3272internal int GetLeaf(int treeId, in VBuffer<float> features, ref List<int> path)
Microsoft.ML.GenAI.Core (6)
Microsoft.ML.GenAI.Core.Tests (3)
Microsoft.ML.GenAI.LLaMA (4)
Microsoft.ML.GenAI.LLaMA.Tests (1)
Microsoft.ML.GenAI.Mistral (5)
Microsoft.ML.GenAI.Mistral.Tests (2)
Microsoft.ML.GenAI.Phi (4)
Microsoft.ML.GenAI.Samples (2)
Microsoft.ML.IntegrationTests (2)
Microsoft.ML.InternalCodeAnalyzer (1)
Microsoft.ML.KMeansClustering (1)
Microsoft.ML.LightGbm (15)
Microsoft.ML.Maml (5)
Microsoft.ML.Mkl.Components (2)
Microsoft.ML.OneDal (2)
Microsoft.ML.OnnxConverter (24)
OnnxUtils.cs (17)
22List<long> dims, List<bool> dimsParam)
51List<long> dims, List<bool> dimsParam)
275public readonly List<long> Dims;
276public readonly List<bool> DimParams;
278public ModelArgs(string name, TensorProto.Types.DataType dataType, List<long> dims, List<bool> dimParams)
287public static ModelProto MakeModel(List<NodeProto> nodes, string producerName, string name,
288string domain, string producerVersion, long modelVersion, int opSetVersion, List<ModelArgs> inputs,
289List<ModelArgs> outputs, List<ModelArgs> intermediateValues, List<TensorProto> initializers)
340List<long> dims = null, List<bool> dimsParams = null)
353List<long> dimsLocal = null;
354List<bool> dimsParamLocal = null;
Microsoft.ML.OnnxTransformer (34)
Microsoft.ML.OnnxTransformerTest (12)
Microsoft.ML.Parquet (14)
PartitionedPathParser.cs (8)
285if (!TryParseNames(path, out List<string> names))
306if (!TryParseValues(path, out List<string> values))
319public bool TryParseNames(string path, out List<string> names)
321return TryParseNamesAndValues(path, out names, out List<string> values);
324public bool TryParseValues(string path, out List<string> values)
326return TryParseNamesAndValues(path, out List<string> names, out values);
329public bool TryParseNamesAndValues(string path, out List<string> names, out List<string> values)
Microsoft.ML.PerformanceTests (5)
Microsoft.ML.Predictor.Tests (15)
Microsoft.ML.Recommender (3)
Microsoft.ML.ResultProcessor (29)
ResultProcessor.cs (29)
35public List<ExperimentItemResult> PredictorList;
291public List<string> GetSettings()
293List<string> settings = new List<string>();
380private static bool ValidateMamlOutput(string filename, string[] rawLines, out List<string> lines)
401List<string> lines;
422List<string> fileTimeMemoryResults;
423List<string> fileResults;
566List<string> lines;
573List<string> fileTimeMemoryResults;
574List<string> fileResults;
595private static ExperimentItemResult? GetMetrics(string filename, ResultProcessorArguments cmd, List<string> lines, List<string> fileTimeMemoryResults, List<string> fileResults)
698List<string> lines;
702List<string> fileTimeMemoryResults;
703List<string> fileResults;
710private static bool TryParseFileToLines(string filename, out List<string> lines, string[] rawLines = null)
733private static bool TryParseMamlCommand(List<string> lines, out string commandline)
749private static bool TryParseLines(List<string> lines, ResultProcessorArguments cmd, out List<string> fileResults, out List<string> fileTimeMemoryResult)
788private static Dictionary<string, ResultMetric> ParseResultLines(List<string> fileResults, ResultProcessorArguments cmd, out Double metricValue, string metricName)
847List<ExperimentItemResult?> results = new List<ExperimentItemResult?>();
862public static PredictorResult GetPredictorObject(List<PredictorResult> tempPredictorList, string learnerName, out bool newLearner)
908var foldLines = new List<string>(lines.Where((s, i1) => i1 >= startLineIdx && i1 < endLineIdx));
928List<int> allFoldIndices = new List<int>(foldResults.Keys);
1040List<PredictorResult> predictorResultsList = new List<PredictorResult>();
1060List<string> m = new List<string>();
1067List<KeyValuePair<string, string>> srcFiles = new List<KeyValuePair<string, string>>();
Microsoft.ML.Samples (171)
Microsoft.ML.Samples.OneDal (3)
Microsoft.ML.SamplesUtils (6)
Microsoft.ML.SearchSpace (3)
Microsoft.ML.StandardTrainers (27)
Microsoft.ML.Sweeper (31)
Microsoft.ML.Sweeper.Tests (10)
Microsoft.ML.TensorFlow (1)
Microsoft.ML.TensorFlow.Tests (8)
Microsoft.ML.TestFramework (15)
Microsoft.ML.TestFrameworkCommon (2)
Microsoft.ML.Tests (141)
ImagesTests.cs (4)
233var images = new List<ImageDataPoint>() { new ImageDataPoint(10, 10, red: 0, green: 0, blue: 255), new ImageDataPoint(10, 10, red: 255, green: 0, blue: 0) };
1126public static List<InMemoryImage> LoadFromTsv(MLContext mlContext, string tsvPath, string imageFolder)
1128var inMemoryImages = new List<InMemoryImage>();
1180var dataObjects = InMemoryImage.LoadFromTsv(mlContext, dataFile, imageFolder);
TrainerEstimators\TreeEstimators.cs (8)
438private void LightGbmHelper(bool useSoftmax, double sigmoid, out string modelString, out List<GbmExample> mlnetPredictions, out double[] lgbmRawScores, out double[] lgbmProbabilities, bool unbalancedSets = false)
446var dataList = new List<GbmExample>();
554LightGbmHelper(useSoftmax: false, sigmoid: sigmoidScale, out string modelString, out List<GbmExample> mlnetPredictions, out double[] nativeResult1, out double[] nativeResult0);
589LightGbmHelper(useSoftmax: false, sigmoid: sigmoidScale, out string modelString, out List<GbmExample> mlnetPredictions, out double[] nativeResult1, out double[] nativeResult0);
628LightGbmHelper(useSoftmax: false, sigmoid: firstSigmoidScale, out string firstModelString, out List<GbmExample> firstMlnetPredictions, out double[] firstNativeResult1, out double[] firstNativeResult0);
629LightGbmHelper(useSoftmax: false, sigmoid: secondSigmoidScale, out string secondModelString, out List<GbmExample> secondMlnetPredictions, out double[] secondNativeResult1, out double[] secondNativeResult0);
661LightGbmHelper(useSoftmax: true, sigmoid: .5, out string modelString, out List<GbmExample> mlnetPredictions, out double[] nativeResult1, out double[] nativeResult0);
690LightGbmHelper(useSoftmax: true, sigmoid: .5, out string modelString, out List<GbmExample> mlnetPredictions, out double[] nativeResult1, out double[] nativeResult0, unbalancedSets: true);
Transformers\ValueMappingTests.cs (22)
55var keys = new List<string>() { "foo", "bar", "test", "wahoo" };
56var values = new List<int>() { 1, 2, 3, 4 };
93var keys = new List<ReadOnlyMemory<char>>() { "foo".AsMemory(), "bar".AsMemory(), "test".AsMemory(), "wahoo".AsMemory() };
94var values = new List<int>() { 1, 2, 3, 4 };
139var keyValuePairs = new List<KeyValuePair<string, string>>() {
175List<int[]> values = new List<int[]>() {
264List<string[]> values = new List<string[]>() {
307var keys = new List<string>() { "foo", "bar", "test", "wahoo" };
308var values = new List<int>() { 1, 2, 3, 4 };
345var keys = new List<string>() { "foo", "foo" };
346var values = new List<int>() { 1, 2 };
364var keyValuePairs = new List<KeyValuePair<string, int>>() {
396var keyValuePairs = new List<KeyValuePair<string, string>>() {
430var keyValuePairs = new List<KeyValuePair<string, uint>>() {
471var keyValuePairs = new List<KeyValuePair<string, ulong>>() {
512var keyValuePairs = new List<KeyValuePair<string, string>>() {
552var keyValuePairs = new List<KeyValuePair<string, string>>() {
594var keyValuePairs = new List<KeyValuePair<string, int>>() {
613var keyValuePairs = new List<KeyValuePair<string, int[]>>() {
633var keyValuePairs = new List<KeyValuePair<ReadOnlyMemory<char>, int>>() {
687var keyValuePairs = new List<KeyValuePair<string, int>>() {
784var features = ML.Data.CreateEnumerable<TransformedData>(transformedData, reuseRowObject: false).ToList();
Microsoft.ML.TimeSeries (93)
RootCauseAnalyzer.cs (28)
21private readonly List<RootCause> _preparedCauses;
36public List<RootCause> AnalyzePossibleCauses()
45private List<RootCause> AnalyzeOneLayer(RootCauseLocalizationInput src)
69protected List<TimeSeriesPoint> GetTotalPointsForAnomalyTimestamp(RootCauseLocalizationInput src)
101List<TimeSeriesPoint> totalPoints = GetTotalPointsForAnomalyTimestamp(src);
128protected Dictionary<string, Object> GetSubDim(Dictionary<string, Object> dimension, List<string> keyList)
133private void LocalizeRootCausesByDimension(PointTree anomalyTree, PointTree pointTree, Dictionary<string, Object> anomalyDimension, List<string> aggDims)
158List<TimeSeriesPoint> children = null;
200protected List<TimeSeriesPoint> GetTopAnomaly(List<TimeSeriesPoint> anomalyPoints, TimeSeriesPoint root, List<TimeSeriesPoint> totalPoints, string dimKey, bool isLeaveslevel = false)
222List<TimeSeriesPoint> causeList = new List<TimeSeriesPoint>();
247protected IEnumerable<BestDimension> SelectOrderedDimension(List<TimeSeriesPoint> totalPoints, List<TimeSeriesPoint> anomalyPoints, List<string> aggDim)
290private IEnumerable<BestDimension> SelectOrderedDimensions(Dictionary<string, List<TimeSeriesPoint>> pointChildren, Dictionary<string, List<TimeSeriesPoint>> anomalyChildren, List<string> aggDim)
356List<RootCauseScore> scoreList = new List<RootCauseScore>();
442private void BuildTree(PointTree tree, List<string> aggDims, TimeSeriesPoint point, Object aggSymbol)
480List<KeyValuePair<BestDimension, double>> valueMapAsList = valueMap.ToList();
481List<BestDimension> ordered = new List<BestDimension>();
706private void UpdateDistribution(Dictionary<string, int> distribution, List<TimeSeriesPoint> points, string dimKey)
743internal List<string> DetailDims { get; set; }
744internal List<string> AggDims { get; set; }
756internal Dictionary<string, List<TimeSeriesPoint>> ChildrenNodes;
757internal List<TimeSeriesPoint> Leaves;
762ChildrenNodes = new Dictionary<string, List<TimeSeriesPoint>>();
RootCauseLocalizationType.cs (8)
16public List<RootCauseItem> Items { get; set; }
49public List<MetricSlice> Slices { get; set; }
61public RootCauseLocalizationInput(DateTime anomalyTimestamp, Dictionary<string, Object> anomalyDimension, List<MetricSlice> slices, AggregateType aggregateType, Object aggregateSymbol)
70public RootCauseLocalizationInput(DateTime anomalyTimestamp, Dictionary<string, Object> anomalyDimension, List<MetricSlice> slices, Object aggregateSymbol)
131public List<string> Path;
147public RootCauseItem(Dictionary<string, Object> rootCause, List<string> path)
178public List<TimeSeriesPoint> Points { get; set; }
180public MetricSlice(DateTime timeStamp, List<TimeSeriesPoint> points)
Microsoft.ML.TimeSeries.Tests (49)
TimeSeriesDirectApi.cs (26)
112List<Data> data = new List<Data>(size);
134List<double> expectedValues = new List<double>() { 0, 5, 0.5, 5.1200000000000114E-08, 0, 5, 0.4999999995, 5.1200000046080209E-08, 0, 5, 0.4999999995, 5.1200000092160303E-08,
157List<Data> data = new List<Data>();
187List<double> expectedValues = new List<double>() { 0, -3.31410551071167, 0.5, 5.12000000000001E-08, 0, 1.570083498954773, 5.2001145245395008E-07,
213List<Data> data = new List<Data>();
289List<Data> data = new List<Data>();
359List<Data> data = new List<Data>();
394List<float> expectedForecast = new List<float>() { 0.191492021f, 2.53994060f, 5.26454258f, 7.37313938f };
395List<float> minCnf = new List<float>() { -3.9741986f, -2.36872721f, 0.09407699f, 2.18899393f };
396List<float> maxCnf = new List<float>() { 4.3571825f, 7.4486084f, 10.435008f, 12.5572853f };
422List<Data> data = new List<Data>();
546var data = new List<TimeSeriesData>();
590List<TimeSeriesDataDouble> data;
680List<TimeSeriesDataDouble> data;
727List<TimeSeriesDataDouble> data;
782List<TimeSeriesDataDouble> data;
841List<TimeSeriesDataDouble> data;
898List<TimeSeriesDataDouble> data;
988List<RootCause> preparedCauses = ml.AnomalyDetection.LocalizeRootCauses(rootCauseLocalizationInput);
1031List<MetricSlice> slice = new List<MetricSlice>
1083private static List<TimeSeriesPoint> GetRootCauseLocalizationPoints(object aggSymbol)
1085List<TimeSeriesPoint> points = new List<TimeSeriesPoint>();
1181List<MetricSlice> slice = new List<MetricSlice>
1215List<MetricSlice> slice = new List<MetricSlice>
1227private static List<TimeSeriesPoint> GetRootCauseLocalizationPointsForIntDimValue()
1229List<TimeSeriesPoint> points = new List<TimeSeriesPoint>();
TimeSeriesSimpleApiTests.cs (8)
43var data = new List<Data>(size);
62List<double> expectedValues = new List<double>() { 0, 5, 0.5, 5.1200000000000114E-08, 0, 5, 0.4999999995, 5.1200000046080209E-08, 0, 5, 0.4999999995, 5.1200000092160303E-08,
85var data = new List<Data>();
105List<double> expectedValues = new List<double>() { 0, -3.31410598754883, 0.5, 5.12000000000001E-08, 0, 1.5700820684432983, 5.2001145245395008E-07,
128List<Data> data = new List<Data>(size);
145var expectedValues = new List<double[]>() {
180List<Data> data = new List<Data>(size);
197var expectedValues = new List<double[]>() {
Microsoft.ML.Tokenizers (77)
Model\BPETokenizer.cs (5)
454List<EncodedToken> tokens = new();
513List<int> ids = new();
1305internal void WordToTokens(ref Word word, List<EncodedToken> tokens, int offset, ReadOnlySpan<int> mapping) => word.ToTokens(VocabReverse, tokens, offset, mapping);
1307internal void EncodeWithCache(ReadOnlySpan<char> text, List<EncodedToken> tokens, int offset, ref PriorityQueue<Merge>? priorityQueue)
1416private int EncodeToIdsWithCache(ReadOnlySpan<char> text, List<int>? accumulatedIds, int maxTokens, out int charsConsumed, ref PriorityQueue<Merge>? priorityQueue)
Model\CodeGenTokenizer.cs (16)
34private readonly StringSpanOrdinalKeyCache<List<EncodedToken>> _cache;
130_cache = new StringSpanOrdinalKeyCache<List<EncodedToken>>();
379List<EncodedToken> tokens = new();
425private void EncodeInternal(string? text, scoped ReadOnlySpan<char> textSpan, List<EncodedToken> tokens, bool addPrefixSpace, int offset, PriorityQueue<SymbolPair> agenda)
439if (_cache.TryGetValue(textSpan, out List<EncodedToken>? hit))
464List<EncodedToken> result = EncodeToTokens(token.Slice(0, encodedLength), mapping.Slice(0, encodedLength), textSpan, agenda);
618List<int> ids = new();
1013private int EncodeToIdsResult(List<EncodedToken> tokens, IList<int>? accumulatedIds, int maxTokens, int fullTextLength, out int charsConsumed)
1069private int EncodeToIdsFromEndResult(List<EncodedToken> tokens, IList<int>? accumulatedIds, int maxTokens, int fullTextLength, out int textIndex)
1123if (_cache.TryGetValue(textSpan, out List<EncodedToken>? hit))
1147List<EncodedToken> result = EncodeToTokens(token.Slice(0, encodedLength), mapping.Slice(0, encodedLength), textSpan, agenda);
1187if (_cache.TryGetValue(textSpan, out List<EncodedToken>? hit))
1211List<EncodedToken> result = EncodeToTokens(token.Slice(0, encodedLength), mapping.Slice(0, encodedLength), textSpan, agenda);
1571private static void AppendTokenWithOffsetAdjusting(IReadOnlyList<EncodedToken> tokensToAdd, List<EncodedToken> tokens, int offset, bool addPrefixSpace)
1598private List<EncodedToken> EncodeToTokens(Span<char> text, Span<int> mapping, ReadOnlySpan<char> originalText, PriorityQueue<SymbolPair> agenda)
1659List<EncodedToken> result = new List<EncodedToken>(text.Length);
Model\EnglishRobertaTokenizer.cs (22)
27private readonly StringSpanOrdinalKeyCache<List<EncodedToken>> _cache;
169_cache = new StringSpanOrdinalKeyCache<List<EncodedToken>>();
334List<EncodedToken> tokens = new();
386if (_cache.TryGetValue(text, out List<EncodedToken>? hit))
393List<EncodedToken> result = EncodeToTokens(token.AsSpan().Slice(0, newTokenIndex), indexMapping);
433List<int> ids = new();
588private int EncodeToIdsResult(List<EncodedToken> tokens, IList<int>? accumulatedIds, int maxTokens, int fullTextLength, out int charsConsumed)
625private int EncodeToIdsFromEndResult(List<EncodedToken> tokens, IList<int>? accumulatedIds, int maxTokens, int fullTextLength, out int textIndex)
670if (_cache.TryGetValue(text, out List<EncodedToken>? hit))
699List<EncodedToken> result = EncodeToTokens(token.AsSpan().Slice(0, newTokenIndex), indexMapping);
715if (_cache.TryGetValue(text, out List<EncodedToken>? hit))
744List<EncodedToken> result = EncodeToTokens(token.AsSpan().Slice(0, newTokenIndex), indexMapping);
836List<int> list = new List<int>(ids.Count);
858List<int> list = new List<int>(ids.Count);
880List<int> list = new List<int>(ranks.Count);
921List<EncodedToken> list = new List<EncodedToken>(tokens.Count);
948private List<EncodedToken> EncodeToTokens(Span<char> token, Span<int> indexMapping)
964List<string> word = new(token.Length);
975var newWord = new List<string>();
1036List<string> temp = word;
1045var tokens = new List<EncodedToken>(word.Count);
1106private readonly List<(int Id, int OccurrenceScore)> _symbols;
Model\SentencePieceUnigramModel.cs (10)
109List<EncodedToken> tokens = new();
212List<EncodedToken> tokens,
264List<EncodedToken> tokens,
330List<EncodedToken> tokens,
412private void FallbackToByteEncoding(ReadOnlySpan<char> normalizationSpan, List<EncodedToken> tokens, int insertionStartPosition)
570List<int>? ids = new();
635List<int> ids,
707List<int> ids,
726private void FallbackToByteEncoding(List<int> ids, ReadOnlySpan<byte> normalizationSpan, (int IdsIndex, int Utf8Index, int Utf8Length)[] unknownTokensTracking, int unknownTokensCount)
763List<int> ids,
Microsoft.ML.Tokenizers.Data.Tests (2)
Microsoft.ML.Tokenizers.Tests (22)
Microsoft.ML.TorchSharp (119)
AutoFormerV2\BasicLayer.cs (2)
69List<int> hSlicesStartAndEnd = new List<int>() { 0, hp - this.windowSize, hp - this.windowSize, hp - this.shiftSize, hp - this.shiftSize, hp };
70List<int> wSlicesStartAndEnd = new List<int>() { 0, wp - this.windowSize, wp - this.windowSize, wp - this.shiftSize, wp - this.shiftSize, wp };
AutoFormerV2\ObjectDetectionMetrics.cs (35)
60private static List<List<ObjectLabel>> ThresholdFilter(List<List<ObjectLabel>> objectLabelListIn, float scoreThreshold)
64List<List<ObjectLabel>> objectLabelListOut = new();
92var labels = labelSet.ToList();
94var expectedData = ActualIdvToObjLabl(dataView, labelCol, actualBoundingBoxColumn);
95var actualData = PredIdvToObjLabl(dataView, predictedLabelCol, predictedBoundingBoxColumn, scoreCol);
99Dictionary<string, List<Tuple<float, float>>> iouDic = new();
118private static float AP50(Dictionary<string, List<Tuple<float, float>>> iouDic, Dictionary<string, int> groundTruthBoxes, float threshold = 0.5f)
136private static float AP50_95(Dictionary<string, List<Tuple<float, float>>> iouDic, Dictionary<string, int> groundTruthBoxes)
179private static void ImageIoU(List<ObjectLabel> objectLabel, List<ObjectLabel> annotation, Dictionary<string, List<Tuple<float, float>>> iouDic, Dictionary<string, int> groundTruthBoxes)
182List<Tuple<int, int, float>> tupleList = new(); // annotaIndex, detectIndex, iouScore
230private static void GenerateIOUDic(List<List<ObjectLabel>> annotations, List<List<ObjectLabel>> objectLabelList, Dictionary<string, List<Tuple<float, float>>> iouDic, Dictionary<string, int> groundTruthBoxes)
235var objectLabels = objectLabelList?[annoIndex];
236var annotation = annotations[annoIndex];
241foreach (var detectionList in iouDic.Values)
247private static float LabelAP(List<Tuple<float, float>> detectionList, int groundTruthBoxesNum, float threshold = 0.5f)
293private static List<List<ObjectLabel>> PredIdvToObjLabl(
299var data = new List<List<ObjectLabel>>();
316var l = new List<ObjectLabel>();
339private static List<List<ObjectLabel>> ActualIdvToObjLabl(
344var data = new List<List<ObjectLabel>>();
358var l = new List<ObjectLabel>();
Microsoft.ML.TorchSharp.Tests (2)
Microsoft.ML.Transforms (123)
Microsoft.ML.Vision (4)
Microsoft.Net.Http.Headers (6)
Microsoft.Net.Http.Headers.Tests (29)
Microsoft.NET.StringTools (5)
Microsoft.NET.StringTools.net35 (1)
Microsoft.Private.Windows.Core (64)
System\Private\Windows\Nrbf\CoreNrbfSerializer.cs (32)
57{ Types.ToTypeName($"{Types.ListName}[[{Types.BooleanType}]]"), typeof(List<bool>) },
58{ Types.ToTypeName($"{Types.ListName}[[{Types.CharType}]]"), typeof(List<char>) },
59{ Types.ToTypeName($"{Types.ListName}[[{Types.StringType}]]"), typeof(List<string>) },
60{ Types.ToTypeName($"{Types.ListName}[[{Types.SByteType}]]"), typeof(List<sbyte>) },
61{ Types.ToTypeName($"{Types.ListName}[[{Types.ByteType}]]"), typeof(List<byte>) },
62{ Types.ToTypeName($"{Types.ListName}[[{Types.Int16Type}]]"), typeof(List<short>) },
63{ Types.ToTypeName($"{Types.ListName}[[{Types.UInt16Type}]]"), typeof(List<ushort>) },
64{ Types.ToTypeName($"{Types.ListName}[[{Types.Int32Type}]]"), typeof(List<int>) },
65{ Types.ToTypeName($"{Types.ListName}[[{Types.UInt32Type}]]"), typeof(List<uint>) },
66{ Types.ToTypeName($"{Types.ListName}[[{Types.Int64Type}]]"), typeof(List<long>) },
67{ Types.ToTypeName($"{Types.ListName}[[{Types.UInt64Type}]]"), typeof(List<ulong>) },
68{ Types.ToTypeName($"{Types.ListName}[[{Types.SingleType}]]"), typeof(List<float>) },
69{ Types.ToTypeName($"{Types.ListName}[[{Types.DoubleType}]]"), typeof(List<double>) },
70{ Types.ToTypeName($"{Types.ListName}[[{Types.DecimalType}]]"), typeof(List<decimal>) },
71{ Types.ToTypeName($"{Types.ListName}[[{Types.DateTimeType}]]"), typeof(List<DateTime>) },
72{ Types.ToTypeName($"{Types.ListName}[[{Types.TimeSpanType}]]"), typeof(List<TimeSpan>) },
124|| type == typeof(List<byte>)
125|| type == typeof(List<sbyte>)
126|| type == typeof(List<short>)
127|| type == typeof(List<ushort>)
128|| type == typeof(List<int>)
129|| type == typeof(List<uint>)
130|| type == typeof(List<long>)
131|| type == typeof(List<ulong>)
132|| type == typeof(List<float>)
133|| type == typeof(List<double>)
134|| type == typeof(List<char>)
135|| type == typeof(List<bool>)
136|| type == typeof(List<string>)
137|| type == typeof(List<decimal>)
138|| type == typeof(List<DateTime>)
139|| type == typeof(List<TimeSpan>)
Microsoft.Private.Windows.Polyfills.Tests (2)
Microsoft.VisualBasic.Core (59)
Microsoft\VisualBasic\CompilerServices\OverloadResolution.vb (26)
488ByVal candidates As List(Of Method),
723ByVal baseReference As Container) As List(Of Method)
735Dim candidates As List(Of Method) = New List(Of Method)(members.Length)
930ByVal errors As List(Of String),
1237ByVal errors As List(Of String),
1307ByVal errors As List(Of String)) As Boolean
1414ByVal errors As List(Of String)) As Boolean
1669ByVal errors As List(Of String)) As Boolean
1851ByVal errors As List(Of String)) As Boolean
2056ByVal candidates As List(Of Method),
2307ByVal candidates As List(Of Method),
2368ByVal candidates As List(Of Method),
2456ByVal errors As List(Of String),
2472ByVal errors As List(Of String),
2486ByVal errors As List(Of String),
2497Private Shared Sub ReportError(ByVal errors As List(Of String), ByVal resourceID As String)
2508ByVal errors As List(Of String)) As Boolean
2514ByVal candidates As List(Of Method),
2587ByVal errors As List(Of String)) As Boolean
2605ByVal candidates As List(Of Method),
2629ByVal errors As List(Of String)) As Boolean
2647ByVal candidates As List(Of Method),
2670ByVal errors As List(Of String)) As Boolean
2682ByVal candidates As List(Of Method),
2700ByVal candidates As List(Of Method),
2821Dim candidates As List(Of Method) =
Microsoft.VisualBasic.Tests (6)
Microsoft.VisualStudio.Extensibility.Testing.Xunit (2)
Microsoft.VisualStudio.LanguageServices (138)
FindReferences\Contexts\AbstractTableDataSourceFindUsagesContext.cs (13)
93protected readonly List<DefinitionItem> Definitions = [];
113protected readonly (List<Entry> primary, List<Entry> nonPrimary) EntriesWhenNotGroupingByDefinition = ([], []);
114protected readonly (List<Entry> primary, List<Entry> nonPrimary) EntriesWhenGroupingByDefinition = ([], []);
186protected static void Add<T>((List<T> primary, List<T> nonPrimary) entries, T item, bool isPrimary)
188var list = isPrimary ? entries.primary : entries.nonPrimary;
192protected static void AddRange<T>((List<T> primary, List<T> nonPrimary) entries, ArrayBuilder<T> builder, bool isPrimary)
194var list = isPrimary ? entries.primary : entries.nonPrimary;
609private static ImmutableArray<Entry> ToImmutableArray((List<Entry> primary, List<Entry> nonPrimary) entries)
Venus\ContainedDocument.cs (33)
238var editorVisibleSpansInOriginal = SharedPools.Default<List<TextSpan>>().AllocateAndClear();
245var newChanges = FilterTextChanges(originalText, editorVisibleSpansInOriginal, changes).ToList();
257SharedPools.Default<List<TextSpan>>().ClearAndFree(editorVisibleSpansInOriginal);
261private IEnumerable<TextChange> FilterTextChanges(SourceText originalText, List<TextSpan> editorVisibleSpansInOriginal, IEnumerable<TextChange> changes)
270using var pooledObject = SharedPools.Default<List<TextChange>>().GetPooledObject();
272var changeQueue = pooledObject.Object;
312var subChanges = GetSubTextChanges(originalText, change, visibleSpan).ToList();
350using var changes = SharedPools.Default<List<TextChange>>().GetPooledObject();
365SourceText originalText, TextSpan visibleSpanInOriginalText, string leftText, string rightText, int offsetInOriginalText, List<TextChange> changes)
368using var leftPool = SharedPools.Default<List<TextSpan>>().GetPooledObject();
369using var rightPool = SharedPools.Default<List<TextSpan>>().GetPooledObject();
371var spansInLeftText = leftPool.Object;
372var spansInRightText = rightPool.Object;
402using var leftPool = SharedPools.Default<List<ValueTuple<int, int>>>().GetPooledObject();
403using var rightPool = SharedPools.Default<List<ValueTuple<int, int>>>().GetPooledObject();
405var leftReplacementMap = leftPool.Object;
406var rightReplacementMap = rightPool.Object;
424private static bool TryGetWhitespaceOnlyChanges(string leftText, string rightText, List<TextSpan> spansInLeftText, List<TextSpan> spansInRightText)
427private static bool TryGetWhitespaceGroup(string text, List<TextSpan> groups)
612List<ValueTuple<int, int>> leftReplacementMap, List<ValueTuple<int, int>> rightReplacementMap,
642private static string GetTextWithReplacementMap(string text, string returnReplacement, string newLineReplacement, List<ValueTuple<int, int>> replacementMap)
673private static Span AdjustSpan(Span span, List<ValueTuple<int, int>> replacementMap)
775using var pooledObject = SharedPools.Default<List<TextSpan>>().GetPooledObject();
777var spans = pooledObject.Object;
798using var rulePool = SharedPools.Default<List<AbstractFormattingRule>>().GetPooledObject();
799using var spanPool = SharedPools.Default<List<TextSpan>>().GetPooledObject();
801var venusFormattingRules = rulePool.Object;
802var visibleSpans = spanPool.Object;
824public BaseIndentationFormattingRule GetBaseIndentationRule(SyntaxNode root, SourceText text, List<TextSpan> spans, int spanIndex)
872private static void GetVisibleAndTextSpan(SourceText text, List<TextSpan> spans, int spanIndex, out TextSpan visibleSpan, out TextSpan visibleTextSpan)
Microsoft.VisualStudio.LanguageServices.CodeLens (2)
Microsoft.VisualStudio.LanguageServices.CSharp (21)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (10)
Microsoft.VisualStudio.LanguageServices.DevKit (3)
Microsoft.VisualStudio.LanguageServices.Implementation (38)
Microsoft.VisualStudio.LanguageServices.LiveShare (1)
Microsoft.VisualStudio.LanguageServices.Xaml (1)
MilvusPlayground.ApiService (4)
MinimalValidationSample (1)
MSBuild (56)
XMake.cs (27)
696List<DistributedLoggerRecord> distributedLoggerRecords = null;
1276private static readonly List<BuildManager.DeferredBuildMessage> s_globalMessagesToLogInBuildLoggers = new();
1341List<ForwardingLoggerRecord> remoteLoggerRecords = new List<ForwardingLoggerRecord>();
1566List<BuildManager.DeferredBuildMessage> messagesToLogInBuildLoggers = new();
1772private static List<BuildManager.DeferredBuildMessage> GetMessagesToLogInBuildLoggers(string commandLineString)
1774List<BuildManager.DeferredBuildMessage> messages = new(s_globalMessagesToLogInBuildLoggers)
2030ref List<DistributedLoggerRecord> distributedLoggerRecords,
2896internal static ProfilerLogger ProcessProfileEvaluationSwitch(string[] parameters, List<ILogger> loggers, out bool enableProfiler)
3128List<string> actualProjectFiles = new List<string>();
3142List<string> actualSolutionFiles = new List<string>();
3143List<string> solutionFilterFiles = new List<string>();
3330out List<DistributedLoggerRecord> distributedLoggerRecords,
3367var loggers = new List<ILogger>();
3445private static void ProcessFileLoggers(string[][] groupedFileLoggerParameters, List<DistributedLoggerRecord> distributedLoggerRecords, int cpuCount, List<ILogger> loggers)
3500private static void ProcessBinaryLogger(string[] binaryLoggerParameters, List<ILogger> loggers, ref LoggerVerbosity verbosity)
3549List<DistributedLoggerRecord> distributedLoggerRecords,
3552List<ILogger> loggers)
3596List<DistributedLoggerRecord> distributedLoggerRecords,
3599List<ILogger> loggers)
3678List<DistributedLoggerRecord> distributedLoggerRecords)
3826private static void ProcessLoggerSwitch(string[] parameters, List<ILogger> loggers, LoggerVerbosity verbosity)
3845private static List<DistributedLoggerRecord> ProcessDistributedLoggerSwitch(string[] parameters, LoggerVerbosity verbosity)
3847List<DistributedLoggerRecord> distributedLoggers = new List<DistributedLoggerRecord>();
3852var loggerSpec = QuotingUtilities.SplitUnquoted(parameter, 2, true /* keep empty splits */, false /* keep quotes */, out _, '*');
3898var loggerSpec = QuotingUtilities.SplitUnquoted(parameter, 2, true /* keep empty splits */, false /* keep quotes */, out _, ';');
3914var loggerTypeSpec = QuotingUtilities.SplitUnquoted(loggerSpec[0], int.MaxValue, true /* keep empty splits */, false /* keep quotes */, out _, ',');
MSBuildTaskHost (1)
mscorlib (1)
Mvc.Api.Analyzers.Test (5)
MyFrontend (2)
Nats.ApiService (1)
netstandard (1)
OpenIdConnectSample (1)
OracleEndToEnd.ApiService (1)
OrderProcessor (2)
ParameterEndToEnd.ApiService (1)
PathSchemeSelection (1)
Pipelines.AppHost (4)
PostgresEndToEnd.ApiService (1)
PrepareTests (6)
PresentationBuildTasks (53)
PresentationCore (362)
MS\Internal\FontCache\FontResourceCache.cs (8)
24private static void ConstructFontResourceCache(Assembly entryAssembly, Dictionary<string, List<string>> folderResourceMap)
46internal static List<string> LookupFolder(Uri uri)
76Dictionary<string, List<string>> folderResourceMap;
82folderResourceMap = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase);
88List<string> ret;
108private static void AddResourceToFolderMap(Dictionary<string, List<string>> folderResourceMap, string resourceFullName)
145private static Dictionary<Assembly, Dictionary<string, List<string>>> _assemblyCaches
146= new Dictionary<Assembly, Dictionary<string, List<string>>>(1);
MS\Internal\Ink\StrokeRenderer.cs (18)
49List<Point> connectingQuadPoints = new List<Point>(iterator.Count * 4);
61List<Point> strokeNodePoints = new List<Point>();
259List<Point> pathFigureABSide = new List<Point>();//don't prealloc. It causes Gen2 collections to rise and doesn't help execution time
260List<Point> pathFigureDCSide = new List<Point>();
261List<Point> polyLinePoints = new List<Point>(4);
743List<Point> pointBuffer1,
744List<Point> pointBuffer2,
745List<Point> pointBuffer3
798private static void ReverseDCPointsRenderAndClear(StreamGeometryContext context, List<Point> abPoints, List<Point> dcPoints, List<Point> polyLinePoints, bool isEllipse, bool clear)
863private static void AddFigureToStreamGeometryContext(StreamGeometryContext context, List<Point> points, bool isBezierFigure)
891private static void AddPolylineFigureToStreamGeometryContext(StreamGeometryContext context, List<Point> abPoints, List<Point> dcPoints)
913private static void AddArcToFigureToStreamGeometryContext(StreamGeometryContext context, List<Point> abPoints, List<Point> dcPoints, List<Point> polyLinePoints)
930List<Point> points = j == 0 ? abPoints : dcPoints;
System\Windows\Input\AccessKeyManager.cs (10)
89List<IInputElement> targets = akm.GetTargetsForScope(scope, key, null, AccessKeyInformation.Empty);
215List<IInputElement> targets = GetTargetsForSender(inputElementSender, key);
223List<IInputElement> targets = GetTargetsForScope(scope, key, null, AccessKeyInformation.Empty);
228private ProcessKeyResult ProcessKey(List<IInputElement> targets, string key, bool existsElsewhere, bool userInitiated)
333private List<IInputElement> GetTargetsForSender(IInputElement sender, string key)
341private List<IInputElement> GetTargetsForScope(object scope, string key, IInputElement sender, AccessKeyInformation senderInfo)
369List<IInputElement> possibleElements;
377List<IInputElement> finalTargets = new List<IInputElement>(1);
582private static List<IInputElement> CopyAndPurgeDead(ArrayList elements)
589List<IInputElement> copy = new List<IInputElement>(elements.Count);
PresentationCore.Tests (1)
PresentationFramework (1094)
MS\Internal\Documents\TextDocumentView.cs (5)
355List<GlyphRun> glyphRuns = new List<GlyphRun>();
3085private bool GetGlyphRunsFromParagraphs(List<GlyphRun> glyphRuns, ITextPointer start, ITextPointer end, ReadOnlyCollection<ParagraphResult> paragraphs)
3137private void GetGlyphRunsFromFloatingElements(List<GlyphRun> glyphRuns, ITextPointer start, ITextPointer end, ReadOnlyCollection<ParagraphResult> floatingElements, out bool success)
3180private void GetGlyphRuns(List<GlyphRun> glyphRuns, ITextPointer start, ITextPointer end, ReadOnlyCollection<ColumnResult> columns, ReadOnlyCollection<ParagraphResult> floatingElements)
3245List<TextSegment> segments = new List<TextSegment>(1);
MS\Internal\Helper.cs (19)
752List<KeyValuePair<int, object>> itemValues = GetItemValues(owner, item);
774List<KeyValuePair<int, object>> itemValues = EnsureItemValues(owner, item);
805List<KeyValuePair<int, object>> itemValues = GetItemValues(owner, item);
826internal static List<KeyValuePair<int, object>> GetItemValues(DependencyObject owner, object item)
831internal static List<KeyValuePair<int, object>> GetItemValues(DependencyObject owner, object item,
832WeakDictionary<object, List<KeyValuePair<int, object>>> itemValueStorage)
835List<KeyValuePair<int, object>> itemValues = null;
843internal static List<KeyValuePair<int, object>> EnsureItemValues(DependencyObject owner, object item)
845WeakDictionary<object, List<KeyValuePair<int, object>>> itemValueStorage = EnsureItemValueStorage(owner);
846List<KeyValuePair<int, object>> itemValues = GetItemValues(owner, item, itemValueStorage);
858internal static WeakDictionary<object, List<KeyValuePair<int, object>>> EnsureItemValueStorage(DependencyObject owner)
860WeakDictionary<object, List<KeyValuePair<int, object>>> itemValueStorage = ItemValueStorageField.GetValue(owner);
864itemValueStorage = new WeakDictionary<object, List<KeyValuePair<int, object>>>();
879List<KeyValuePair<int, object>> itemValues = GetItemValues(owner, item) ?? new List<KeyValuePair<int, object>>();
1024private static void ClearItemValueStorageRecursive(WeakDictionary<object, List<KeyValuePair<int, object>>> itemValueStorage, int[] dpIndices)
1028foreach (List<KeyValuePair<int, object>> itemValuesList in itemValueStorage.Values)
1035ClearItemValueStorageRecursive((WeakDictionary<object, List<KeyValuePair<int, object>>>)itemValue.Value, dpIndices);
1519private static readonly UncommonField<WeakDictionary<object, List<KeyValuePair<int, object>>>> ItemValueStorageField =
1520new UncommonField<WeakDictionary<object, List<KeyValuePair<int, object>>>>();
MS\Internal\PtsHost\TextParaClient.cs (26)
247internal override List<Rect> GetRectangles(ContentElement e, int start, int length)
249List<Rect> rectangles = new List<Rect>();
382List<ParagraphResult> floaters = null;
420List<ParagraphResult> figures = null;
1104internal void GetGlyphRuns(List<GlyphRun> glyphRuns, ITextPointer start, ITextPointer end)
1261List<InlineObject> inlineObjects = TextParagraph.InlineObjectsFromRange(lineDesc.dcpFirst, lineDesc.dcpLim);
1295List<InlineObject> inlineObjects = TextParagraph.InlineObjectsFromRange(element.dcpFirst, element.dcpLim);
1525List<LineResult> lines = new List<LineResult>(arrayLineDesc.Length);
1577List<LineResult> lines = new List<LineResult>(arrayLineDesc.Length);
2058private List<Rect> RectanglesFromDcpRangeOfSimpleLine(
2067List<Rect> rectangles = null;
2169private List<Rect> RectanglesFromDcpRangeOfCompositeLineElement(
2180List<Rect> rectangles = null;
3089List<GlyphRun> glyphRuns,
3142List<GlyphRun> glyphRuns,
3855private List<Rect> GetRectanglesInSimpleLines(
3863List<Rect> rectangles = new List<Rect>();
3883List<Rect> lineRectangles = GetRectanglesInSingleLine(lineDesc, e, localStart, length);
3897private List<Rect> GetRectanglesInSingleLine(
3905List<Rect> rectangles = new List<Rect>();
4035private List<Rect> GetRectanglesInCompositeLines(
4043List<Rect> rectangles = new List<Rect>();
4062List<Rect> lineRectangles = GetRectanglesInCompositeLine(lineDesc, e, localStart, length);
4079private List<Rect> GetRectanglesInCompositeLine(
4085List<Rect> rectangles = new List<Rect>();
4139List<Rect> elementRectangles = line.GetRangeBounds(localStart, localEnd - localStart, TextDpi.FromTextDpi(element.urStart), TextDpi.FromTextDpi(lineDesc.vrStart));
MS\Internal\PtsHost\TextParagraph.cs (16)
881private List<TextElement> GetAttachedObjectElements(int dcpFirst, int dcpLast)
883List<TextElement> attachedElements = new List<TextElement>();
922List<TextElement> textElements = GetAttachedObjectElements(dcpFirst, dcpLast);
935internal List<AttachedObject> GetAttachedObjects(int dcpFirst, int dcpLast)
938List<AttachedObject> attachedObjects = new List<AttachedObject>();
939List<TextElement> textElements = GetAttachedObjectElements(dcpFirst, dcpLast);
1020internal void SubmitInlineObjects(int dcpStart, int dcpLim, List<InlineObject> inlineObjects)
1038internal void SubmitAttachedObjects(int dcpStart, int dcpLim, List<AttachedObject> attachedObjects)
1052internal List<InlineObject> InlineObjectsFromRange(int dcpStart, int dcpLast)
1054List<InlineObject> objects = null;
1521private void SubmitEmbeddedObjects<T>(ref List<T> objectsCached, int dcpStart, int dcpLim, List<T> objectsNew) where T : EmbeddedObject
1634ref List<T> objectsCached,
1738private List<AttachedObject> _attachedObjects;
1740internal List<AttachedObject> AttachedObjectDbg { get { return _attachedObjects; } }
1746private List<InlineObject> _inlineObjects;
System\Windows\Controls\DataGridCellsPanel.cs (32)
164List<RealizedColumnsBlock> blockList = RealizedColumnsBlockList;
219List<int> realizedColumnIndices = new List<int>();
220List<int> realizedColumnDisplayIndices = new List<int>();
428List<int> realizedColumnIndices,
429List<int> realizedColumnDisplayIndices,
458private static List<RealizedColumnsBlock> BuildRealizedColumnsBlockList(List<int> indexList)
460List<RealizedColumnsBlock> resultList = new List<RealizedColumnsBlock>();
780private static bool InBlockOrNextBlock(List<RealizedColumnsBlock> blockList, int index, ref int blockIndex, ref RealizedColumnsBlock block, out bool pastLastBlock)
817List<int> realizedColumnIndices,
818List<int> realizedColumnDisplayIndices)
858List<int> realizedColumnIndices,
859List<int> realizedColumnDisplayIndices,
946List<int> realizedColumnIndices,
947List<int> realizedColumnDisplayIndices,
990List<int> realizedColumnIndices,
991List<int> realizedColumnDisplayIndices,
1021private void VirtualizeChildren(List<RealizedColumnsBlock> blockList, IItemContainerGenerator generator)
1320private static void Debug_VerifyRealizedIndexCountVsDisplayIndexCount(List<RealizedColumnsBlock> blockList, List<RealizedColumnsBlock> displayIndexBlockList)
1359List<RealizedColumnsBlock> displayIndexBlockList = RealizedColumnsDisplayIndexBlockList;
1363List<RealizedColumnsBlock> blockList = RealizedColumnsBlockList;
1367List<int> additionalChildIndices = GetRealizedChildrenNotInBlockList(blockList, children);
1532private static RealizedColumnsBlock GetRealizedBlockForColumn(List<RealizedColumnsBlock> blockList, int columnIndex)
1551private List<int> GetRealizedChildrenNotInBlockList(List<RealizedColumnsBlock> blockList, IList children)
1563List<int> additionalChildIndices = new List<int>();
1634List<int> displayIndexMap = columns.DisplayIndexMap;
1635List<RealizedColumnsBlock> blockList = RealizedColumnsBlockList;
1696private List<RealizedColumnsBlock> RealizedColumnsBlockList
1727private List<RealizedColumnsBlock> RealizedColumnsDisplayIndexBlockList
2437private List<UIElement> _realizedChildren;
System\Windows\Controls\ToolBarTray.cs (15)
356List<ToolBar> band = _bands[bandIndex].Band;
420List<ToolBar> band = _bands[bandIndex].Band;
542List<ToolBar> band = _bands[currentBand].Band;
642List<ToolBar> oldBand = _bands[currentBand].Band;
664private void ShrinkToolBars(List<ToolBar> band, int startIndex, int endIndex, double shrinkAmount)
702private double ToolBarsTotalMinimum(List<ToolBar> band, int startIndex, int endIndex)
712private void ExpandToolBars(List<ToolBar> band, int startIndex, int endIndex, double expandAmount)
750private double ToolBarsTotalMaximum(List<ToolBar> band, int startIndex, int endIndex)
765List<ToolBar> newBand = _bands[newBandNumber].Band;
841List<ToolBar> band = _bands[bandIndex].Band;
863List<ToolBar> band = _bands[bandIndex].Band;
915private void InsertToolBar(ToolBar toolBar, List<ToolBar> band)
944public List<ToolBar> Band
955private List<ToolBar> _band = new List<ToolBar>();
965private List<BandInfo> _bands = new List<BandInfo>(0);
System\Windows\Controls\VirtualizedCellInfoCollection.cs (33)
34private VirtualizedCellInfoCollection(DataGrid owner, List<CellRegion> regions)
201List<DataGridCellInfo> list = new List<DataGridCellInfo>();
232public VirtualizedCellInfoCollectionEnumerator(DataGrid owner, List<CellRegion> regions, VirtualizedCellInfoCollection collection)
293private List<CellRegion> _regions;
700public bool Remainder(CellRegion region, out List<CellRegion> remainder)
832List<CellRegion> addList = new List<CellRegion>();
843List<CellRegion> remainder;
893List<CellRegion> removeList = null;
902private void RemoveRegion(int rowIndex, int columnIndex, int rowCount, int columnCount, ref List<CellRegion> removeList)
926List<CellRegion> remainder;
943internal void OnItemsCollectionChanged(NotifyCollectionChangedEventArgs e, List<Tuple<int,int>> ranges)
976List<CellRegion> keepRegions = null;
1004List<CellRegion> keepRegions = null;
1005List<CellRegion> removedRegions = null;
1044List<CellRegion> removedRegions = null;
1060List<CellRegion> slideRegions = null;
1061List<CellRegion> movedRegions = null;
1149List<CellRegion> keepRegions = null;
1192List<CellRegion> keepRegions = null;
1193List<CellRegion> removedRegions = null;
1232List<CellRegion> removedRegions = null;
1251List<CellRegion> slideRegions = null;
1252List<CellRegion> movedRegions = null;
1311internal RemovedCellInfoCollection(DataGrid owner, List<CellRegion> regions, DataGridColumn column)
1317internal RemovedCellInfoCollection(DataGrid owner, List<CellRegion> regions, object item)
1409List<CellRegion> removeList = new List<CellRegion>();
1430internal void RestoreOnlyFullRows(List<Tuple<int,int>> ranges)
1485List<CellRegion> removeList = null;
1527internal bool Intersects(int rowIndex, out List<int> columnIndexRanges)
1577private static void ConvertIndexToIndexes(List<CellRegion> regions, int index, out int rowIndex, out int columnIndex)
1602private DataGridCellInfo GetCellInfoFromIndex(DataGrid owner, List<CellRegion> regions, int index)
1631private void AddRegionToList(CellRegion region, List<DataGridCellInfo> list)
1661private List<CellRegion> _regions;
System\Windows\Documents\TextRangeSerialization.cs (5)
84List<int> ignoreList = new List<int>();
188private static void WriteXamlTextSegment(XmlWriter xmlWriter, ITextPointer rangeStart, ITextPointer rangeEnd, XamlTypeMapper xamlTypeMapper, ref int elementLevel, WpfPayload wpfPayload, bool ignoreWriteHyperlinkEnd, List<int> ignoreList, bool preserveTextElements)
337List<TextSegment> textSegments = range.TextSegments;
343List<int> ignoreList = new List<int>();
414private static int WriteOpeningTags(ITextRange range, ITextPointer thisElement, ITextPointer scope, XmlWriter xmlWriter, XamlTypeMapper xamlTypeMapper, bool reduceElement, out bool ignoreWriteHyperlinkEnd, ref List<int> ignoreList, bool preserveTextElements)
System\Windows\Shell\JumpList.cs (26)
193public static void ReleaseShellObjects(List<_ShellObjectPair> list)
262private List<JumpItem> _jumpItems;
323public List<JumpItem> JumpItems
456List<JumpItem> successList;
457List<_RejectedJumpItemPair> rejectedList;
460List<List<_ShellObjectPair>> categories = null;
461List<_ShellObjectPair> removedList = null;
500categories = new List<List<_ShellObjectPair>>() { new List<_ShellObjectPair>() };
542foreach (var list in categories)
586foreach (List<_ShellObjectPair> categoryList in categories)
621foreach (List<_ShellObjectPair> list in categories)
643var items = new List<JumpItem>(rejectedList.Count);
644var reasons = new List<JumpItemRejectionReason>(rejectedList.Count);
657var items = new List<JumpItem>(removedList.Count);
674private static bool ListContainsShellObject(List<_ShellObjectPair> removedList, object shellObject)
755private static List<_ShellObjectPair> GenerateJumpItems(IObjectArray shellObjects)
759var retList = new List<_ShellObjectPair>();
787private static void AddCategory(ICustomDestinationList cdl, string category, List<_ShellObjectPair> jumpItems, List<JumpItem> successList, List<_RejectedJumpItemPair> rejectionList)
792private static void AddCategory(ICustomDestinationList cdl, string category, List<_ShellObjectPair> jumpItems, List<JumpItem> successList, List<_RejectedJumpItemPair> rejectionList, bool isHeterogenous)
835var linksOnlyList = new List<_ShellObjectPair>();
1101var reasons = new List<JumpItemRejectionReason>(_jumpItems.Count);
PresentationFramework.Aero (1)
PresentationFramework.Aero2 (1)
PresentationFramework.AeroLite (1)
PresentationFramework.Classic (1)
PresentationFramework.Fluent.Tests (11)
PresentationFramework.Luna (1)
PresentationFramework.Royale (1)
PresentationFramework.Tests (1)
PresentationUI (18)
Publishers.ApiService (1)
Publishers.AppHost (1)
QuarantineTools.Tests (23)
RazorBuildWebSite (1)
ReachFramework (86)
AlphaFlattener\Flattener.cs (18)
285List<PrimitiveInfo> commands = _dl.Commands;
537private static void SwitchCommands(List<PrimitiveInfo> commands, int i, PrimitiveInfo pi, int j, PrimitiveInfo pj, bool disconnect)
605private static void PushTransparencyDown(List<PrimitiveInfo> commands, int j)
659private static bool ConvertTransparentOnOpaque(List<PrimitiveInfo> commands, int i)
754private static void ReduceTie(PrimitiveInfo pi, List<PrimitiveInfo> commands, int i)
782private static List<int>[] CopyUnderlay(int count, List<PrimitiveInfo> commands)
784List<int>[] oldUnderlay = new List<int>[count];
788List<int> l = commands[i].underlay;
810private void DisplayListOptimization(List<PrimitiveInfo> commands, int count, bool disjoint)
817List<int> [] oldUnderlay = null;
938List<Cluster> transparentCluster = Cluster.CalculateCluster(commands, count, disjoint, oldUnderlay);
959internal void LogInterestingPrimitives(List<PrimitiveInfo> commands, int count, List<Cluster> transparentCluster)
1006internal void SaveInterestingPrimitives(List<PrimitiveInfo> commands, int count, List<Cluster> transparentCluster)
1090private void AlphaRender(Primitive primitive, List<int> overlapping, int overlapHasTransparency, bool disjoint, string desp)
AlphaFlattener\Optimizer.cs (15)
17private List<int> m_primitives;
42public void Render(List<PrimitiveInfo> commands, IProxyDrawingContext dc)
122public static void CheckForRasterization(List<Cluster> clusters, List<PrimitiveInfo> commands)
140public static List<Cluster> CalculateCluster(List<PrimitiveInfo> commands, int count, bool disjoint, List<int>[] oldUnderlay)
142List<Cluster> transparentCluster = new List<Cluster>();
252List<int>[] underlay,
253List<PrimitiveInfo> commands,
300private bool BetterRasterize(List<PrimitiveInfo> commands)
386List<PrimitiveInfo> commands,
389List<int> [] oldUnderlay,
390List<Cluster> transparentCluster,
469internal List<int> DebugPrimitives
Replay (10)
RepoTasks (24)
Roslyn.Diagnostics.Analyzers (140)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (2)
24public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
43public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\CompatAbstractFormattingRule.cs (6)
25public sealed override void AddAnchorIndentationOperations(List<AnchorIndentationOperation> list, SyntaxNode node, in NextAnchorIndentationOperationAction nextOperation)
33public sealed override void AddIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode node, in NextIndentBlockOperationAction nextOperation)
41public sealed override void AddAlignTokensOperations(List<AlignTokensOperation> list, SyntaxNode node, in NextAlignTokensOperationAction nextOperation)
78public virtual void AddAnchorIndentationOperationsSlow(List<AnchorIndentationOperation> list, SyntaxNode node, ref NextAnchorIndentationOperationAction nextOperation)
84public virtual void AddIndentBlockOperationsSlow(List<IndentBlockOperation> list, SyntaxNode node, ref NextIndentBlockOperationAction nextOperation)
90public virtual void AddAlignTokensOperationsSlow(List<AlignTokensOperation> list, SyntaxNode node, ref NextAlignTokensOperationAction nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
86var result = new List<ITypeSymbol>
Roslyn.Diagnostics.CSharp.Analyzers (64)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\BaseFormattingRule.cs (9)
18List<IndentBlockOperation> list,
33List<IndentBlockOperation> list,
46List<IndentBlockOperation> list,
60List<IndentBlockOperation> list,
74List<IndentBlockOperation> list,
89List<IndentBlockOperation> list,
99List<IndentBlockOperation> list,
124protected static void AddAnchorIndentationOperation(List<AnchorIndentationOperation> list, SyntaxToken anchorToken, SyntaxToken endToken)
134protected static void AddAlignIndentationOfTokensToBaseTokenOperation(List<AlignTokensOperation> list, SyntaxNode containingNode, SyntaxToken baseNode, IEnumerable<SyntaxToken> tokens, AlignTokensOption option = AlignTokensOption.AlignIndentationOfTokensToBaseToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (11)
47public override void AddIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode node, in NextIndentBlockOperationAction nextOperation)
61private static void AddTypeParameterConstraintClauseOperation(List<IndentBlockOperation> list, SyntaxNode node)
70private void AddSwitchIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
129private void AddLabelIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
145private static void AddAlignmentBlockOperation(List<IndentBlockOperation> list, SyntaxNode node)
200private static void SetAlignmentBlockOperation(List<IndentBlockOperation> list, SyntaxNode baseNode, SyntaxNode body)
211private void AddBlockIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
248private static void AddBracketIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
283private static void AddParenthesizedPatternIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
303private static void AddAlignmentBlockOperationRelativeToFirstTokenOnBaseTokenLine(List<IndentBlockOperation> list, (SyntaxToken openBrace, SyntaxToken closeBrace) bracePair)
309private static void AddEmbeddedStatementsIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamespaceGenerator.cs (1)
141var usingDirectives =
Roslyn.Test.PdbUtilities (13)
Roslyn.Test.Performance.Utilities (2)
Roslyn.VisualStudio.DiagnosticsWindow (4)
Roslyn.VisualStudio.Next.UnitTests (12)
Services\PerformanceTrackerServiceTests.cs (9)
33var analyzerInfos = GetAnalyzerInfos(sampleSize, forSpanAnalysis);
54var analyzerInfos = GenerateReport(service, forSpanAnalysis);
78var analyzerInfos = GetAnalyzerInfos(to: 200, forSpanAnalysis);
94var analyzerInfos = GetAnalyzerInfos(to: 300, forSpanAnalysis);
111var analyzerInfos = GetAnalyzerInfos(to: 400, forSpanAnalysis);
136private static void VerifyAnalyzerInfo(List<AnalyzerInfoForPerformanceReporting> analyzerInfos, string analyzerName, double mean, double stddev)
144private static List<AnalyzerInfoForPerformanceReporting> GetAnalyzerInfos(int to, bool forSpanAnalysis)
165private static List<AnalyzerInfoForPerformanceReporting> GenerateReport(PerformanceTrackerService service, bool forSpanAnalysis)
167var analyzerInfos = new List<AnalyzerInfoForPerformanceReporting>();
RoutingSandbox (7)
RoutingWebSite (1)
RunTests (31)
TestHistoryManager.cs (3)
91var testResults = await GetTestResultsAsync(runForThisStage, i, MaxTestsReturnedPerRequest, testClient, cancellationToken);
191private static async Task<List<TestCaseResult>> GetTestResultsAsync(TestRun testRun, int skip, int top, TestResultsHttpClient testClient, CancellationToken cancellationToken)
195var testResults = await testClient.GetTestResultsAsync("public", testRun.Id, skip: skip, top: top, cancellationToken: cancellationToken);
Sample (24)
SampleStartups (1)
ScenarioTests.Common.Tests (5)
SemanticSearch.BuildTask (14)
SemanticSearch.BuildTask.UnitTests (8)
Shared (15)
Shared.Tests (23)
SignalR.Client.FunctionalTestApp (1)
SignalRSamples (1)
Sockets.BindTests (5)
Sockets.FunctionalTests (7)
SqlServerEndToEnd.ApiService (2)
StaticFilesAuth (2)
Stress.ApiService (3)
Stress.AppHost (8)
Stress.TelemetryService (2)
Swaggatherer (19)
System.CodeDom (2)
System.Collections (6)
System.Collections.Concurrent (8)
System.Collections.Immutable (8)
System.ComponentModel.Annotations (14)
System\ComponentModel\DataAnnotations\Validator.cs (12)
224List<ValidationError> errors = GetValidationErrors(value, validationContext, attributes, false);
287List<ValidationError> errors = GetObjectValidationErrors(instance, validationContext, validateAllProperties, false);
317List<ValidationError> errors = GetValidationErrors(value, validationContext, validationAttributes, false);
403private static List<ValidationError> GetObjectValidationErrors(object instance,
411List<ValidationError> errors = GetObjectPropertyValidationErrors(instance, validationContext, validateAllProperties, breakOnFirstError);
461private static List<ValidationError> GetObjectPropertyValidationErrors(object instance,
464var properties = GetPropertyValues(instance, validationContext);
465var errors = new List<ValidationError>();
516private static List<KeyValuePair<ValidationContext, object?>> GetPropertyValues(object instance,
520var items = new List<KeyValuePair<ValidationContext, object?>>(properties.Count);
552private static List<ValidationError> GetValidationErrors(object? value,
557var errors = new List<ValidationError>();
System.ComponentModel.Composition (123)
System\ComponentModel\Composition\Hosting\TypeCatalog.cs (16)
29private List<ComposablePartDefinition>? _parts;
32private readonly Lazy<Dictionary<string, List<ComposablePartDefinition>>> _contractPartIndex;
81_contractPartIndex = new Lazy<Dictionary<string, List<ComposablePartDefinition>>>(CreateIndex, true);
109_contractPartIndex = new Lazy<Dictionary<string, List<ComposablePartDefinition>>>(CreateIndex, true);
138_contractPartIndex = new Lazy<Dictionary<string, List<ComposablePartDefinition>>>(CreateIndex, true);
171_contractPartIndex = new Lazy<Dictionary<string, List<ComposablePartDefinition>>>(CreateIndex, true);
176var typesList = new List<Type>();
266var collection = new List<ComposablePartDefinition>();
299List<ComposablePartDefinition>? nonGenericMatches = GetCandidateParts(contractName);
300List<ComposablePartDefinition>? genericMatches = GetCandidateParts(genericContractName);
305private List<ComposablePartDefinition>? GetCandidateParts(string? contractName)
312_contractPartIndex.Value.TryGetValue(contractName, out List<ComposablePartDefinition>? contractCandidateParts);
316private Dictionary<string, List<ComposablePartDefinition>> CreateIndex()
318Dictionary<string, List<ComposablePartDefinition>> index = new Dictionary<string, List<ComposablePartDefinition>>(StringComparers.ContractName);
324List<ComposablePartDefinition>? contractParts = null;
System.ComponentModel.Composition.Registration (45)
System\ComponentModel\Composition\Registration\PartBuilder.cs (20)
13private static readonly List<Attribute> s_importingConstructorList = new List<Attribute>() { new ImportingConstructorAttribute() };
15private readonly List<ExportBuilder> _typeExportBuilders;
20private List<Tuple<string, object>> _metadataItems;
21private List<Tuple<string, Func<Type, object>>> _metadataItemFuncs;
28private readonly List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportBuilder>, Type>> _propertyExports;
29private readonly List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ImportBuilder>, Type>> _propertyImports;
30private readonly List<Tuple<Predicate<Type>, Action<Type, ExportBuilder>>> _interfaceExports;
225var attributes = new List<Attribute>();
335internal bool BuildConstructorAttributes(Type type, ref List<Tuple<object, List<Attribute>>> configuredMembers)
376internal static void BuildDefaultConstructorAttributes(Type type, ref List<Tuple<object, List<Attribute>>> configuredMembers)
386private static void ConfigureConstructorAttributes(ConstructorInfo constructorInfo, ref List<Tuple<object, List<Attribute>>> configuredMembers, Action<ParameterInfo, ImportBuilder> configureConstructorImports)
388configuredMembers ??= new List<Tuple<object, List<Attribute>>>();
410List<Attribute> attributes = null;
417internal void BuildPropertyAttributes(Type type, ref List<Tuple<object, List<Attribute>>> configuredMembers)
423List<Attribute> attributes = null;
503configuredMembers ??= new List<Tuple<object, List<Attribute>>>();
System.ComponentModel.TypeConverter (14)
System.Composition.Convention (52)
System\Composition\Convention\ConventionBuilder.cs (20)
17private readonly List<PartConventionBuilder> _conventions = new List<PartConventionBuilder>();
19private readonly Dictionary<MemberInfo, List<Attribute>> _memberInfos = new Dictionary<MemberInfo, List<Attribute>>();
20private readonly Dictionary<ParameterInfo, List<Attribute>> _parameters = new Dictionary<ParameterInfo, List<Attribute>>();
114private List<Tuple<object, List<Attribute>>> EvaluateThisTypeInfoAgainstTheConvention(TypeInfo typeInfo)
116List<Attribute> attributes = new List<Attribute>();
117var configuredMembers = new List<Tuple<object, List<Attribute>>>();
152List<Attribute> cachedAttributes = null;
174List<Attribute> attributeList;
175foreach (Tuple<object, List<Attribute>> element in EvaluateThisTypeInfoAgainstTheConvention(typeInfo))
185if (!_memberInfos.TryGetValue(mi, out List<Attribute> memberAttributes))
200if (!_parameters.TryGetValue(pi, out List<Attribute> parameterAttributes))
232private List<Attribute> ReadMemberCustomAttributes(Type reflectedType, System.Reflection.MemberInfo member)
234List<Attribute> cachedAttributes = null;
289List<Attribute> cachedAttributes = ReadParameterCustomAttributes(reflectedType, parameter);
293private List<Attribute> ReadParameterCustomAttributes(Type reflectedType, System.Reflection.ParameterInfo parameter)
295List<Attribute> cachedAttributes = null;
System\Composition\Convention\PartConventionBuilder.cs (26)
17private static List<Attribute> s_onImportsSatisfiedAttributeList;
18private static readonly List<Attribute> s_importingConstructorList = new List<Attribute>() { new ImportingConstructorAttribute() };
20private readonly List<ExportConventionBuilder> _typeExportBuilders;
25private List<Tuple<string, object>> _metadataItems;
26private List<Tuple<string, Func<Type, object>>> _metadataItemFuncs;
33private readonly List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportConventionBuilder>, Type>> _propertyExports;
34private readonly List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ImportConventionBuilder>>> _propertyImports;
35private readonly List<Tuple<Predicate<Type>, Action<Type, ExportConventionBuilder>>> _interfaceExports;
36private readonly List<Predicate<MethodInfo>> _methodImportsSatisfiedNotifications;
422var attributes = new List<Attribute>();
529internal bool BuildConstructorAttributes(Type type, ref List<Tuple<object, List<Attribute>>> configuredMembers)
567internal static void BuildDefaultConstructorAttributes(Type type, ref List<Tuple<object, List<Attribute>>> configuredMembers)
577private static void ConfigureConstructorAttributes(ConstructorInfo constructorInfo, ref List<Tuple<object, List<Attribute>>> configuredMembers, Action<ParameterInfo, ImportConventionBuilder> configureConstructorImports)
579configuredMembers ??= new List<Tuple<object, List<Attribute>>>();
601List<Attribute> attributes = null;
608internal void BuildOnImportsSatisfiedNotification(Type type, ref List<Tuple<object, List<Attribute>>> configuredMembers)
646var onImportsSatisfiedAttributeList = new List<Attribute>
652configuredMembers.Add(new Tuple<object, List<Attribute>>(mi, s_onImportsSatisfiedAttributeList));
662internal void BuildPropertyAttributes(Type type, ref List<Tuple<object, List<Attribute>>> configuredMembers)
668List<Attribute> attributes = null;
748configuredMembers ??= new List<Tuple<object, List<Attribute>>>();
System.Composition.Hosting (6)
System.Composition.TypedParts (9)
System.Configuration.ConfigurationManager (34)
System.Console (2)
System.Data.Common (86)
System.Data.Odbc (20)
System.Diagnostics.DiagnosticSource (34)
System.Diagnostics.Process (11)
System.Diagnostics.TraceSource (9)
System.Drawing.Common (3)
System.Drawing.Common.Tests (1)
System.Formats.Asn1 (1)
System.Formats.Cbor (20)
System.Formats.Nrbf (13)
System.Formats.Tar (1)
System.IO.Compression (18)
System.IO.FileSystem.DriveInfo (2)
System.IO.FileSystem.Watcher (7)
System.IO.Packaging (29)
System\IO\Packaging\ZipPackage.cs (16)
176List<PackagePart> parts = new List<PackagePart>(InitialPartListSize);
538private static void DeleteInterleavedPartOrStream(List<ZipPackagePartPiece> sortedPieceInfoList)
564private void ProcessPieces(SortedSet<ZipPackagePartPiece> pieceSet, List<PackagePart> parts)
580List<ZipPackagePartPiece> pieces = new List<ZipPackagePartPiece>(pieceSet);
679List<ZipPackagePartPiece> pieces,
682List<PackagePart> parts)
1071List<ZipPackagePartPiece>? partPieces = null;
1301private List<ZipPackagePartPiece>? _contentTypeStreamPieces;
1353private readonly Dictionary<string, List<string>> _ignoredItemDictionary;
1358private readonly Dictionary<string, List<string>> _extensionDictionary;
1370_extensionDictionary = new Dictionary<string, List<string>>(_dictionaryInitialSize, s_extensionEqualityComparer);
1371_ignoredItemDictionary = new Dictionary<string, List<string>>(_dictionaryInitialSize, StringComparer.Ordinal);
1406internal void AddItemsForInvalidSequence(string normalizedPrefixNameForThisSequence, List<ZipPackagePartPiece> pieces, int startIndex, int count)
1408if (!_ignoredItemDictionary.TryGetValue(normalizedPrefixNameForThisSequence, out List<string>? zipFileInfoNameList))
1439if (_ignoredItemDictionary.TryGetValue(normalizedPartName, out List<string>? zipFileInfoNames))
1459if (_extensionDictionary.TryGetValue(extension, out List<string>? normalizedPartNames))
System.IO.Pipelines (6)
System.IO.Ports (4)
System.Linq (108)
System\Linq\Shuffle.SpeedOpt.cs (10)
21public override List<TSource> ToList()
23List<TSource> list = _source.ToList();
61List<TSource>? sample = ShuffleTakeIterator<TSource>.SampleToList(_source, 1, out long totalElementCount);
97private List<TSource>? _buffer;
117List<TSource>? buffer = _buffer;
130List<TSource>? buffer = SampleToList(_source, _takeCount, out _);
151public override List<TSource> ToList() => SampleToList(_source, _takeCount, out _) ?? [];
186List<TSource>? sample = SampleToList(_source, 1, out long totalElementCount);
202internal static List<TSource>? SampleToList(IEnumerable<TSource> source, int takeCount, out long totalElementCount)
204List<TSource>? reservoir = null;
System\Linq\Where.SpeedOpt.cs (12)
56public override List<TSource> ToList()
70List<TSource> result = builder.ToList();
217public override List<TSource> ToList() => ToList(_source, _predicate);
219public static List<TSource> ToList(ReadOnlySpan<TSource> source, Func<TSource, bool> predicate)
232List<TSource> result = builder.ToList();
320public override List<TSource> ToList() => ArrayWhereIterator<TSource>.ToList(CollectionsMarshal.AsSpan(_source), _predicate);
450public override List<TResult> ToList() => ToList(_source, _predicate, _selector);
452public static List<TResult> ToList(ReadOnlySpan<TSource> source, Func<TSource, bool> predicate, Func<TSource, TResult> selector)
465List<TResult> result = builder.ToList();
552public override List<TResult> ToList() => ArrayWhereSelectIterator<TSource, TResult>.ToList(CollectionsMarshal.AsSpan(_source), _predicate, _selector);
613public override List<TResult> ToList()
628List<TResult> result = builder.ToList();
System.Linq.AsyncEnumerable (6)
System.Linq.Expressions (56)
System.Linq.Parallel (11)
System.Linq.Queryable (2)
System.Memory (2)
System.Net.Http (53)
System.Net.HttpListener (21)
System.Net.Mail (9)
System.Net.NetworkInformation (24)
System.Net.Primitives (4)
System.Net.Quic (6)
System\Net\Quic\Internal\MsQuicConfiguration.Cache.cs (3)
36public readonly List<SslApplicationProtocol> ApplicationProtocols;
39public CacheKey(QUIC_SETTINGS settings, QUIC_CREDENTIAL_FLAGS flags, X509Certificate? certificate, ReadOnlyCollection<X509Certificate2>? intermediates, List<SslApplicationProtocol> alpnProtocols, QUIC_ALLOWED_CIPHER_SUITE_FLAGS allowedCipherSuites)
119private static MsQuicConfigurationSafeHandle GetCachedCredentialOrCreate(QUIC_SETTINGS settings, QUIC_CREDENTIAL_FLAGS flags, X509Certificate? certificate, ReadOnlyCollection<X509Certificate2>? intermediates, List<SslApplicationProtocol> alpnProtocols, QUIC_ALLOWED_CIPHER_SUITE_FLAGS allowedCipherSuites)
System\Net\Quic\Internal\MsQuicConfiguration.cs (2)
124private static MsQuicConfigurationSafeHandle Create(QuicConnectionOptions options, QUIC_CREDENTIAL_FLAGS flags, X509Certificate? certificate, ReadOnlyCollection<X509Certificate2>? intermediates, List<SslApplicationProtocol>? alpnProtocols, CipherSuitesPolicy? cipherSuitesPolicy, EncryptionPolicy encryptionPolicy)
204private static unsafe MsQuicConfigurationSafeHandle CreateInternal(QUIC_SETTINGS settings, QUIC_CREDENTIAL_FLAGS flags, X509Certificate? certificate, ReadOnlyCollection<X509Certificate2>? intermediates, List<SslApplicationProtocol> alpnProtocols, QUIC_ALLOWED_CIPHER_SUITE_FLAGS allowedCipherSuites)
System.Net.Requests (7)
System.Net.Security (15)
System.Net.Sockets (1)
System.Net.WebHeaderCollection (2)
System.Net.WebSockets.Client (3)
System.Numerics.Tensors (3)
System.ObjectModel (5)
System.Printing.Tests (1)
System.Private.CoreLib (205)
System.Private.CoreLib.Generators (4)
System.Private.DataContractSerialization (60)
System.Private.Windows.Core (65)
System\Private\Windows\Nrbf\CoreNrbfSerializer.cs (32)
57{ Types.ToTypeName($"{Types.ListName}[[{Types.BooleanType}]]"), typeof(List<bool>) },
58{ Types.ToTypeName($"{Types.ListName}[[{Types.CharType}]]"), typeof(List<char>) },
59{ Types.ToTypeName($"{Types.ListName}[[{Types.StringType}]]"), typeof(List<string>) },
60{ Types.ToTypeName($"{Types.ListName}[[{Types.SByteType}]]"), typeof(List<sbyte>) },
61{ Types.ToTypeName($"{Types.ListName}[[{Types.ByteType}]]"), typeof(List<byte>) },
62{ Types.ToTypeName($"{Types.ListName}[[{Types.Int16Type}]]"), typeof(List<short>) },
63{ Types.ToTypeName($"{Types.ListName}[[{Types.UInt16Type}]]"), typeof(List<ushort>) },
64{ Types.ToTypeName($"{Types.ListName}[[{Types.Int32Type}]]"), typeof(List<int>) },
65{ Types.ToTypeName($"{Types.ListName}[[{Types.UInt32Type}]]"), typeof(List<uint>) },
66{ Types.ToTypeName($"{Types.ListName}[[{Types.Int64Type}]]"), typeof(List<long>) },
67{ Types.ToTypeName($"{Types.ListName}[[{Types.UInt64Type}]]"), typeof(List<ulong>) },
68{ Types.ToTypeName($"{Types.ListName}[[{Types.SingleType}]]"), typeof(List<float>) },
69{ Types.ToTypeName($"{Types.ListName}[[{Types.DoubleType}]]"), typeof(List<double>) },
70{ Types.ToTypeName($"{Types.ListName}[[{Types.DecimalType}]]"), typeof(List<decimal>) },
71{ Types.ToTypeName($"{Types.ListName}[[{Types.DateTimeType}]]"), typeof(List<DateTime>) },
72{ Types.ToTypeName($"{Types.ListName}[[{Types.TimeSpanType}]]"), typeof(List<TimeSpan>) },
124|| type == typeof(List<byte>)
125|| type == typeof(List<sbyte>)
126|| type == typeof(List<short>)
127|| type == typeof(List<ushort>)
128|| type == typeof(List<int>)
129|| type == typeof(List<uint>)
130|| type == typeof(List<long>)
131|| type == typeof(List<ulong>)
132|| type == typeof(List<float>)
133|| type == typeof(List<double>)
134|| type == typeof(List<char>)
135|| type == typeof(List<bool>)
136|| type == typeof(List<string>)
137|| type == typeof(List<decimal>)
138|| type == typeof(List<DateTime>)
139|| type == typeof(List<TimeSpan>)
System.Private.Windows.Core.Tests (57)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (23)
410List<object> value = ["text"];
421Action read = () => TryReadObjectFromStream<List<object>>(ObjectListResolver, out _);
426TryReadObjectFromStream(ObjectListResolver, out List<object>? result).Should().BeTrue();
427result.Should().BeOfType<List<object>>();
437("System.Collections.Generic.List`1[[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]", typeof(List<object>))
458List<int> value = [1, 2, 3];
751("System.Collections.Generic.List`1[[System.Nullable`1[[System.Decimal, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]", typeof(List<decimal?>)),
752("System.Collections.Generic.List`1[[System.TimeSpan, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]", typeof(List<TimeSpan>))
1015public List<byte> Bytes = [1];
1016public List<sbyte> Sbytes = [1];
1017public List<short> Shorts = [1];
1018public List<ushort> Ushorts = [1];
1019public List<int> Ints = [1, 2, 3];
1020public List<uint> Uints = [1, 2, 3];
1021public List<long> Longs = [1, 2, 3];
1022public List<ulong> Ulongs = [1, 2, 3];
1023public List<float> Floats = [1.0f, 2.0f, 3.0f];
1024public List<double> Doubles = [1.0, 2.0, 3.0];
1025public List<decimal> Decimals = [1.0m, 2.0m, 3.0m];
1026public List<decimal?> NullableDecimals = [null, 2.0m, 3.0m];
1027public List<DateTime> DateTimes = [DateTime.Now];
1028public List<TimeSpan> TimeSpans = [TimeSpan.FromHours(1)];
1029public List<string> Strings = ["a", "b", "c"];
System\Reflection\Metadata\TypeNameComparerTests.cs (26)
16{ TypeName.Parse(typeof(List<int>).AssemblyQualifiedName), typeof(List<int>) },
17{ TypeName.Parse($"{typeof(List<int>).FullName}, {typeof(List<int>).Assembly.FullName}"), typeof(List<int>) },
30{ TypeName.Parse(typeof(List<int>).AssemblyQualifiedName), typeof(List<int>) },
43TypeName.Parse($"System.Collections.Generic.List`1[[System.Int32, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], {typeof(List<int>).Assembly.FullName}"),
57{ TypeName.Parse(typeof(List<int>).AssemblyQualifiedName), typeof(List<int>) },
71{ TypeName.Parse(typeof(List<int>).AssemblyQualifiedName), typeof(List<int>) },
109{ TypeName.Parse("System.Collections.Generic.List`1[[System.Int32]]"), typeof(List<int>) },
123{ TypeName.Parse(typeof(List<int>).FullName), typeof(List<int>) },
149{ TypeName.Parse(typeof(List<int>).FullName), typeof(List<int>) },
160{ TypeName.Parse($"{typeof(List<int>).FullName}, {typeof(List<int>).Assembly.GetName().Name}"), typeof(List<int>) },
173{ TypeName.Parse($"{typeof(List<int>).FullName}, {typeof(List<int>).Assembly.GetName().Name}"), typeof(List<int>) },
204{ TypeName.Parse($"{typeof(List<int>).FullName}, {typeof(List<int>).Assembly.GetName().Name}"), typeof(List<int>) },
System.Private.Windows.Core.TestUtilities (1)
System.Private.Xml (259)
System.Private.Xml.Linq (7)
System.Reflection.Context (10)
System.Reflection.DispatchProxy (2)
System.Reflection.Emit (67)
System\Reflection\Emit\ModuleBuilderImpl.cs (19)
25private readonly List<TypeBuilderImpl> _typeDefinitions = new();
28private List<CustomAttributeWrapper>? _customAttributes;
138List<GenericTypeParameterBuilderImpl> genericParams = new();
217foreach (List<(MethodInfo ifaceMethod, MethodInfo targetMethod)> mapList in typeBuilder._methodOverrides.Values)
303private void PopulateFieldDefinitionHandles(List<FieldBuilderImpl> fieldDefinitions)
311private void PopulateMethodDefinitionHandles(List<MethodBuilderImpl> methods)
319private void PopulatePropertyDefinitionHandles(List<PropertyBuilderImpl> properties)
327private void PopulateEventDefinitionHandles(List<EventBuilderImpl> eventDefinitions)
351private void WriteMethods(List<MethodBuilderImpl> methods, List<GenericTypeParameterBuilderImpl> genericParams,
423Dictionary<SymbolDocumentWriter, List<SequencePoint>>.Enumerator enumerator = il.DocumentToSequencePoints.GetEnumerator();
447private BlobHandle PopulateMultiDocSequencePointsBlob(Dictionary<SymbolDocumentWriter, List<SequencePoint>>.Enumerator enumerator, StandaloneSignatureHandle localSignature)
453KeyValuePair<SymbolDocumentWriter, List<SequencePoint>> pair = enumerator.Current;
473private static void PopulateSequencePointsBlob(BlobBuilder spBlobBuilder, List<SequencePoint> sequencePoints, ref int previousNonHiddenStartLine, ref int previousNonHiddenStartColumn)
530private LocalVariableHandle GetLocalVariableHandle(List<LocalBuilder>? locals, LocalVariableHandle firstLocalHandleOfLastScope)
553private ImportScopeHandle GetImportScopeHandle(List<string>? importNamespaces, ImportScopeHandle parent)
680internal void WriteCustomAttributes(List<CustomAttributeWrapper>? customAttributes, EntityHandle parent)
1403internal List<TypeBuilderImpl> GetNestedTypeBuilders(TypeBuilderImpl declaringType)
1405List<TypeBuilderImpl> nestedTypes = new List<TypeBuilderImpl>();
System.Reflection.Metadata (57)
System.Reflection.MetadataLoadContext (16)
System.Resources.Extensions (11)
System.Resources.Writer (2)
System.Runtime.Caching (4)
System.Runtime.Serialization.Formatters (9)
System.Runtime.Serialization.Schema (4)
System.Security.Claims (9)
System.Security.Cryptography (86)
System.Security.Cryptography.Cose (5)
System.Security.Cryptography.Pkcs (40)
System.Security.Cryptography.Xml (2)
System.Security.Permissions (1)
System.ServiceModel.Federation (2)
System.ServiceModel.NetFramingBase (22)
System.ServiceModel.NetNamedPipe (1)
System.ServiceModel.Primitives (122)
System.ServiceModel.Primitives.Tests (26)
System.ServiceModel.Syndication (1)
System.Text.Json (93)
System.Text.Json.SourceGeneration (24)
System.Text.RegularExpressions (111)
System\Text\RegularExpressions\Regex.Split.cs (2)
93regex.RunAllMatchesWithCallback(input, startat, ref state, static (ref (List<string> results, int prevat, string input, int count) state, Match match) =>
121regex.RunAllMatchesWithCallback(input, startat, ref state, static (ref (List<string> results, int prevat, string input, int count) state, Match match) =>
System\Text\RegularExpressions\RegexCharClass.cs (11)
187private List<(char First, char Last)>? _rangelist;
222private RegexCharClass(bool negate, List<(char First, char Last)>? ranges, StringBuilder? categories, RegexCharClass? subtraction)
274private List<(char First, char Last)> EnsureRangeList() =>
284List<(char First, char Last)> rangeList = EnsureRangeList();
350List<(char First, char Last)>? rangeList = _rangelist;
1449List<(char First, char Last)>? ranges = ComputeRanges(charClass.AsSpan(pos));
1482public static List<(char First, char Last)>? ComputeRanges(ReadOnlySpan<char> set)
1488List<(char First, char Last)>? ranges = null;
1631List<(char First, char Last)>? rangelist = current._rangelist;
1670List<(char First, char Last)>? rangelist = _rangelist;
1851var temp = new List<KeyValuePair<string, string>>(s_definedCategories);
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.Automata.cs (5)
407List<int> targetsList = [];
408ForEachNfaState(targetNode, nextCharKind, targetsList, static (int nfaId, List<int> targetsList) =>
433List<(SymbolicRegexNode<TSet> Node, DerivativeEffect[] Effects)>? transition = coreState.NfaNextWithEffects(_builder, minterm, nextCharKind);
436List<(int, DerivativeEffect[])> targetsList = [];
440static (int nfaId, (List<(int, DerivativeEffect[])> Targets, DerivativeEffect[] Effects) args) =>
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.Dgml.cs (5)
24Dictionary<(int Source, int Target), (TSet Rule, List<int> NfaTargets)> transitions = GatherTransitions(this);
57foreach (KeyValuePair<(int Source, int Target), (TSet Rule, List<int> NfaTargets)> transition in transitions)
144static Dictionary<(int Source, int Target), (TSet Rule, List<int> NfaTargets)> GatherTransitions(SymbolicRegexMatcher<TSet> matcher)
146Dictionary<(int Source, int Target), (TSet Rule, List<int> NfaTargets)> result = new();
161if (!result.TryGetValue(key, out (TSet Rule, List<int> NfaTargets) entry))
System\Text\RegularExpressions\Symbolic\SymbolicRegexNode.cs (10)
185public List<SymbolicRegexNode<TSet>> ToList(List<SymbolicRegexNode<TSet>>? list = null, SymbolicRegexNodeKind listKind = SymbolicRegexNodeKind.Concat)
192static void AppendToList(SymbolicRegexNode<TSet> concat, List<SymbolicRegexNode<TSet>> list, SymbolicRegexNodeKind listKind)
540List<SymbolicRegexNode<TSet>> elems = left.ToList(listKind: SymbolicRegexNodeKind.Alternate);
840List<SymbolicRegexNode<TSet>> prefixElements = [];
1054internal List<(SymbolicRegexNode<TSet>, DerivativeEffect[])> CreateNfaDerivativeWithEffects(SymbolicRegexBuilder<TSet> builder, TSet elem, uint context)
1056List<(SymbolicRegexNode<TSet>, DerivativeEffect[])> transitions = [];
1392List<SymbolicRegexNode<TSet>> elems = ToList(listKind: SymbolicRegexNodeKind.Alternate);
1427internal void StripAndMapEffects(SymbolicRegexBuilder<TSet> builder, uint context, List<(SymbolicRegexNode<TSet>, DerivativeEffect[])> alternativesAndEffects,
1428List<DerivativeEffect>? currentEffects = null)
System.Text.RegularExpressions.Generator (66)
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCharClass.cs (11)
187private List<(char First, char Last)>? _rangelist;
222private RegexCharClass(bool negate, List<(char First, char Last)>? ranges, StringBuilder? categories, RegexCharClass? subtraction)
274private List<(char First, char Last)> EnsureRangeList() =>
284List<(char First, char Last)> rangeList = EnsureRangeList();
350List<(char First, char Last)>? rangeList = _rangelist;
1449List<(char First, char Last)>? ranges = ComputeRanges(charClass.AsSpan(pos));
1482public static List<(char First, char Last)>? ComputeRanges(ReadOnlySpan<char> set)
1488List<(char First, char Last)>? ranges = null;
1631List<(char First, char Last)>? rangelist = current._rangelist;
1670List<(char First, char Last)>? rangelist = _rangelist;
1851var temp = new List<KeyValuePair<string, string>>(s_definedCategories);
System.Threading.Channels (1)
System.Threading.RateLimiting (7)
System.Threading.Tasks.Dataflow (38)
Blocks\BatchBlock.cs (8)
276internal readonly List<KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>> ReservedSourcesTemp;
527List<Exception>? exceptions = null;
759List<KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>> reserved = _nonGreedyState.ReservedSourcesTemp;
877List<KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>> reserved = _nonGreedyState.ReservedSourcesTemp;
984List<KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>> reserved = _nonGreedyState.ReservedSourcesTemp;
1036List<KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>> reserved = _nonGreedyState.ReservedSourcesTemp;
1086List<Exception>? exceptions = null;
1088List<KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>> reserved = _nonGreedyState.ReservedSourcesTemp;
System.Threading.Tasks.Parallel (1)
System.Windows.Controls.Ribbon (53)
System.Windows.Forms (180)
System.Windows.Forms.Analyzers.CSharp.Tests (1)
System.Windows.Forms.Design (258)
System.Windows.Forms.Design.Tests (291)
System.Windows.Forms.IntegrationTests.Common (1)
System.Windows.Forms.Primitives (6)
System.Windows.Forms.Primitives.Tests (4)
System.Windows.Forms.Primitives.TestUtilities (9)
System.Windows.Forms.PrivateSourceGenerators.Tests (3)
System.Windows.Forms.Tests (151)
System.Windows.Forms.UI.IntegrationTests (3)
System.Windows.Input.Manipulations (3)
System.Xaml (169)
System\Xaml\Context\ObjectWriterContext.cs (17)
24private List<NameScopeInitializationCompleteSubscriber> _nameScopeInitializationCompleteSubscribers;
174List<AmbientPropertyValue> valueList = FindAmbientValues(ceilingTypes, searchLiveStackOnly: false, types: null, properties, true);
180List<object> valueList = FindAmbientValues(types, true);
186List<AmbientPropertyValue> valueList = FindAmbientValues(ceilingTypes, searchLiveStackOnly: false, types: null, properties, stopAfterFirst: false);
192List<object> valueList = FindAmbientValues(types, false);
198List<AmbientPropertyValue> valueList = FindAmbientValues(ceilingTypes, searchLiveStackOnly, types, properties, false);
307private List<AmbientPropertyValue> FindAmbientValues(IEnumerable<XamlType> ceilingTypesEnumerable,
321List<XamlType> ceilingTypes = ceilingTypesEnumerable is not null ? new List<XamlType>(ceilingTypesEnumerable) : null;
323List<AmbientPropertyValue> retList = new List<AmbientPropertyValue>();
426private List<object> FindAmbientValues(XamlType[] types, bool stopAfterFirst)
436List<object> retList = new List<object>();
990List<KeyValuePair<string, object>> allNamesAndValues = new List<KeyValuePair<string, object>>();
1049private List<XAML3.INameScopeDictionary> _nameScopeDictionaryList = new List<XAML3.INameScopeDictionary>();
1056public List<XAML3.INameScopeDictionary> NameScopeDictionaryList
1064private List<XAML3.INameScopeDictionary> _nameScopeDictionaryList;
1066public StackWalkNameResolver(List<XAML3.INameScopeDictionary> nameScopeDictionaryList)
1129List<KeyValuePair<string, object>> allNamesAndValues = new List<KeyValuePair<string, object>>();
System\Xaml\Schema\TypeReflector.cs (44)
465out ICollection<EventInfo> newEvents, out List<XamlMember> knownMembers)
486private IList<PropertyInfo> FilterProperties(PropertyInfo[] propList, List<XamlMember> knownMembers, bool skipKnownNegatives)
536List<PropertyInfo> filteredResult = new List<PropertyInfo>(result.Count);
548private ICollection<EventInfo> FilterEvents(EventInfo[] eventList, List<XamlMember> knownMembers)
590List<EventInfo> filteredResult = new List<EventInfo>(result.Count);
641private void PickAttachablePropertyAccessors(List<MethodInfo> getters,
642List<MethodInfo> setters, out MethodInfo getter, out MethodInfo setter)
644List<KeyValuePair<MethodInfo, MethodInfo>> candidates =
709List<MethodInfo> setters = LookupStaticSetters(name);
710List<MethodInfo> getters = LookupStaticGetters(name);
726List<MethodInfo> adders = LookupStaticAdders(name);
735private void LookupAllStaticAccessors(out Dictionary<string, List<MethodInfo>> getters,
736out Dictionary<string, List<MethodInfo>> setters, out Dictionary<string, List<MethodInfo>> adders)
738getters = new Dictionary<string, List<MethodInfo>>();
739setters = new Dictionary<string, List<MethodInfo>>();
740adders = new Dictionary<string, List<MethodInfo>>();
754private void LookupAllStaticAccessorsHelper(MethodInfo[] allMethods, Dictionary<string, List<MethodInfo>> getters,
755Dictionary<string, List<MethodInfo>> setters, Dictionary<string, List<MethodInfo>> adders, bool isUnderlyingTypePublic)
778private List<MethodInfo> LookupStaticAdders(string name)
782List<MethodInfo> preferredAdders, otherAdders;
787private List<MethodInfo> LookupStaticGetters(string name)
790List<MethodInfo> preferredGetters, otherGetters;
795private List<MethodInfo> LookupStaticSetters(string name)
798List<MethodInfo> preferredSetters, otherSetters;
805private void PrioritizeAccessors(MemberInfo[] accessors, bool isEvent, bool isGetter, out List<MethodInfo> preferredAccessors, out List<MethodInfo> otherAccessors)
866private static void AddToMultiDict(Dictionary<string, List<MethodInfo>> dict, string name, MethodInfo value, bool isUnderlyingTypePublic)
868List<MethodInfo> list;
989List<XamlMember> result = new List<XamlMember>();
991Dictionary<string, List<MethodInfo>> getters;
992Dictionary<string, List<MethodInfo>> setters;
993Dictionary<string, List<MethodInfo>> adders;
1001private void GetOrCreateAttachableProperties(XamlSchemaContext schemaContext, List<XamlMember> result,
1002Dictionary<string, List<MethodInfo>> getters, Dictionary<string, List<MethodInfo>> setters)
1004foreach (KeyValuePair<string, List<MethodInfo>> nameAndSetterList in setters)
1010List<MethodInfo> getterList;
1031foreach (KeyValuePair<string, List<MethodInfo>> nameAndGetterList in getters)
1045List<XamlMember> result, Dictionary<string, List<MethodInfo>> adders)
1047foreach (KeyValuePair<string, List<MethodInfo>> nameAndAdderList in adders)
1189List<K> listOfNulls = null;
System.Xaml.Tests (66)
System\Xaml\Schema\XamlTypeInvokerTests.cs (9)
62var instance = new List<string>();
98var invoker = new XamlTypeInvoker(new XamlType(typeof(List<int>), new XamlSchemaContext()));
243new XamlTypeInvoker(new XamlType(typeof(List<int>), new XamlSchemaContext())),
249new XamlTypeInvoker(new XamlType(typeof(List<Array>), new XamlSchemaContext())),
255new XamlTypeInvoker(new XamlType(typeof(List<Array>), new XamlSchemaContext())),
261new XamlTypeInvoker(new XamlType(typeof(List<int>), new XamlSchemaContext())),
469new XamlTypeInvoker(new XamlType(typeof(List<int>), new XamlSchemaContext())),
511var instance = new List<int> { 1 };
546public List<object> List { get; } = new List<object>();
System\Xaml\XamlSchemaContextTests.cs (14)
606new XamlTypeName("clr-namespace:System.Collections.Generic;assembly=" + Name(typeof(List<>).Assembly), "List", new XamlTypeName[]
610new XamlType(typeof(List<int>), new XamlSchemaContext())
614new XamlTypeName("clr-namespace:System.Collections.Generic;assembly=" + Name(typeof(List<>).Assembly), "List[]", new XamlTypeName[]
618new XamlType(typeof(List<int>[]), new XamlSchemaContext())
622new XamlTypeName("clr-namespace:System.Collections.Generic;assembly=" + Name(typeof(List<>).Assembly), "List[][,]", new XamlTypeName[]
626new XamlType(typeof(List<int>[,][]), new XamlSchemaContext())
630new XamlTypeName("clr-namespace:System.Collections.Generic;assembly=" + Name(typeof(List<>).Assembly), "List[ ] [ , ]", new XamlTypeName[]
634new XamlType(typeof(List<int>[,][]), new XamlSchemaContext())
638new XamlTypeName("clr-namespace:System.Collections.Generic;assembly=" + Name(typeof(List<>).Assembly), "List[, ,]", new XamlTypeName[]
642new XamlType(typeof(List<int>[,,]), new XamlSchemaContext())
646new XamlTypeName("clr-namespace:System.Collections.Generic;assembly=" + Name(typeof(List<>).Assembly), "NoSuchType", new XamlTypeName[]
654new XamlTypeName("clr-namespace:System.Collections.Generic;assembly=" + Name(typeof(List<>).Assembly), "List", new XamlTypeName[]
665new XamlTypeName("clr-namespace:System.Collections.Generic;assembly=" + Name(typeof(List<>).Assembly), invalidArrayName, new XamlTypeName[]
846var xamlTypeName = new XamlTypeName("clr-namespace:System.Collections.Generic;assembly=" + typeof(List<int>).Assembly.FullName, "List", new XamlTypeName[]
System\Xaml\XamlTypeTests.cs (37)
83yield return new object?[] { typeof(List<int>), new XamlSchemaContext(), "List", new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) } };
84yield return new object?[] { typeof(List<int>[][]), new XamlSchemaContext(), "List[][]", new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) } };
103yield return new object?[] { typeof(List<int>), new XamlSchemaContext(), XamlTypeInvoker.UnknownInvoker, "List", new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) } };
104yield return new object?[] { typeof(List<int>[][]), new XamlSchemaContext(), null, "List[][]", new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) } };
972public static List<int>? GetGetOnlyListProperty(int value) => null;
1017public static List<int>? GetGetOnlyListProperty(int value) => null;
1106public static List<int>? GetListProperty(string value1) => null;
1121internal static List<int>? GetListProperty(string value1) => null;
1136public static List<int>? GetListProperty(string value1) => null;
1259public List<int>? GetOnlyListProperty { get; }
1349yield return new object?[] { new SubXamlType(typeof(List<int>), new XamlSchemaContext()), new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) } };
1355new CustomXamlType(typeof(List<string>), new XamlSchemaContext())
1366new CustomXamlType(typeof(List<string>), new XamlSchemaContext())
1411new SubXamlType(new ThrowsCustomAttributeFormatExceptionDelegator(typeof(List<string>)), new XamlSchemaContext()),
1444var type = new CustomXamlType(typeof(List<int>), new XamlSchemaContext())
1458var type = new CustomXamlType(typeof(List<int>), new XamlSchemaContext())
1472var type = new CustomXamlType(typeof(List<int>), new XamlSchemaContext())
1502var type = new SubXamlType(new CustomType(typeof(List<int>))
1756yield return new object?[] { new SubXamlType(typeof(List<int>), new XamlSchemaContext()), XamlCollectionKind.Collection };
2143yield return new object?[] { new SubXamlType(typeof(List<int>), new XamlSchemaContext()), null };
2149new CustomXamlType(typeof(List<string>), new XamlSchemaContext())
2160new CustomXamlType(typeof(List<string>), new XamlSchemaContext())
2199new SubXamlType(new ThrowsCustomAttributeFormatExceptionDelegator(typeof(List<string>)), new XamlSchemaContext()),
2232var type = new CustomXamlType(typeof(List<int>), new XamlSchemaContext())
2246var type = new CustomXamlType(typeof(List<int>), new XamlSchemaContext())
2260var type = new CustomXamlType(typeof(List<int>), new XamlSchemaContext())
2281var type = new SubXamlType(new CustomType(typeof(List<int>))
2460var type = new SubXamlType(new CustomType(typeof(List<int>))
2660yield return new object[] { new SubXamlType(typeof(List<>), new XamlSchemaContext()), false };
2661yield return new object[] { new SubXamlType(typeof(List<>).GetTypeInfo().GenericTypeParameters[0], new XamlSchemaContext()), false };
2662yield return new object[] { new SubXamlType(typeof(List<int>), new XamlSchemaContext()), true };
2786yield return new object[] { new SubXamlType(typeof(List<int>), new XamlSchemaContext()), true };
2991yield return new object?[] { new SubXamlType(typeof(List<int>), new XamlSchemaContext()), new XamlType(typeof(int), new XamlSchemaContext()) };
3010new CustomXamlType(typeof(List<int>), new XamlSchemaContext())
3046yield return new object?[] { new SubXamlType(typeof(List<int>), new XamlSchemaContext()), null };
4359var type = new SubXamlType(new CustomType(typeof(List<int>))
4767var type = new SubXamlType(new CustomType(typeof(List<int>))
Templates.Blazor.Tests (33)
Templates.Blazor.WebAssembly.Auth.Tests (34)
Templates.Blazor.WebAssembly.Tests (34)
Templates.Mvc.Tests (39)
Templates.Tests (35)
Test.Utilities (118)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (2)
24public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
43public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\CompatAbstractFormattingRule.cs (6)
25public sealed override void AddAnchorIndentationOperations(List<AnchorIndentationOperation> list, SyntaxNode node, in NextAnchorIndentationOperationAction nextOperation)
33public sealed override void AddIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode node, in NextIndentBlockOperationAction nextOperation)
41public sealed override void AddAlignTokensOperations(List<AlignTokensOperation> list, SyntaxNode node, in NextAlignTokensOperationAction nextOperation)
78public virtual void AddAnchorIndentationOperationsSlow(List<AnchorIndentationOperation> list, SyntaxNode node, ref NextAnchorIndentationOperationAction nextOperation)
84public virtual void AddIndentBlockOperationsSlow(List<IndentBlockOperation> list, SyntaxNode node, ref NextIndentBlockOperationAction nextOperation)
90public virtual void AddAlignTokensOperationsSlow(List<AlignTokensOperation> list, SyntaxNode node, ref NextAlignTokensOperationAction nextOperation)
TestDiscoveryWorker (1)
TestPassApp (2)
TestProject.AppHost (1)
Text.Analyzers (139)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (2)
24public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
43public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\CompatAbstractFormattingRule.cs (6)
25public sealed override void AddAnchorIndentationOperations(List<AnchorIndentationOperation> list, SyntaxNode node, in NextAnchorIndentationOperationAction nextOperation)
33public sealed override void AddIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode node, in NextIndentBlockOperationAction nextOperation)
41public sealed override void AddAlignTokensOperations(List<AlignTokensOperation> list, SyntaxNode node, in NextAlignTokensOperationAction nextOperation)
78public virtual void AddAnchorIndentationOperationsSlow(List<AnchorIndentationOperation> list, SyntaxNode node, ref NextAnchorIndentationOperationAction nextOperation)
84public virtual void AddIndentBlockOperationsSlow(List<IndentBlockOperation> list, SyntaxNode node, ref NextIndentBlockOperationAction nextOperation)
90public virtual void AddAlignTokensOperationsSlow(List<AlignTokensOperation> list, SyntaxNode node, ref NextAlignTokensOperationAction nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
86var result = new List<ITypeSymbol>
UIAutomationClientSideProviders (18)
MS\Internal\AutomationProxies\ClickablePoint.cs (11)
53internal static bool GetPoint(IntPtr hwnd, List<CPRect> listIn, List<CPRect> listOut, ref NativeMethods.Win32Point pt)
136internal static void ExcludeChildren(ProxyFragment fragment, List<CPRect> listIn, List<CPRect> listOut)
231private static bool ClickableInRect(IntPtr hwnd, ref NativeMethods.Win32Point pt, bool fRiAsInsideRect, List<CPRect> listIn, List<CPRect> listOut)
299private static void SplitVertical(ref CPRect ro, ref CPRect ri, int left, int right, List<CPRect> rectList, bool fRiAsInsideRect)
353private static void SplitRect(ref CPRect ro, CPRect ri, List<CPRect> rectList, bool fRiAsInsideRect)
416private static void SplitRect(List<CPRect> listIn, ref CPRect ri, List<CPRect> listOut, bool fRiAsInsideRect)
436private static bool GetClickablePoint(List<CPRect> rectList, out int x, out int y)
UnitTests.Common (5)
vbc (6)
VBCSCompiler (15)
VBCSCompiler.UnitTests (22)
WaitForSandbox.ApiService (1)
Wasm.Performance.ConsoleHost (10)
Wasm.Performance.Driver (4)
Wasm.Performance.TestApp (24)
WindowsBase.Tests (129)
System\Windows\DependencyPropertyTests.cs (50)
16yield return new object?[] { "Register_String_Type_Type_TestData4", typeof(List<int>), typeof(DependencyObjectTests), null };
57yield return new object?[] { "Register_String_Type_Type_PropertyMetadata_TestData15", typeof(List<int>), typeof(DependencyObjectTests), null, null };
58yield return new object?[] { "Register_String_Type_Type_PropertyMetadata_TestData16", typeof(List<int>), typeof(DependencyObject), new PropertyMetadata(), null };
59yield return new object?[] { "Register_String_Type_Type_PropertyMetadata_TestData17", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata(), null };
60yield return new object?[] { "Register_String_Type_Type_PropertyMetadata_TestData18", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new List<int>() }, new List<int>() };
109yield return new object?[] { "Register_String_Type_Type_Validate_TestData15", typeof(List<int>), typeof(DependencyObjectTests), null, null, 1 };
110yield return new object?[] { "Register_String_Type_Type_Validate_TestData16", typeof(List<int>), typeof(DependencyObject), new PropertyMetadata(), null, 1 };
111yield return new object?[] { "Register_String_Type_Type_Validate_TestData17", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata(), null, 1 };
112yield return new object?[] { "Register_String_Type_Type_Validate_TestData18", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new List<int>() }, new List<int>(), 2 };
169yield return new object?[] { "Register_String_Type_Type_PropertyMetadata_NullValidate_TestData15", typeof(List<int>), typeof(DependencyObjectTests), null, null };
170yield return new object?[] { "Register_String_Type_Type_PropertyMetadata_NullValidate_TestData16", typeof(List<int>), typeof(DependencyObject), new PropertyMetadata(), null };
171yield return new object?[] { "Register_String_Type_Type_PropertyMetadata_NullValidate_TestData17", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata(), null };
172yield return new object?[] { "Register_String_Type_Type_PropertyMetadata_NullValidate_TestData18", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new List<int>() }, new List<int>() };
327yield return new object?[] { "RegisterAttached_String_Type_Type_TestData4", typeof(List<int>), typeof(DependencyObjectTests), null };
368yield return new object?[] { "RegisterAttached_String_Type_Type_PropertyMetadata_TestData15", typeof(List<int>), typeof(DependencyObjectTests), null, null };
369yield return new object?[] { "RegisterAttached_String_Type_Type_PropertyMetadata_TestData16", typeof(List<int>), typeof(DependencyObject), new PropertyMetadata(), null };
370yield return new object?[] { "RegisterAttached_String_Type_Type_PropertyMetadata_TestData17", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata(), null };
371yield return new object?[] { "RegisterAttached_String_Type_Type_PropertyMetadata_TestData18", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new List<int>() }, new List<int>() };
422yield return new object?[] { "RegisterAttached_String_Type_Type_Validate_TestData15", typeof(List<int>), typeof(DependencyObjectTests), null, null };
423yield return new object?[] { "RegisterAttached_String_Type_Type_Validate_TestData16", typeof(List<int>), typeof(DependencyObject), new PropertyMetadata(), null };
424yield return new object?[] { "RegisterAttached_String_Type_Type_Validate_TestData17", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata(), null };
425yield return new object?[] { "RegisterAttached_String_Type_Type_Validate_TestData18", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new List<int>() }, new List<int>() };
482yield return new object?[] { "RegisterAttached_String_Type_Type_PropertyMetadata_NullValidate_TestData15", typeof(List<int>), typeof(DependencyObjectTests), null, null };
483yield return new object?[] { "RegisterAttached_String_Type_Type_PropertyMetadata_NullValidate_TestData16", typeof(List<int>), typeof(DependencyObject), new PropertyMetadata(), null };
484yield return new object?[] { "RegisterAttached_String_Type_Type_PropertyMetadata_NullValidate_TestData17", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata(), null };
485yield return new object?[] { "RegisterAttached_String_Type_Type_PropertyMetadata_NullValidate_TestData18", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new List<int>() }, new List<int>() };
644yield return new object?[] { "RegisterReadOnly_String_Type_Type_PropertyMetadata_TestData15", typeof(List<int>), typeof(DependencyObject), null, null };
645yield return new object?[] { "RegisterReadOnly_String_Type_Type_PropertyMetadata_TestData16", typeof(List<int>), typeof(DependencyObject), new PropertyMetadata(), null };
646yield return new object?[] { "RegisterReadOnly_String_Type_Type_PropertyMetadata_TestData17", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata(), null };
647yield return new object?[] { "RegisterReadOnly_String_Type_Type_PropertyMetadata_TestData18", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new List<int>() }, new List<int>() };
700yield return new object?[] { "RegisterReadOnly_String_Type_Type_Validate_TestData15", typeof(List<int>), typeof(DependencyObject), null, null, 4 };
701yield return new object?[] { "RegisterReadOnly_String_Type_Type_Validate_TestData16", typeof(List<int>), typeof(DependencyObject), new PropertyMetadata(), null, 2 };
702yield return new object?[] { "RegisterReadOnly_String_Type_Type_Validate_TestData17", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata(), null, 2 };
703yield return new object?[] { "RegisterReadOnly_String_Type_Type_Validate_TestData18", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new List<int>() }, new List<int>(), 2 };
764yield return new object?[] { "RegisterReadOnly_String_Type_Type_PropertyMetadata_NullValidate_TestData15", typeof(List<int>), typeof(DependencyObject), null, null };
765yield return new object?[] { "RegisterReadOnly_String_Type_Type_PropertyMetadata_NullValidate_TestData16", typeof(List<int>), typeof(DependencyObject), new PropertyMetadata(), null };
766yield return new object?[] { "RegisterReadOnly_String_Type_Type_PropertyMetadata_NullValidate_TestData17", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata(), null };
767yield return new object?[] { "RegisterReadOnly_String_Type_Type_PropertyMetadata_NullValidate_TestData18", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new List<int>() }, new List<int>() };
937yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_PropertyMetadata_TestData15", typeof(List<int>), typeof(DependencyObjectTests), null, null };
938yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_PropertyMetadata_TestData16", typeof(List<int>), typeof(DependencyObject), new PropertyMetadata(), null };
939yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_PropertyMetadata_TestData17", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata(), null };
940yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_PropertyMetadata_TestData18", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new List<int>() }, new List<int>() };
995yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_Validate_TestData15", typeof(List<int>), typeof(DependencyObjectTests), null, null, 2 };
996yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_Validate_TestData16", typeof(List<int>), typeof(DependencyObject), new PropertyMetadata(), null, 1 };
997yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_Validate_TestData17", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata(), null, 1 };
998yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_Validate_TestData18", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new List<int>() }, new List<int>(), 1 };
1059yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_PropertyMetadata_NullValidate_TestData15", typeof(List<int>), typeof(DependencyObjectTests), null, null };
1060yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_PropertyMetadata_NullValidate_TestData16", typeof(List<int>), typeof(DependencyObject), new PropertyMetadata(), null };
1061yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_PropertyMetadata_NullValidate_TestData17", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata(), null };
1062yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_PropertyMetadata_NullValidate_TestData18", typeof(List<int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new List<int>() }, new List<int>() };
System\Windows\Markup\Primitives\MarkupPropertyTests.cs (17)
28List<MarkupProperty> properties = obj.Properties.ToList();
62List<MarkupProperty> properties = obj.Properties.ToList();
87var instance = new List<int> { 1, 2, 3 };
93Assert.Equal(typeof(List<int>), obj.ObjectType);
97List<MarkupProperty> properties = obj.Properties.ToList();
156List<MarkupProperty> properties = obj.Properties.ToList();
181var list = new List<int> { 1, 2, 3 };
192List<MarkupProperty> properties = obj.Properties.ToList();
230List<MarkupProperty> properties = obj.Properties.ToList();
269List<MarkupProperty> properties = obj.Properties.ToList();
294var list = new List<int> { 1, 2, 3 };
308List<MarkupProperty> properties = obj.Properties.ToList();
352List<MarkupProperty> properties = obj.Properties.ToList();
387List<MarkupProperty> properties = obj.Properties.ToList();
451var instance = new List<int> { 1, 2, 3 };
474var list = new List<int> { 1, 2, 3 };
509var list = new List<int> { 1, 2, 3 };
WindowsFormsIntegration (3)
WinFormsControlsTest (5)
XmlFileLogger (5)
XmlFormattersWebSite (6)
xunit.assert (12)
xunit.console (57)
Xunit.NetCore.Extensions (8)