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)
12037 instantiations of List
AnalyzerRunner (3)
ApiExplorerWebSite (5)
ApplicationModelWebSite (2)
aspire (10)
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.Cli.Tests (3)
Aspire.Components.Common.TestUtilities (3)
Aspire.Confluent.Kafka.Tests (2)
Aspire.Dashboard (77)
Aspire.Dashboard.Components.Tests (13)
Aspire.Dashboard.Tests (26)
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 (1)
Aspire.Hosting (48)
Aspire.Hosting.Analyzers (1)
Aspire.Hosting.Azure (7)
Aspire.Hosting.Azure.AppService (1)
Aspire.Hosting.Azure.CosmosDB (1)
Aspire.Hosting.Azure.Functions (2)
Aspire.Hosting.Azure.WebPubSub (1)
Aspire.Hosting.Docker (2)
Aspire.Hosting.Garnet (1)
Aspire.Hosting.Nats (1)
Aspire.Hosting.Nats.Tests (1)
Aspire.Hosting.PostgreSQL (1)
Aspire.Hosting.Redis (1)
Aspire.Hosting.Testing.Tests (3)
Aspire.Hosting.Tests (17)
Aspire.Hosting.Valkey (1)
Aspire.Hosting.Yarp (6)
Aspire.Hosting.Yarp.Tests (4)
Aspire.Microsoft.Azure.Cosmos (1)
Aspire.Microsoft.Data.SqlClient (1)
Aspire.Microsoft.EntityFrameworkCore.Cosmos (1)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
Aspire.Oracle.EntityFrameworkCore.Tests (1)
Aspire.Playground.Tests (1)
Aspire.RabbitMQ.Client (1)
Aspire.RuntimeIdentifier.Tool (1)
Aspire.StackExchange.Redis (1)
Aspire.Templates.Tests (2)
Aspire.TestUtilities (1)
AzureAppService.ApiService (1)
AzureContainerApps.ApiService (1)
AzureStorageEndToEnd.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 (7)
CodeGenerator (1)
ConfigurationSchemaGenerator (13)
Cookies (1)
CookieSessionSample (1)
CosmosEndToEnd.ApiService (1)
Crossgen2Tasks (6)
csc (3)
CSharpErrorFactsGenerator (4)
CSharpSyntaxGenerator (7)
CustomCheck (2)
CustomCheck2 (1)
CustomPolicyProvider (1)
DemoConsole (2)
Diagnostics.EFCore.FunctionalTests (8)
dotnet-dev-certs (17)
dotnet-getdocument (7)
dotnet-openapi (6)
dotnet-razorpagegenerator (1)
dotnet-sql-cache (6)
dotnet-svcutil (1)
dotnet-svcutil.xmlserializer (11)
dotnet-svcutil-lib (255)
dotnet-svcutil-lib.Tests (5)
dotnet-user-jwts (14)
dotnet-user-secrets (6)
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 (7)
HeaderPropagationSample (1)
HtmlGenerationWebSite (8)
http2cat (2)
IdeBenchmarks (1)
IdeCoreBenchmarks (4)
Identity.DefaultUI.WebSite (8)
IdentitySample.PasskeyConformance (6)
IdentitySample.PasskeyUI (6)
IIS.Common.TestLib (1)
IIS.FunctionalTests (12)
IIS.LongTests (6)
IIS.NewHandler.FunctionalTests (6)
IIS.NewShim.FunctionalTests (6)
IIS.ShadowCopy.Tests (4)
IIS.Tests (1)
IISExpress.FunctionalTests (15)
illink (77)
ILLink.RoslynAnalyzer (5)
Infrastructure.Common (7)
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 (3)
Microsoft.AspNetCore.Antiforgery.Test (2)
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.WsFederation (3)
Microsoft.AspNetCore.Authorization (5)
Microsoft.AspNetCore.Authorization.Test (3)
Microsoft.AspNetCore.BrowserTesting (6)
Microsoft.AspNetCore.Components (32)
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 (25)
Microsoft.AspNetCore.Components.Endpoints.Tests (63)
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.SdkAnalyzers (2)
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (2)
Microsoft.AspNetCore.Components.Server (12)
Microsoft.AspNetCore.Components.Server.Tests (21)
Microsoft.AspNetCore.Components.Tests (45)
Microsoft.AspNetCore.Components.Web (3)
Microsoft.AspNetCore.Components.Web.Tests (9)
Microsoft.AspNetCore.Components.WebAssembly (16)
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 (20)
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 (9)
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.Extensions.Tests (59)
RequestDelegateFactoryTests.cs (25)
88return new List<object[]>
108EndpointBuilder = CreateEndpointBuilderFromFilterFactories(new List<Func<EndpointFilterFactoryContext, EndpointFilterDelegate, EndpointFilterDelegate>>()
1323return new List<object[]>
1444return new List<object[]>
1498return new List<object[]>
1535return new List<object?[]>
1716return new List<object?[]>
1887return new List<object?[]>
2168EndpointBuilder = CreateEndpointBuilderFromFilterFactories(new List<Func<EndpointFilterFactoryContext, EndpointFilterDelegate, EndpointFilterDelegate>>()
2211EndpointBuilder = CreateEndpointBuilderFromFilterFactories(new List<Func<EndpointFilterFactoryContext, EndpointFilterDelegate, EndpointFilterDelegate>>()
2283EndpointBuilder = CreateEndpointBuilderFromFilterFactories(new List<Func<EndpointFilterFactoryContext, EndpointFilterDelegate, EndpointFilterDelegate>>()
2378EndpointBuilder = CreateEndpointBuilderFromFilterFactories(new List<Func<EndpointFilterFactoryContext, EndpointFilterDelegate, EndpointFilterDelegate>>()
2412EndpointBuilder = CreateEndpointBuilderFromFilterFactories(new List<Func<EndpointFilterFactoryContext, EndpointFilterDelegate, EndpointFilterDelegate>>()
2497EndpointBuilder = CreateEndpointBuilderFromFilterFactories(new List<Func<EndpointFilterFactoryContext, EndpointFilterDelegate, EndpointFilterDelegate>>()
2560var options = new RequestDelegateFactoryOptions { EndpointBuilder = CreateEndpointBuilder(new List<object> { customMetadata }) };
2675EndpointBuilder = CreateEndpointBuilder(new List<object>
2697EndpointBuilder = CreateEndpointBuilder(new List<object>
2720EndpointBuilder = CreateEndpointBuilder(new List<object>
2743EndpointBuilder = CreateEndpointBuilder(new List<object>
2766EndpointBuilder = CreateEndpointBuilder(new List<object>
2787EndpointBuilder = CreateEndpointBuilder(new List<object>
2808EndpointBuilder = CreateEndpointBuilder(new List<object>
2871var metadataResult = new RequestDelegateMetadataResult { EndpointMetadata = new List<object>() };
3051EndpointBuilder = CreateEndpointBuilderFromFilterFactories(new List<Func<EndpointFilterFactoryContext, EndpointFilterDelegate, EndpointFilterDelegate>>()
3094EndpointBuilder = CreateEndpointBuilderFromFilterFactories(new List<Func<EndpointFilterFactoryContext, EndpointFilterDelegate, EndpointFilterDelegate>>()
Microsoft.AspNetCore.Http.Features (2)
Microsoft.AspNetCore.Http.Microbenchmarks (5)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (4)
Microsoft.AspNetCore.Http.Results.Tests (45)
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 (4)
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 (21)
Microsoft.AspNetCore.Identity.UI (1)
Microsoft.AspNetCore.InternalTesting (2)
Microsoft.AspNetCore.JsonPatch (9)
Microsoft.AspNetCore.JsonPatch.SystemTextJson (6)
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (78)
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 };
454var targetObject = new List<int>() { 10, 20 };
470var targetObject = new List<int>() { 10, 20 };
487var targetObject = new List<int>() { 10, 20 };
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 (27)
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>()
1558FilterDescriptors = new List<FilterDescriptor>(),
1559Parameters = new List<ParameterDescriptor>(),
1560BoundProperties = new List<ParameterDescriptor>(),
1608FilterDescriptors = new List<FilterDescriptor>(),
1609Parameters = new List<ParameterDescriptor>(),
1610BoundProperties = new List<ParameterDescriptor>(),
1650FilterDescriptors = new List<FilterDescriptor>(),
1651Parameters = new List<ParameterDescriptor>(),
1652BoundProperties = new List<ParameterDescriptor>(),
1690valueProviderFactories = 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>>(),
1586BoundProperties = new List<ParameterDescriptor>(),
1594Parameters = new List<HandlerParameterDescriptor>(),
1600Parameters = new List<HandlerParameterDescriptor>(),
1614BoundProperties = new List<ParameterDescriptor>(),
1622Parameters = new List<HandlerParameterDescriptor>(),
1628Parameters = new List<HandlerParameterDescriptor>(),
1642BoundProperties = new List<ParameterDescriptor>(),
1650Parameters = new List<HandlerParameterDescriptor>(),
1656Parameters = 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.SourceGenerators.Tests (2)
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 (22)
Microsoft.AspNetCore.SignalR.Client.Core (4)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (6)
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (6)
Microsoft.AspNetCore.SignalR.Client.Tests (23)
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)
65var sendTask = manager.SendAllExceptAsync("Hello", new object[] { "World" }, new List<string> { connection1.ConnectionId }, cts.Token).DefaultTimeout();
111var sendTask = manager.SendConnectionsAsync(new List<string> { connection1.ConnectionId }, "Hello", new object[] { "World" }, cts.Token).DefaultTimeout();
161var sendTask = manager.SendGroupExceptAsync("group", "Hello", new object[] { "World" }, new List<string> { connection1.ConnectionId }, cts.Token).DefaultTimeout();
186var sendTask = manager.SendGroupsAsync(new List<string> { "group" }, "Hello", new object[] { "World" }, cts.Token).DefaultTimeout();
241var 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 (3)
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 (333)
Microsoft.Build.BuildCheck.UnitTests (32)
EndToEndTests.cs (14)
542PrepareSampleProjectsAndConfig(buildInOutOfProcessNode, out TransientTestFile projectFile, new List<(string, string)>() { ("BC0101", "warning") });
578PrepareSampleProjectsAndConfig(buildInOutOfProcessNode, out TransientTestFile projectFile, new List<(string, string)>() { ("BC0101", BC0101Severity) });
632PrepareSampleProjectsAndConfig(true, out TransientTestFile projectFile, new List<(string, string)>() { ("BC0101", BC0101Severity) });
667new List<(string, string)>() { ("X01234", severity) },
668new List<(string, (string, string))>
692PrepareSampleProjectsAndConfig(buildInOutOfProcessNode, out TransientTestFile projectFile, new List<(string, string)>() { ("BC0101", "warning") });
736customConfigData = new List<(string, (string, string))>()
745new List<(string, string)>() { ("BC0103", "error") },
773customConfigData = new List<(string, (string, string))>()
781new List<(string, string)>() { ("BC0103", "error") },
806new List<(string, string)>() { ("BC0103", "warning") });
878new List<(string, string)>() { (ruleId, severity) },
907new List<(string, string)>() { (ruleId, "warning") },
929PrepareSampleProjectsAndConfig(buildInOutOfProcessNode, out TransientTestFile projectFile, new List<(string, string)>() { ("BC0101", "warning") });
Microsoft.Build.CommandLine.UnitTests (56)
CommandLineSwitches_Tests.cs (17)
601MSBuildApp.GatherCommandLineSwitches(new List<string>() { "/targets:targets.txt" }, switches);
611MSBuildApp.GatherCommandLineSwitches(new List<string>() { "/targets /targets" }, switches);
689MSBuildApp.GatherCommandLineSwitches(new List<string> { "/graph", "/graph:true; NoBuild ;; ;", "/graph:foo" }, switches);
701MSBuildApp.GatherCommandLineSwitches(new List<string> { "/graph" }, switches);
713MSBuildApp.GatherCommandLineSwitches(new List<string>() { "/irc", "/irc:a;b", "/irc:c;d" }, switches);
725MSBuildApp.GatherCommandLineSwitches(new List<string>() { "/orc:a" }, switches);
737MSBuildApp.GatherCommandLineSwitches(new List<string>() { "/orc:a", "/orc:b" }, switches);
1266MSBuildApp.GatherCommandLineSwitches(new List<string>(new[] { "" }), commandLineSwitches);
1281MSBuildApp.GatherCommandLineSwitches(new List<string>(new[]
1306MSBuildApp.GatherCommandLineSwitches(new List<string>(new[]
1329MSBuildApp.GatherCommandLineSwitches(new List<string>(new[]
1351MSBuildApp.GatherCommandLineSwitches(new List<string>(new[] { "/warnaserror" }), commandLineSwitches);
1370MSBuildApp.GatherCommandLineSwitches(new List<string>(new[] { "/warnasmessage" }), commandLineSwitches, command);
1388MSBuildApp.GatherCommandLineSwitches(new List<string>() { "validProject.csproj", "%ENVIRONMENTVARIABLE%" }, commandLineSwitches, fullCommandLine);
1393MSBuildApp.GatherCommandLineSwitches(new List<string>() { "%ENVIRONMENTVARIABLE%", "validProject.csproj" }, commandLineSwitches, fullCommandLine);
1408MSBuildApp.GatherCommandLineSwitches(new List<string>(new[]
1433MSBuildApp.GatherCommandLineSwitches(new List<string>(new[] { "/profileevaluation" }), commandLineSwitches);
Microsoft.Build.Engine.OM.UnitTests (117)
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 (313)
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));
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)
308var projectsInCycle = new List<string> { entryProject.Path, proj3.Path, proj2.Path, entryProject.Path };
342var projectsInCycle = new List<string> { proj2.Path, proj3.Path, proj7.Path, proj6.Path, proj2.Path };
1115IReadOnlyDictionary<ProjectGraphNode, ImmutableList<string>> targetLists = projectGraph.GetTargetLists(new List<string> { "A" });
1156IReadOnlyDictionary<ProjectGraphNode, ImmutableList<string>> targetLists = projectGraph.GetTargetLists(new List<string> { "A" });
1190IReadOnlyDictionary<ProjectGraphNode, ImmutableList<string>> targetLists = projectGraph.GetTargetLists(new List<string> { "A" });
1362IReadOnlyDictionary<ProjectGraphNode, ImmutableList<string>> targetLists = projectGraph.GetTargetLists(new List<string> { "A" });
Microsoft.Build.Framework (25)
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 (203)
Microsoft.Build.Tasks.UnitTests (31)
Microsoft.Build.UnitTests.Shared (35)
Microsoft.Build.Utilities.Core (55)
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 (33)
Microsoft.CodeAnalysis.CSharp.CodeStyle (6)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (13)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (7)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (180)
Completion\CompletionProviders\ExtensionMethodImportCompletionProviderTests.cs (9)
57=> CombineWithReferenceTypeData((new[] { "class", "struct", "interface", "enum", "abstract class" }).Select(kind => new List<object>() { kind }));
63var predefinedTypes = new List<string>() { "string", "String", "System.String" };
72yield return new List<object>() { type1 + suffix, type2 + suffix };
489}).Select(tuple => new List<object>() { tuple }));
529=> CombineWithReferenceTypeData((new[] { "class", "interface", "abstract class" }).Select(kind => new List<object>() { kind }));
578}).Select(tuple => new List<object>() { tuple }));
625}).Select(tuple => new List<object>() { tuple }));
870var predefinedTypes = new List<(string vbType, string csType)>
2028var 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 (38)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (9)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (87)
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)
1929references: new List<MetadataReference>() { MscorlibRef_v4_0_30316_17626, SystemCoreRef, CSharpRef },
1946references: new List<MetadataReference>() { MscorlibRef_v4_0_30316_17626, SystemCoreRef, CSharpRef, reference.EmitToImageReference() },
1963references: new List<MetadataReference>() { MscorlibRef_v4_0_30316_17626, SystemCoreRef, CSharpRef },
1980references: new List<MetadataReference>() { MscorlibRef_v4_0_30316_17626, SystemCoreRef, CSharpRef, reference.EmitToImageReference() },
2007references: new List<MetadataReference>() { MscorlibRef_v4_0_30316_17626, SystemCoreRef, CSharpRef },
2024references: new List<MetadataReference>() { MscorlibRef_v4_0_30316_17626, SystemCoreRef, CSharpRef, reference.EmitToImageReference() },
2048references: new List<MetadataReference>() { MscorlibRef_v4_0_30316_17626, SystemCoreRef, CSharpRef },
2065references: 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>()
14891new List<MetadataReference> { reference },
17690var comp = CreateCompilation(new[] { text }, new List<MetadataReference> { ref1 });
17728var comp = CreateCompilation(new[] { text }, new List<MetadataReference> { ref1 });
17971var 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)
2036synList = new List<SyntaxNode>();
2163var nodeList = new List<TNode>();
2786references: new List<MetadataReference>() { NetFramework.mscorlib, NetFramework.SystemCore, NetFramework.MicrosoftCSharp },
2793references: new List<MetadataReference>() { NetFramework.mscorlib, NetFramework.SystemCore, NetFramework.MicrosoftCSharp, reference.EmitToImageReference() },
2805references: new List<MetadataReference>() { MscorlibRef_v4_0_30316_17626, SystemCoreRef, CSharpRef },
2820references: new List<MetadataReference>() { reference.EmitToImageReference() },
2831references: new List<MetadataReference>() { reference.EmitToImageReference() },
2842references: new List<MetadataReference>() { reference.EmitToImageReference() },
2859references: new List<MetadataReference>() { reference.EmitToImageReference() },
2877references: new List<MetadataReference>() { reference.EmitToImageReference() },
3107return new List<object[]>()
3119return new List<object[]>()
3131return new List<object[]>()
Microsoft.CodeAnalysis.CSharp.Workspaces (33)
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.Razor.Features (1)
Microsoft.CodeAnalysis.ExternalAccess.Xaml (1)
Microsoft.CodeAnalysis.Features (45)
Microsoft.CodeAnalysis.Features.Test.Utilities (7)
Microsoft.CodeAnalysis.Features.UnitTests (1)
Microsoft.CodeAnalysis.InteractiveHost (4)
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
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 (57)
Microsoft.CodeAnalysis.Threading.Package (1)
Microsoft.CodeAnalysis.UnitTests (36)
Collections\HashSet\SegmentedHashSet_Generic_Tests`1.cs (2)
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) };
Microsoft.CodeAnalysis.VisualBasic (2)
Microsoft.CodeAnalysis.Workspaces (56)
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 (3)
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 (4)
Microsoft.DotNet.Build.Tasks.Feed.Tests (9)
Microsoft.DotNet.Build.Tasks.Installers (1)
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.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 (144)
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (5)
Microsoft.DotNet.SwaggerGenerator.MSBuild (1)
Microsoft.DotNet.XliffTasks (3)
Microsoft.DotNet.XliffTasks.Tests (1)
Microsoft.DotNet.XUnitAssert.Tests (152)
AsyncCollectionAssertsTests.cs (40)
60 var indices = new List<int>();
112 var indices = new List<int>();
125 var list = new List<int>().ToAsyncEnumerable();
135 var list = new List<int>().ToAsyncEnumerable();
157 var list = new List<int> { 42, 2112 }.ToAsyncEnumerable();
168 var list = new List<int> { 42, 2112 }.ToAsyncEnumerable();
196 var list = new List<int>().ToAsyncEnumerable();
206 var list = new List<int>().ToAsyncEnumerable();
228 var list = new List<int> { 42, 2112 }.ToAsyncEnumerable();
247 var list = new List<int> { 42, 2112 }.ToAsyncEnumerable();
289 var list = new List<object?> { 16, null, "Hi there" }.ToAsyncEnumerable();
297 var list = new List<int> { 42 }.ToAsyncEnumerable();
305 var list = new List<int> { 41, 43 }.ToAsyncEnumerable();
321 var list = new List<object?> { null, 16, "Hi there" }.ToAsyncEnumerable();
341 var list = new List<int> { 42 }.ToAsyncEnumerable();
399 var list = new List<object?> { 16, "Hi there", null }.ToAsyncEnumerable();
407 var list = new List<int> { 42, 42 }.ToAsyncEnumerable();
423 var list = new List<string?> { "a", null, "b", null, "c", "d" }.ToAsyncEnumerable();
473 var list = new List<object?> { 16, "Hi there" }.ToAsyncEnumerable();
481 var list = new List<int> { 42 }.ToAsyncEnumerable();
498 var list = new List<int>().ToAsyncEnumerable();
506 var list = new List<object?> { null, 16, "Hi there" }.ToAsyncEnumerable();
526 var list = new List<int> { 42 }.ToAsyncEnumerable();
584 var list = new List<int>().ToAsyncEnumerable();
592 var list = new List<int> { 42 }.ToAsyncEnumerable();
739 var actual = actualArray is null ? null : new List<int>(actualArray).ToAsyncEnumerable();
837 List<EnumerableItem> actual = new List<EnumerableItem> { new(0), new(2) };
838 List<EnumerableItem> expected = new List<EnumerableItem> { new(1), new(3) };
957 var actual = new List<int>(new int[] { 1, 2, 3, 4, 5 }).ToAsyncEnumerable();
986 var actual = new List<int>(new int[] { 0, 0, 0, 0, 0 }).ToAsyncEnumerable();
996 var expected = new List<EnumerableItem> { new(1), new(3) };
997 var actual = new List<EnumerableItem> { new(0), new(2) }.ToAsyncEnumerable();
1051 var list = new List<int>().ToAsyncEnumerable();
1065 var list = new List<int> { 42 }.ToAsyncEnumerable();
1133 var actual = new List<int>(expected).ToAsyncEnumerable();
1160 var actual = new List<int>(new[] { 1, 2, 3, 4, 0, 6, 7, 8, 9, 10 }).ToAsyncEnumerable();
1173 var actual = new List<int>(new int[] { 1, 2, 3, 4, 5 }).ToAsyncEnumerable();
1183 var actual = new List<int>(new int[] { 0, 0, 0, 0, 0 }).ToAsyncEnumerable();
1314 var actual = new List<int>(new int[] { 1, 2, 3, 4, 5 }).ToAsyncEnumerable();
1324 var actual = new List<int>(new int[] { 0, 0, 0, 0, 0 }).ToAsyncEnumerable();
CollectionAssertsTests.cs (67)
58 var indices = new List<int>();
110 var indices = new List<int>();
123 var list = new List<int>();
133 var list = new List<int>();
155 var list = new List<int> { 42, 2112 };
167 var list = new List<int> { 42, 2112 };
196 var list = new List<int>();
206 var list = new List<int>();
228 var list = new List<int> { 42, 2112 };
247 var list = new List<int> { 42, 2112 };
289 var list = new List<object?> { 16, null, "Hi there" };
297 var list = new List<int> { 42 };
305 var list = new List<int> { 41, 43 };
321 var list = new List<object?> { null, 16, "Hi there" };
359 var list = new List<int> { 42 };
433 var list = new List<object?> { 16, "Hi there", null };
441 var list = new List<int> { 42, 42 };
457 var list = new List<string?> { "a", null, "b", null, "c", "d" };
507 var list = new List<object?> { 16, "Hi there" };
515 var list = new List<int> { 42 };
532 var list = new List<int>();
540 var list = new List<object?> { null, 16, "Hi there" };
596 var list = new List<int> { 42 };
662 var list = new List<int>();
670 var list = new List<int> { 42 };
955 var actual = new List<int>(expected);
1010 var actual = actualArray is null ? null : new List<int>(actualArray);
1036 var actual = new List<int>(new int[] { 1, 2, 3, 4, 5 });
1055 var actual = new List<int>(new int[] { 0, 0, 0, 0, 0 });
1078 List<EnumerableItem> actual = new List<EnumerableItem> { new(0), new(2) };
1079 List<EnumerableItem> expected = new List<EnumerableItem> { new(1), new(3) };
1180 var actual = new List<int>(new int[] { 1, 2, 3, 4, 5 });
1199 var actual = new List<int>(new int[] { 0, 0, 0, 0, 0 });
1208 List<EnumerableItem> actual = new List<EnumerableItem> { new(0), new(2) };
1209 List<EnumerableItem> expected = new List<EnumerableItem> { new(1), new(3) };
1342 ["toAddresses"] = new List<string> { "test1@example.com" },
1343 ["ccAddresses"] = new List<string> { "test2@example.com" },
1360 ["toAddresses"] = new List<string> { "test1@example.com" },
1361 ["ccAddresses"] = new List<string> { "test2@example.com" },
1425 ["key"] = new List<Dictionary<string, object>>()
1429 ["key"] = new List<object> { "value" }
1438 ["key"] = new List<Dictionary<string, object>>()
1442 ["key"] = new List<object> { "value" }
1458 ["key"] = new List<Dictionary<string, object>>()
1462 ["key"] = new List<object> { "value1" }
1471 ["key"] = new List<Dictionary<string, object>>()
1475 ["key"] = new List<object> { "value2" }
1614 var list = new List<int>();
1628 var list = new List<int> { 42 };
1739 var actual = new List<int>(expected);
1756 var actual = new List<int>(new[] { 1, 2, 3, 4, 0, 6, 7, 8, 9, 10 });
1768 var actual = new List<int>(new int[] { 1, 2, 3, 4, 5 });
1777 var actual = new List<int>(new int[] { 0, 0, 0, 0, 0 });
1878 var actual = new List<int>(new int[] { 1, 2, 3, 4, 5 });
1887 var actual = new List<int>(new int[] { 0, 0, 0, 0, 0 });
2009 ["toAddresses"] = new List<string> { "test1@example.com" },
2010 ["ccAddresses"] = new List<string> { "test2@example.com" },
2035 ["toAddresses"] = new List<string> { "test1@example.com" },
2036 ["ccAddresses"] = new List<string> { "test2@example.com" },
2092 ["key"] = new List<Dictionary<string, object>>()
2096 ["key"] = new List<object> { "value" }
2105 ["key"] = new List<Dictionary<string, object>>()
2109 ["key"] = new List<object> { "value" }
2133 ["key"] = new List<Dictionary<string, object>>()
2137 ["key"] = new List<object> { "value1" }
2146 ["key"] = new List<Dictionary<string, object>>()
2150 ["key"] = new List<object> { "value2" }
EqualityAssertsTests.cs (34)
879 var x = new List<object> { new List<object> { new List<object> { 1 } } };
880 var y = new List<object> { new List<object> { new List<object> { 1 } } };
888 var x = new List<object> { new List<object> { new List<object> { 1 } } };
889 var y = new List<object> { new List<object> { new List<object> { 2 } } };
1101 List<T> values = new();
1568 var expected = new KeyValuePair<IEnumerable<string>, int>(new List<string> { "Key1", "Key2" }, 42);
1578 var expected = new KeyValuePair<IEnumerable<string>, int>(new List<string> { "Key1", "Key2" }, 42);
1596 var expected = new KeyValuePair<string, IEnumerable<string>>("Key1", new List<string> { "Value1a", "Value1b" });
1606 var expected = new KeyValuePair<string, IEnumerable<string>>("Key1", new List<string> { "Value1a", "Value1b" });
3186 var x = new List<object> { new List<object> { new List<object> { 1 } } };
3187 var y = new List<object> { new List<object> { new List<object> { 1 } } };
3203 var x = new List<object> { new List<object> { new List<object> { 1 } } };
3204 var y = new List<object> { new List<object> { new List<object> { 2 } } };
3330 List<T> values = new();
3796 var expected = new KeyValuePair<IEnumerable<string>, int>(new List<string> { "Key1", "Key2" }, 42);
3814 var expected = new KeyValuePair<IEnumerable<string>, int>(new List<string> { "Key1", "Key2" }, 42);
3824 var expected = new KeyValuePair<string, IEnumerable<string>>("Key1", new List<string> { "Value1a", "Value1b" });
3842 var expected = new KeyValuePair<string, IEnumerable<string>>("Key1", new List<string> { "Value1a", "Value1b" });
EquivalenceAssertsTests.cs (8)
1123 Assert.Equivalent(new[] { 1, 2, 3 }, new List<int> { 1, 2, 3 });
1129 Assert.Equivalent(new List<int> { 1, 2, 3 }, new[] { 1, 2, 3 });
1176 var expected = new Dictionary<string, List<int>> { ["Foo"] = new List<int> { 42 } };
1177 var actual = new Dictionary<string, List<int>> { ["Foo"] = new List<int> { 42 }, ["Bar"] = new List<int> { 2112 } };
1228 var expected = new Dictionary<string, List<int>> { ["Foo"] = new List<int> { 16 } };
1229 var actual = new Dictionary<string, List<int>> { ["Foo"] = new List<int> { 42 }, ["Bar"] = new List<int> { 2112 } };
Microsoft.DotNet.XUnitExtensions (5)
Microsoft.DotNet.XUnitV3Extensions (1)
Microsoft.Extensions.AI (1)
Microsoft.Extensions.AI.Abstractions (17)
Microsoft.Extensions.AI.Abstractions.Tests (5)
Microsoft.Extensions.AI.Evaluation (2)
Microsoft.Extensions.AI.Evaluation.Integration.Tests (7)
Microsoft.Extensions.AI.Evaluation.Quality (1)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (2)
Microsoft.Extensions.AI.Integration.Tests (9)
Microsoft.Extensions.AI.Tests (17)
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.DependencyInjection (12)
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 (4)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (4)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (24)
Microsoft.Extensions.Diagnostics.Testing (2)
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 (46)
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 },
326new List<IHttpClientLogEnricher> { testEnricher },
431new List<IHttpClientLogEnricher> { testEnricher },
546new List<IHttpClientLogEnricher> { testEnricher },
639new List<IHttpClientLogEnricher> { testEnricher },
682new List<IHttpClientLogEnricher> { enricher1.Object, enricher2.Object },
725new List<IHttpClientLogEnricher> { enricher1.Object, enricher2.Object },
760var enrichers = new List<IHttpClientLogEnricher> { enricher1.Object, enricher2.Object };
807new List<IHttpClientLogEnricher> { enricher1.Object, enricher2.Object },
909new List<IHttpClientLogEnricher> { testEnricher },
Logging\HttpRequestReaderTest.cs (16)
100var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
101var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
157var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
158var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
227var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
228var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
302var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
303var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
362var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
363var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
432var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
433var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
499var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
500var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
567var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
568var responseHeadersBuffer = 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 (9)
Microsoft.Extensions.Logging.Abstractions (1)
Microsoft.Extensions.Logging.AzureAppServices (1)
Microsoft.Extensions.Logging.EventSource (1)
Microsoft.Extensions.Logging.Generators (6)
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 (11)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (4)
Microsoft.Extensions.ServiceDiscovery.Tests (1)
Microsoft.Extensions.ServiceDiscovery.Yarp (3)
Microsoft.Extensions.Telemetry (7)
Microsoft.Extensions.Telemetry.Abstractions (4)
Microsoft.Extensions.Telemetry.Abstractions.Tests (1)
Microsoft.Extensions.Telemetry.Tests (13)
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.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 (7)
Microsoft.Gen.MetricsReports (5)
Microsoft.Gen.MetricsReports.Unit.Tests (5)
Microsoft.Interop.ComInterfaceGenerator (8)
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 (20)
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 (36)
Microsoft.ML.Tokenizers.Data.Tests (2)
Microsoft.ML.Tokenizers.Tests (34)
TiktokenTests.cs (11)
142Assert.Equal(new List<int>() { 9906, 4435 }, encoded);
154Assert.Equal(new List<Range> { new Range(0, 5), new Range(5, 11) }, offsets);
195Assert.Equal(new List<int>() { 100264, 9906, 4435, 100265 }, encoded);
208Assert.Equal(new List<(int, int)> { (0, 12), (12, 5), (17, 6), (23, 10) }, offsets);
238Assert.Equal(new List<int>() { 100264, 9906, 100265, 4435 }, encoded);
251Assert.Equal(new List<(int, int)> { (0, 12), (12, 5), (17, 10), (27, 6) }, offsets);
273Assert.Equal(new List<int>() { 100264, 9906, 2928, 99834, 4435, 100265 }, encoded);
281Assert.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());
307Assert.Equal(new List<int>() { 199999, 13225, 161181, 5922, 200018 }, encoded);
316Assert.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());
756Assert.Equal(new List<int>() { 100264, 9906, 100266, 4435, 100265, 100349 }, encoded);
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.NET.StringTools.UnitTests (1)
Microsoft.VisualBasic.Core (18)
Microsoft.VisualStudio.LanguageServices (50)
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.LiveShare (1)
Microsoft.VisualStudio.LanguageServices.Xaml (2)
MilvusPlayground.ApiService (4)
MSBuild (22)
MSBuildTaskHost (8)
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)
RazorBuildWebSite (1)
RazorWebSite (5)
ReachFramework (38)
Replay (5)
Roslyn.Diagnostics.Analyzers (39)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
86var result = new List<ITypeSymbol>
Roslyn.Diagnostics.CSharp.Analyzers (17)
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 (13)
Shared.Tests (14)
SignalR.Client.FunctionalTestApp (1)
SignalRSamples (1)
Sockets.BindTests (4)
Sockets.FunctionalTests (6)
StaticFilesAuth (2)
Stress.ApiService (4)
Stress.AppHost (3)
Stress.TelemetryService (1)
Swaggatherer (11)
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 (17)
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 (19)
System.Diagnostics.Process (9)
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 (1)
System.IO.Packaging (10)
System.IO.Pipelines (2)
System.IO.Ports (4)
System.Linq (23)
System.Linq.Expressions (33)
System.Linq.Parallel (7)
System.Linq.Queryable (2)
System.Memory (2)
System.Net.Http (22)
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 (120)
System.Private.CoreLib.Generators (2)
System.Private.DataContractSerialization (38)
System.Private.Windows.Core (2)
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)
91{ 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"] },
93new List<MyClass>(),
System.Private.Xml (169)
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.Tests (26)
System.ServiceModel.Syndication (2)
System.Text.Json (29)
System.Text.Json.SourceGeneration (11)
System.Text.RegularExpressions (27)
System.Text.RegularExpressions.Generator (13)
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 (15)
System.Windows.Forms.Primitives.Tests (2)
System.Windows.Forms.Tests (64)
System.Windows.Forms.UI.IntegrationTests (1)
System.Windows.Input.Manipulations (1)
System.Xaml (87)
System.Xaml.Tests (7)
Templates.Blazor.Tests (17)
Templates.Blazor.WebAssembly.Auth.Tests (16)
Templates.Blazor.WebAssembly.Tests (16)
Templates.Mvc.Tests (22)
Templates.Tests (16)
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 (6)
Wasm.Performance.Driver (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 (8)
xunit.console (21)
21530 references to List
Analyzer.Utilities.UnitTests (4)
AnalyzerRunner (5)
ApiExplorerWebSite (4)
ApplicationModelWebSite (2)
aspire (21)
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.Cli.Tests (19)
Aspire.Components.Common.TestUtilities (4)
Aspire.Confluent.Kafka (6)
Aspire.Confluent.Kafka.Tests (5)
Aspire.Dashboard (306)
Components\Controls\Chart\ChartBase.cs (27)
29private List<KeyValuePair<string, string>[]>? _renderedDimensionAttributes;
59public required List<OtlpApplication> Applications { 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);
Otlp\Storage\TelemetryRepository.cs (39)
35private readonly List<Subscription> _applicationSubscriptions = new();
36private readonly List<Subscription> _logSubscriptions = new();
37private readonly List<Subscription> _metricsSubscriptions = new();
38private readonly List<Subscription> _tracesSubscriptions = new();
52private readonly List<OtlpSpanLink> _spanLinks = new();
53private readonly List<IDisposable> _peerResolverSubscriptions = new();
63internal List<OtlpSpanLink> SpanLinks => _spanLinks;
64internal List<Subscription> TracesSubscriptions => _tracesSubscriptions;
98public List<OtlpApplication> GetApplications(bool includeUninstrumentedPeers = false)
103public List<OtlpApplication> GetApplicationsByName(string name, bool includeUninstrumentedPeers = false)
108private List<OtlpApplication> GetApplicationsCore(bool includeUninstrumentedPeers, string? name)
120var applications = results.OrderBy(a => a.ApplicationKey).ToList();
148public List<OtlpApplication> GetApplications(ApplicationKey key, bool includeUninstrumentedPeers = false)
194var applications = GetApplications(key.Value);
273private Subscription AddSubscription(string name, ApplicationKey? applicationKey, SubscriptionType subscriptionType, Func<Task> callback, List<Subscription> subscriptions)
292private void RaiseSubscriptionChanged(List<Subscription> subscriptions)
403List<OtlpApplication>? applications = null;
437public List<string> GetLogPropertyKeys(ApplicationKey? applicationKey)
439List<OtlpApplication>? applications = null;
464public List<string> GetTracePropertyKeys(ApplicationKey? applicationKey)
466List<OtlpApplication>? applications = null;
493List<OtlpApplication>? applications = null;
525var filters = context.Filters.GetEnabledFilters().ToList();
572private static bool MatchApplications(ApplicationKey applicationKey, List<OtlpApplication> applications)
585private static bool MatchApplications(OtlpTrace t, List<OtlpApplication> applications)
613List<OtlpApplication>? applications = null;
650List<OtlpApplication>? applications = null;
687List<OtlpApplication> applications;
1136var currentSpanLinks = _spanLinks.ToList();
1176var events = new List<OtlpSpanEvent>();
1178var links = new List<OtlpSpanLink>();
1227public List<OtlpInstrumentSummary> GetInstrumentsSummaries(ApplicationKey key)
1229var applications = GetApplications(key);
1240var allApplicationSummaries = applications
1252var applications = GetApplications(request.ApplicationKey);
1253var instruments = applications
1275var allDimensions = new List<DimensionScope>();
1276var allKnownAttributes = new Dictionary<string, List<string?>>();
1285ref var values = ref CollectionsMarshal.GetValueRefOrAddDefault(allKnownAttributes, knownAttributeValues.Key, out _);
Aspire.Dashboard.Components.Tests (8)
Aspire.Dashboard.Tests (97)
Aspire.EndToEnd.Tests (1)
Aspire.Hosting (158)
Dcp\DcpExecutor.cs (31)
55private readonly List<AppResource> _appResources = [];
162var tasks = new List<Task>();
461var logs = new List<LogEntry>();
640var needAddressAllocated = _appResources.OfType<ServiceAppResource>()
885var projectArgs = new List<string>();
1025var tasks = new List<Task>();
1053if (er.DcpResource.TryGetAnnotationAsObjectList<string>(CustomResource.ResourceProjectArgsAnnotation, out var projectArgs) && projectArgs.Count > 0)
1060(var appHostArgs, var failedToApplyArgs) = await BuildArgsAsync(resourceLogger, er.ModelResource, cancellationToken).ConfigureAwait(false);
1062var launchArgs = BuildLaunchArgs(er, spec, appHostArgs);
1064var executableArgs = launchArgs.Where(a => !a.AnnotationOnly).Select(a => a.Value).ToList();
1084private static List<(string Value, bool IsSensitive, bool AnnotationOnly)> BuildLaunchArgs(AppResource er, ExecutableSpec spec, List<(string Value, bool IsSensitive)> appHostArgs)
1090var launchArgs = new List<(string Value, bool IsSensitive, bool AnnotationOnly)>();
1104var launchProfileArgs = GetLaunchProfileArgs(project.GetEffectiveLaunchProfile()?.LaunchProfile);
1121private static List<string> GetLaunchProfileArgs(LaunchProfile? launchProfile)
1237var tasks = new List<Task>();
1302(var args, var failedToApplyArgs) = await BuildArgsAsync(resourceLogger, modelContainerResource, cancellationToken).ConfigureAwait(false);
1330var dcpBuildArgs = new List<EnvVar>();
1360var dcpBuildSecrets = new List<BuildContextSecret>();
1735private async Task<(List<(string Value, bool IsSensitive)>, bool)> BuildArgsAsync(ILogger resourceLogger, IResource modelResource, CancellationToken cancellationToken)
1738var args = new List<(string Value, bool IsSensitive)>();
1763private async Task<List<ContainerCreateFileSystem>> BuildCreateFilesAsync(IResource modelResource, CancellationToken cancellationToken)
1765var createFiles = new List<ContainerCreateFileSystem>();
1793private async Task<(List<EnvVar>, bool)> BuildEnvVarsAsync(ILogger resourceLogger, IResource modelResource, CancellationToken cancellationToken)
1796var env = new List<EnvVar>();
1820private async Task<(List<string>, bool)> BuildRunArgsAsync(ILogger resourceLogger, IResource modelResource, CancellationToken cancellationToken)
1823var runArgs = new List<string>();
1846private static List<ContainerPortSpec> BuildContainerPorts(AppResource cr)
1848var ports = new List<ContainerPortSpec>();
1885private static List<VolumeMount> BuildContainerMounts(IResource container)
1887var volumeMounts = new List<VolumeMount>();
Aspire.Hosting.Analyzers (1)
Aspire.Hosting.Azure (16)
AzureResourcePreparer.cs (8)
25var azureResources = GetAzureResourcesFromAppModel(appModel);
51internal static List<(IResource Resource, IAzureResource AzureResource)> GetAzureResourcesFromAppModel(DistributedApplicationModel appModel)
58var azureResources = new List<(IResource, IAzureResource)>();
104private async Task BuildRoleAssignmentAnnotations(DistributedApplicationModel appModel, List<(IResource Resource, IAzureResource AzureResource)> azureResources, AzureProvisioningOptions options, CancellationToken cancellationToken)
257private static (AzureUserAssignedIdentityResource IdentityResource, List<AzureBicepResource> RoleAssignmentResources) CreateIdentityAndRoleAssignmentResources(
285var roleAssignmentResources = CreateRoleAssignmentsResources(provisioningOptions, resource, roleAssignments, identityResource, executionContext);
289private static List<AzureBicepResource> CreateRoleAssignmentsResources(
296var roleAssignmentResources = new List<AzureBicepResource>();
Aspire.Hosting.Azure.AIFoundry (2)
Aspire.Hosting.Azure.AppContainers (3)
Aspire.Hosting.Azure.AppService (2)
Aspire.Hosting.Azure.CognitiveServices (2)
Aspire.Hosting.Azure.CosmosDB (5)
Aspire.Hosting.Azure.EventHubs (2)
Aspire.Hosting.Azure.Functions (5)
Aspire.Hosting.Azure.KeyVault (1)
Aspire.Hosting.Azure.ServiceBus (4)
Aspire.Hosting.Azure.SignalR (1)
Aspire.Hosting.Azure.Storage (1)
Aspire.Hosting.Azure.Tests (6)
Aspire.Hosting.Azure.WebPubSub (1)
Aspire.Hosting.Containers.Tests (5)
Aspire.Hosting.Docker (31)
Aspire.Hosting.Garnet (1)
Aspire.Hosting.Garnet.Tests (1)
Aspire.Hosting.Kubernetes (99)
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.Oracle.Tests (4)
Aspire.Hosting.PostgreSQL (1)
Aspire.Hosting.Python.Tests (3)
Aspire.Hosting.RabbitMQ (1)
Aspire.Hosting.Redis (1)
Aspire.Hosting.Redis.Tests (3)
Aspire.Hosting.SqlServer (1)
Aspire.Hosting.SqlServer.Tests (1)
Aspire.Hosting.Testing.Tests (7)
Aspire.Hosting.Tests (83)
Dcp\DcpExecutorTests.cs (27)
63var startingEvents = new List<OnResourceStartingContext>();
85var executables = kubernetesService.CreatedResources.OfType<Executable>().ToList();
153var executables = kubernetesService.CreatedResources.OfType<Executable>().ToList();
158var callArgs = executionType == ExecutionType.IDE ? exe.Spec.Args : exe.Spec.Args![^(expectedArgs?.Length ?? 0)..];
161Assert.True(exe.TryGetAnnotationAsObjectList<AppLaunchArgumentAnnotation>(CustomResource.ResourceAppArgsAnnotation, out var argAnnotations));
196var executables = kubernetesService.CreatedResources.OfType<Executable>().ToList();
204Assert.True(exe1.TryGetAnnotationAsObjectList<AppLaunchArgumentAnnotation>(CustomResource.ResourceAppArgsAnnotation, out var argAnnotations1));
222Assert.True(exe2.TryGetAnnotationAsObjectList<AppLaunchArgumentAnnotation>(CustomResource.ResourceAppArgsAnnotation, out var argAnnotations2));
241Assert.True(dcpExe.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
273Assert.True(dcpExe.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
305Assert.True(dcpExe.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
338Assert.True(dcpExe.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
395Assert.True(dcpExe.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
429Assert.True(dcpExe.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
463Assert.True(dcpExe.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
549var executables = kubernetesService.CreatedResources.OfType<Executable>().ToList();
788var exes = kubernetesService.CreatedResources.OfType<Executable>().ToList();
793Assert.True(dcpExe.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
833var exes = kubernetesService.CreatedResources.OfType<Executable>().ToList();
838Assert.True(dcpExe.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
871Assert.True(dcpCtr.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
906Assert.True(dcpCtr.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
987Assert.True(dcpCtr.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
1023Assert.True(dcpCtr.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
1060Assert.True(dcpCtr.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
1097Assert.True(dcpCtr.TryGetAnnotationAsObjectList<ServiceProducerAnnotation>(CustomResource.ServiceProducerAnnotation, out var spAnnList));
1236var commandAnnotations = resource.Annotations.OfType<ResourceCommandAnnotation>().ToList();
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.Data.SqlClient (1)
Aspire.Microsoft.EntityFrameworkCore.Cosmos (3)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
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 (6)
Aspire.TestUtilities (1)
AzureAppService.ApiService (1)
AzureContainerApps.ApiService (1)
AzureSearch.ApiService (2)
AzureStorageEndToEnd.ApiService (2)
BasicTestApp (9)
BasicWebSite (2)
BasketService (3)
BicepSample.ApiService (8)
BinaryFormatTests (1)
BoundTreeGenerator (5)
BuildActionTelemetryTable (1)
BuildBoss (15)
BuildValidator (11)
CatalogDb (9)
CatalogModel (3)
CatalogService (1)
CdkSample.ApiService (9)
ClaimsTransformation (1)
Client.ClientBase.IntegrationTests (14)
ClientSample (11)
CodeGenerator (11)
ConfigurationSchemaGenerator (30)
Contract.Data.IntegrationTests (1)
Cookies (1)
CookieSessionSample (1)
CosmosEndToEnd.ApiService (1)
Crossgen2Tasks (12)
csc (6)
CSharpErrorFactsGenerator (4)
CSharpSyntaxGenerator (62)
CustomPolicyProvider (1)
DatabaseMigration.ApiService (1)
DemoConsole (1)
Diagnostics.EFCore.FunctionalTests (1)
dotnet-dev-certs (32)
dotnet-getdocument (10)
dotnet-openapi (9)
dotnet-razorpagegenerator (1)
dotnet-sql-cache (9)
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 (26)
dotnet-user-secrets (10)
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 (10)
HeaderPropagationSample (1)
HtmlGenerationWebSite (4)
http2cat (4)
IdeBenchmarks (1)
IdeCoreBenchmarks (6)
Identity.DefaultUI.WebSite (3)
Identity.ExternalClaims (1)
IdentitySample.Mvc (2)
IIS.Common.TestLib (1)
IIS.FunctionalTests (22)
IIS.LongTests (9)
IIS.Microbenchmarks (1)
IIS.NewHandler.FunctionalTests (9)
IIS.NewShim.FunctionalTests (9)
IIS.ShadowCopy.Tests (6)
IIS.Tests (1)
IISExpress.FunctionalTests (21)
illink (174)
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;
564var baseMethods = Annotations.GetBaseMethods(method);
685List<OverrideInformation>? overridingMethods = (List<OverrideInformation>?)Annotations.GetOverrides(method);
751var bases = Annotations.GetBaseMethods(method);
1581var skippedItems = new List<AttributeProviderPair>();
1646var skippedItems = new List<(AttributeProviderPair, DependencyInfo, MessageOrigin)>();
2528var ifaces = Annotations.GetRecursiveInterfaces(type);
2541protected virtual bool ShouldMarkInterfaceImplementationList(TypeDefinition type, List<InterfaceImplementation> ifaces, TypeReference ifaceType)
2602var base_list = Annotations.GetBaseMethods(method);
3027var list = Annotations.GetPreservedMethods(type);
3037var list = Annotations.GetPreservedMethods(method);
3515var ifaces = Annotations.GetRecursiveInterfaces(method.DeclaringType);
3597var base_methods = Annotations.GetBaseMethods(method);
3990void MarkInterfaceImplementationList(List<InterfaceImplementation> ifaces, MessageOrigin origin, DependencyInfo? reason = null)
4028if (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\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.RoslynAnalyzer (9)
Infrastructure.Common (9)
InMemory.FunctionalTests (40)
InProcessWebSite (1)
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.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 (6)
Microsoft.AspNetCore.Antiforgery.Test (2)
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 (1)
Microsoft.AspNetCore.Authentication.WsFederation (1)
Microsoft.AspNetCore.Authorization (1)
Microsoft.AspNetCore.Authorization.Test (1)
Microsoft.AspNetCore.BrowserTesting (6)
Microsoft.AspNetCore.Components (74)
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 (73)
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 (89)
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.SdkAnalyzers (2)
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (2)
Microsoft.AspNetCore.Components.Server (14)
Microsoft.AspNetCore.Components.Server.Tests (39)
Circuits\ServerComponentDeserializerTest.cs (16)
33Assert.True(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
48Assert.True(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
67Assert.True(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
86Assert.True(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
108Assert.True(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
138Assert.True(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
163Assert.False(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
177Assert.False(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
189Assert.False(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
205Assert.False(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
220Assert.False(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
235Assert.False(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
252Assert.True(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
270Assert.False(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
287Assert.False(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
302Assert.False(serverComponentDeserializer.TryDeserializeComponentDescriptorCollection(markers, out var descriptors));
Microsoft.AspNetCore.Components.Tests (47)
PersistentStateValueProviderTests.cs (19)
32var componentStates = CreateComponentState(renderer, [(component, null)], null);
59var componentStates = CreateComponentState(renderer, [(component, null)], null);
81var componentStates = CreateComponentState(renderer, [(component, null)], null);
107var componentStates = CreateComponentState(renderer, [(component, null)], null);
146var componentStates = CreateComponentState(renderer, [(component, null)], parentComponent);
185var componentStates = CreateComponentState(renderer, [(component1, 1), (component2, 2)], parentComponent);
258var componentStates = CreateComponentState(renderer, [(component1, componentKey1), (component2, componentKey2)], parentComponent);
303var componentStates = CreateComponentState(renderer, [(component1, null), (component2, null)], null);
344var componentStates = CreateComponentState(renderer, [(component1, null), (component2, null)], parentComponent);
377var componentStates = CreateComponentState(renderer, [(component1, 1), (component2, 1)], parentComponent);
417var componentStates = CreateComponentState(renderer, [(component1, componentKeyType1), (component2, componentKeyType2)], parentComponent);
447var componentStates = CreateComponentState(renderer, [(component, null)], null);
482var componentStates = CreateComponentState(renderer, [(component, null)], null);
517var componentStates = CreateComponentState(renderer, [(component, null)], null);
552var componentStates = CreateComponentState(renderer, [(component, null)], null);
575private static void InitializeState(PersistentComponentState state, List<(ComponentState componentState, string propertyName, string value)> items)
594private static List<ComponentState> CreateComponentState(
596List<(IComponent, object)> components,
602var result = new List<ComponentState>();
Microsoft.AspNetCore.Components.Web (7)
Microsoft.AspNetCore.Components.Web.Tests (8)
Microsoft.AspNetCore.Components.WebAssembly (26)
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.ConcurrencyLimiter.Microbenchmarks (1)
Microsoft.AspNetCore.Connections.Abstractions (1)
Microsoft.AspNetCore.CookiePolicy (1)
Microsoft.AspNetCore.CookiePolicy.Test (4)
Microsoft.AspNetCore.DataProtection (16)
Microsoft.AspNetCore.DataProtection.Tests (21)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (16)
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 (12)
Microsoft.AspNetCore.Grpc.JsonTranscoding (45)
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 (7)
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.Extensions.Tests (28)
HeaderDictionaryTypeExtensionsTest.cs (6)
172var expected = new[] {
209List<StringWithQualityHeaderValue> expected = [new("plain", 0.5), new("html", 0.8)];
221List<CookieHeaderValue> expected = [new("cookie1", "a"), new("cookie2", "b")];
233List<EntityTagHeaderValue> expected = [new("\"123\"", false), new("\"456\"", false)];
245List<SetCookieHeaderValue> expected = [new("cookie1", "a"), new("cookie2", "b")];
303var results = new List<TestHeaderValue>();
Microsoft.AspNetCore.Http.Features (1)
Microsoft.AspNetCore.Http.Microbenchmarks (8)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (6)
Microsoft.AspNetCore.Http.Results.Tests (27)
Microsoft.AspNetCore.Http.Tests (10)
Microsoft.AspNetCore.HttpLogging (10)
Microsoft.AspNetCore.HttpLogging.Tests (12)
Microsoft.AspNetCore.HttpOverrides (1)
Microsoft.AspNetCore.HttpsPolicy.Tests (12)
Microsoft.AspNetCore.Identity (1)
Microsoft.AspNetCore.Identity.EntityFrameworkCore (7)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (9)
Microsoft.AspNetCore.Identity.FunctionalTests (5)
Microsoft.AspNetCore.Identity.InMemory.Test (13)
Microsoft.AspNetCore.Identity.Specification.Tests (12)
Microsoft.AspNetCore.Identity.Test (17)
Microsoft.AspNetCore.Identity.UI (1)
Microsoft.AspNetCore.InternalTesting (2)
Microsoft.AspNetCore.InternalTesting.Tests (1)
Microsoft.AspNetCore.JsonPatch (12)
Microsoft.AspNetCore.JsonPatch.SystemTextJson (12)
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (34)
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 };
454var targetObject = new List<int>() { 10, 20 };
470var targetObject = new List<int>() { 10, 20 };
487var targetObject = new List<int>() { 10, 20 };
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 (20)
DefaultApiDescriptionProviderTest.cs (18)
666public static TheoryData<Type, string, List<FilterDescriptor>> ReturnsActionResultWithProducesAndProducesContentTypeData
670var filterDescriptors = new List<FilterDescriptor>()
686return new TheoryData<Type, string, List<FilterDescriptor>>
717List<FilterDescriptor> filterDescriptors)
763public static TheoryData<Type, string, List<FilterDescriptor>> ReturnsVoidOrTaskWithProducesContentTypeData
767var filterDescriptors = new List<FilterDescriptor>()
786return new TheoryData<Type, string, List<FilterDescriptor>>
827List<FilterDescriptor> filterDescriptors)
1217var formatters = CreateOutputFormatters();
1322var formatters = CreateInputFormatters();
2251List<MockInputFormatter> inputFormatters = null,
2252List<MockOutputFormatter> outputFormatters = null,
2289private List<MockInputFormatter> CreateInputFormatters()
2292var formatters = new List<MockInputFormatter>()
2307private List<MockOutputFormatter> CreateOutputFormatters()
2310var formatters = new List<MockOutputFormatter>()
2839public List<Type> SupportedTypes { get; } = new List<Type>();
2867public 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 (24)
Microsoft.AspNetCore.OpenApi.Microbenchmarks (1)
Microsoft.AspNetCore.OpenApi.SourceGenerators (16)
XmlCommentGenerator.Parser.cs (6)
17internal static List<(string, string)> ParseXmlFile(AdditionalText additionalText, CancellationToken cancellationToken)
34var comments = new List<(string, string)>();
46internal static List<(string, string)> ParseCompilation(Compilation compilation, CancellationToken cancellationToken)
51var comments = new List<(string, string)>();
87(List<(string, string)> RawComments, Compilation Compilation) input,
91var comments = new List<(string, XmlComment?)>();
Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests (8)
Microsoft.AspNetCore.OpenApi.Tests (24)
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 (67)
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 (1)
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 (46)
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 (33)
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 (23)
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 (712)
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupIntrinsicTask.cs (14)
56List<ItemBucket> buckets = null;
60List<string> parameterValues = new List<string>();
86var keepMetadataEvaluated = bucket.Expander.ExpandIntoStringListLeaveEscaped(child.KeepMetadata, ExpanderOptions.ExpandAll, child.KeepMetadataLocation).ToList();
95var removeMetadataEvaluated = bucket.Expander.ExpandIntoStringListLeaveEscaped(child.RemoveMetadata, ExpanderOptions.ExpandAll, child.RemoveMetadataLocation).ToList();
104var matchOnMetadataEvaluated = bucket.Expander.ExpandIntoStringListLeaveEscaped(child.MatchOnMetadata, ExpanderOptions.ExpandAll, child.MatchOnMetadataLocation).ToList();
168List<ProjectItemInstance> itemsToAdd = ExpandItemIntoItems(child, bucket.Expander, keepMetadata, removeMetadata, loggingContext);
259List<ProjectItemInstance> itemsToRemove;
354private void GetBatchableValuesFromBuildItemGroupChild(List<string> parameterValues, ProjectItemGroupTaskItemInstance child)
382private List<ProjectItemInstance> ExpandItemIntoItems(
391List<ProjectItemInstance> items = new List<ProjectItemInstance>();
483List<string> metadataToRemove = null;
577private List<ProjectItemInstance> FindItemsMatchingSpecification(
627List<ProjectItemInstance> itemsRemoved = new List<ProjectItemInstance>();
645private 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 (36)
253internal delegate void AssignUnscheduledRequestsDelegate(List<ScheduleResponse> responses, HashSet<int> idleNodes);
320List<ScheduleResponse> responses = new List<ScheduleResponse>();
393List<ScheduleResponse> responses = new List<ScheduleResponse>();
448List<SchedulableRequest> unscheduledRequests = new List<SchedulableRequest>(_schedulingData.UnscheduledRequests);
535List<ScheduleResponse> responses = new List<ScheduleResponse>();
634public List<ScheduleResponse> ReleaseCores(int requestId, int coresToRelease)
639List<ScheduleResponse> responses = new List<ScheduleResponse>();
700private void ScheduleUnassignedRequests(List<ScheduleResponse> responses)
819private void AssignUnscheduledRequestsToNodes(List<ScheduleResponse> responses, HashSet<int> idleNodes)
945private void AssignUnscheduledRequestsWithPlanByMostImmediateReferences(List<ScheduleResponse> responses, HashSet<int> idleNodes)
953private void AssignUnscheduledRequestsWithPlanByGreatestPlanTime(List<ScheduleResponse> responses, HashSet<int> idleNodes)
958private void AssignUnscheduledRequestsWithPlan(List<ScheduleResponse> responses, HashSet<int> idleNodes, Func<SchedulingPlan.PlanConfigData, SchedulingPlan.PlanConfigData, bool> comparisonFunction)
1001private void AssignUnscheduledRequestsByTraversalsFirst(List<ScheduleResponse> responses, HashSet<int> idleNodes)
1010private void AssignUnscheduledProxyBuildRequestsToInProcNode(List<ScheduleResponse> responses, HashSet<int> idleNodes)
1015private void AssignUnscheduledRequestsToInProcNode(List<ScheduleResponse> responses, HashSet<int> idleNodes, Func<SchedulableRequest, bool> shouldBeScheduled)
1042private void AssignUnscheduledRequestsWithConfigurationCountLevelling(List<ScheduleResponse> responses, HashSet<int> idleNodes)
1081private void AssignUnscheduledRequestsWithSmallestFileSize(List<ScheduleResponse> responses, HashSet<int> idleNodes)
1123private void AssignUnscheduledRequestsWithLargestFileSize(List<ScheduleResponse> responses, HashSet<int> idleNodes)
1165private void AssignUnscheduledRequestsWithMaxWaitingRequests(List<ScheduleResponse> responses, HashSet<int> idleNodes)
1242private void AssignUnscheduledRequestsWithMaxWaitingRequests2(List<ScheduleResponse> responses, HashSet<int> idleNodes)
1270private void AssignUnscheduledRequestsFIFO(List<ScheduleResponse> responses, HashSet<int> idleNodes)
1302private void AssignUnscheduledRequestsUsingCustomSchedulerForSQL(List<ScheduleResponse> responses, HashSet<int> idleNodes)
1326List<int> nodesByConfigurationCountAscending = new List<int>(_availableNodes.Keys);
1375private void AssignUnscheduledRequestToNode(SchedulableRequest request, int nodeId, List<ScheduleResponse> responses)
1494private bool CreateNewNodeIfPossible(List<ScheduleResponse> responses, IEnumerable<SchedulableRequest> requests)
1671private void HandleRequestBlockedOnResultsTransfer(SchedulableRequest parentRequest, List<ScheduleResponse> responses)
1699private void HandleRequestBlockedByNewRequests(SchedulableRequest parentRequest, BuildRequestBlocker blocker, List<ScheduleResponse> responses)
1839private void ResumeReadyRequestIfAny(int nodeId, List<ScheduleResponse> responses)
1860private void ResolveRequestFromCacheAndResumeIfPossible(SchedulableRequest request, List<ScheduleResponse> responses)
1928private void ResumeRequiredWork(List<ScheduleResponse> responses)
1955List<SchedulableRequest> unscheduledRequests = new List<SchedulableRequest>(_schedulingData.UnscheduledRequests);
1979private bool CheckIfCacheMissOnReferencedProjectIsAllowedAndErrorIfNot(int nodeForResults, BuildRequest request, List<ScheduleResponse> responses, bool emitNonErrorLogs)
2305private bool TargetsMatch(HashSet<string> firstTargetsSet, List<string> secondTargetsList)
2569List<SchedulableRequest> childRequests = new List<SchedulableRequest>(_schedulingData.GetRequestsByHierarchy(request));
2648List<SchedulableRequest> scheduledRequestsByNode = new List<SchedulableRequest>(_schedulingData.GetScheduledRequestsByNode(nodeId));
2747List<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)
257var resolvers = new List<SdkResolver>();
269protected 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;
Definition\Project.cs (44)
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);
2694public override List<ProvenanceResult> GetItemProvenance(string itemToMatch, EvaluationContext evaluationContext)
2708public override List<ProvenanceResult> GetItemProvenance(string itemToMatch, string itemType, EvaluationContext evaluationContext)
2725public override List<ProvenanceResult> GetItemProvenance(ProjectItem item, EvaluationContext evaluationContext)
2745private List<ProjectItemElement> GetEvaluatedItemElements(EvaluationContext evaluationContext)
2756private static IEnumerable<ProjectItemElement> GetItemElementsThatMightAffectItem(List<ProjectItemElement> evaluatedItemElements, ProjectItem item)
2775private static List<ProjectItemElement> GetItemElementsByType(IEnumerable<ProjectItemElement> itemElements, string itemType)
2780private List<ProvenanceResult> GetItemProvenance(string itemToMatch, IEnumerable<ProjectItemElement> projectItemElements)
3249var itemsList = new List<ProjectItem>(items);
3406var relevantItems = new List<ProjectItem>();
3534List<ProjectItem> items = Evaluator<ProjectProperty, ProjectItem, ProjectMetadata, ProjectItemDefinition>.CreateItemsFromInclude(
3597private List<ProjectItem> AddItemHelper(ProjectItemElement itemElement, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata)
3601List<ProjectItem> items = Evaluator<ProjectProperty, ProjectItem, ProjectMetadata, ProjectItemDefinition>.CreateItemsFromInclude(
4061public List<string> DefaultTargets { get; set; }
4085public List<string> InitialTargets { get; set; }
4090public IDictionary<string, List<TargetSpecification>> BeforeTargets { get; set; }
4095public IDictionary<string, List<TargetSpecification>> AfterTargets { get; set; }
4129public List<ProjectItemElement> EvaluatedItemElements { get; private set; }
4162public Dictionary<string, List<string>> ConditionedProperties { get; private set; }
4245internal List<ResolvedImport> ImportClosure { get; private set; }
4251internal List<ResolvedImport> ImportClosureWithDuplicates { get; private set; }
4278ConditionedProperties = 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,
1844List<ProjectRootElement> projectList = null;
1861throwOnFileNotExistsError: true, out var additionalProjects);
2015bool throwOnFileNotExistsError, out List<ProjectRootElement> imports)
2553var onlyFallbackSearchPaths = searchPathMatch.SearchPaths.Select(s => _data.ExpandString(s)).ToList();
Evaluation\Expander.cs (58)
462List<ExpressionShredder.ItemExpressionCapture> transforms = ExpressionShredder.GetReferencedItemExpressions(expression);
569List<T> result = new List<T>();
664out List<KeyValuePair<string, I>> itemsFromCapture)
780private static void AddArgument(List<string> arguments, SpanBasedStringBuilder argumentBuilder)
828List<string> arguments = new List<string>();
971List<ExpressionShredder.ItemExpressionCapture> itemVectorExpressions = ExpressionShredder.GetReferencedItemExpressions(expression);
1867internal static List<KeyValuePair<string, S>> Transform<S>(
1872List<ExpressionShredder.ItemExpressionCapture> captures,
1879List<KeyValuePair<string, S>> sourceItems = IntrinsicItemFunctions<S>.GetItemPairs(itemsOfType);
1880List<KeyValuePair<string, S>> transformedItems = new(itemsOfType.Count);
2042List<ExpressionShredder.ItemExpressionCapture> matches;
2119List<KeyValuePair<string, S>> itemsFromCapture;
2190out List<KeyValuePair<string, S>> itemsFromCapture)
2200List<ExpressionShredder.ItemExpressionCapture> captures = expressionCapture.Captures;
2278List<ExpressionShredder.ItemExpressionCapture> matches = ExpressionShredder.GetReferencedItemExpressions(expression);
2331List<KeyValuePair<string, S>> itemsFromCapture;
2438internal static List<KeyValuePair<string, S>> GetItemPairs(ICollection<S> itemsOfType)
2440List<KeyValuePair<string, S>> itemsFromCapture = new(itemsOfType.Count);
2468internal static void Count(List<KeyValuePair<string, S>> itemsOfType, List<KeyValuePair<string, S>> transformedItems)
2477internal static void ItemSpecModifierFunction(IElementLocation elementLocation, bool includeNullEntries, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
2525internal static void Exists(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
2572internal static void Combine(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
2596internal static void GetPathsOfAllDirectoriesAbove(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
2672internal static void DirectoryName(IElementLocation elementLocation, bool includeNullEntries, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
2739internal static void Metadata(IElementLocation elementLocation, bool includeNullEntries, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
2793internal static void DistinctWithCase(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
2802internal static void Distinct(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
2811internal static void DistinctWithComparer(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, StringComparer comparer, List<KeyValuePair<string, S>> transformedItems)
2830internal static void Reverse(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
2843internal static void ExpandQuotedExpressionFunction(IElementLocation elementLocation, bool includeNullEntries, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
2953List<MetadataMatch> multipleMatches = null;
3037List<KeyValuePair<string, S>> itemsOfType,
3039List<KeyValuePair<string, S>> transformedItems)
3076internal static void ClearMetadata(IElementLocation elementLocation, bool includeNullEntries, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
3093internal static void HasMetadata(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
3127internal static void WithMetadataValue(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
3160internal static void WithoutMetadataValue(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
3193internal static void AnyHaveMetadataValue(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems)
3330public OneOrMultipleMetadataMatches(List<MetadataMatch> allMatches)
3338internal List<MetadataMatch> Multiple { get; }
3557List<ReadOnlyMemory<char>> list = new List<ReadOnlyMemory<char>>();
Instance\ProjectInstance.cs (32)
93private List<string> _defaultTargets;
95private List<string> _initialTargets;
187private IDictionary<string, List<TargetSpecification>> _beforeTargets;
188private IDictionary<string, List<TargetSpecification>> _afterTargets;
567thisAsIEvaluatorData.AfterTargets = new Dictionary<string, List<TargetSpecification>>();
568thisAsIEvaluatorData.BeforeTargets = new Dictionary<string, List<TargetSpecification>>();
1180/// Gets a <see cref="List{ProjectItemElement}"/> object containing evaluated items.
1182public List<ProjectItemElement> EvaluatedItemElements
1265public List<string> DefaultTargets
1276public List<string> InitialTargets
1468List<string> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.InitialTargets
1486List<string> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.DefaultTargets
1504IDictionary<string, List<TargetSpecification>> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.BeforeTargets
1514IDictionary<string, List<TargetSpecification>> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.AfterTargets
1527Dictionary<string, List<string>> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.ConditionedProperties
2545translator.TranslateDictionary(ref _beforeTargets, TranslatorForTargetSpecificDictionaryKey, TranslatorForTargetSpecificDictionaryValue, count => new Dictionary<string, List<TargetSpecification>>(count));
2546translator.TranslateDictionary(ref _afterTargets, TranslatorForTargetSpecificDictionaryKey, TranslatorForTargetSpecificDictionaryValue, count => new Dictionary<string, List<TargetSpecification>>(count));
2559private static void TranslatorForTargetSpecificDictionaryValue(ITranslator translator, ref List<TargetSpecification> value)
2829List<TargetSpecification> beforeTargetsForTarget;
2846List<TargetSpecification> afterTargetsForTarget;
3032List<DictionaryEntry> clearedVariables = null;
3294List<string> defaultTargets,
3295List<string> initialTargets,
3296IDictionary<string, List<TargetSpecification>> beforeTargets,
3297IDictionary<string, List<TargetSpecification>> afterTargets)
3305private void InitializeTargetsData(List<string> defaultTargets,
3306List<string> initialTargets,
3307IDictionary<string, List<TargetSpecification>> beforeTargets,
3308IDictionary<string, List<TargetSpecification>> afterTargets)
3321var importPaths = new List<string>(Math.Max(0, importClosure.Count - 1) /* outer project */);
3334var importPathsIncludingDuplicates = new List<string>(Math.Max(0, importClosureWithDuplicates.Count - 1) /* outer project */);
3414List<ProjectItemDefinitionInstance> inheritedItemDefinitions = null;
Instance\TaskRegistry.cs (15)
155private Dictionary<RegisteredTaskIdentity, List<RegisteredTaskRecord>> _taskRegistrations;
162private readonly Dictionary<string, List<RegisteredTaskRecord>> _overriddenTasks = new Dictionary<string, List<RegisteredTaskRecord>>();
231internal IDictionary<RegisteredTaskIdentity, List<RegisteredTaskRecord>> TaskRegistrations
537if (_overriddenTasks.TryGetValue(taskName, out List<RegisteredTaskRecord> recs))
666if (_taskRegistrations.TryGetValue(taskIdentity, out List<RegisteredTaskRecord> taskAssemblies))
709List<RegisteredTaskRecord> registeredTaskEntries;
734if (_overriddenTasks.TryGetValue(unqualifiedTaskName, out List<RegisteredTaskRecord> recs))
749List<RegisteredTaskRecord> unqualifiedTaskNameMatches = new();
759private static Dictionary<RegisteredTaskIdentity, List<RegisteredTaskRecord>> CreateRegisteredTaskDictionary(int? capacity = null)
762? new Dictionary<RegisteredTaskIdentity, List<RegisteredTaskRecord>>(capacity.Value, RegisteredTaskIdentity.RegisteredTaskIdentityComparer.Exact)
763: new Dictionary<RegisteredTaskIdentity, List<RegisteredTaskRecord>>(RegisteredTaskIdentity.RegisteredTaskIdentityComparer.Exact);
1935IDictionary<RegisteredTaskIdentity, List<RegisteredTaskRecord>> copy = _taskRegistrations;
1940_taskRegistrations = (Dictionary<RegisteredTaskIdentity, List<RegisteredTaskRecord>>)copy;
1954private void TranslateTaskRegistrationValue(ITranslator translator, ref List<RegisteredTaskRecord> taskRecords)
Microsoft.Build.BuildCheck.UnitTests (13)
Microsoft.Build.CommandLine.UnitTests (27)
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
4296private static void AssertGlobResult(GlobResultList expected, string project)
4298var globs = ObjectModelHelpers.CreateInMemoryProject(project).GetAllGlobs();
4302private static void AssertGlobResult(GlobResultList expected, string project, string itemType)
4304var globs = ObjectModelHelpers.CreateInMemoryProject(project).GetAllGlobs(itemType);
4308private static void AssertGlobResultsEqual(GlobResultList expected, List<GlobResult> globs)
4321private static void AssertProvenanceResult(ProvenanceResultTupleList expected, string project, string itemValue)
4323var provenanceResult = ObjectModelHelpers.CreateInMemoryProject(project).GetItemProvenance(itemValue);
4327private static void AssertProvenanceResult(ProvenanceResultTupleList expected, string project, string itemValue, string itemType)
4329var provenanceResult = ObjectModelHelpers.CreateInMemoryProject(project).GetItemProvenance(itemValue, itemType);
4333private static void AssertProvenanceResult(ProvenanceResultTupleList expected, string project, string itemValue, int position)
4339var provenanceResult = p.GetItemProvenance(item);
4355private static void AssertProvenanceResult(ProvenanceResultTupleList expected, List<ProvenanceResult> actual)
Microsoft.Build.Engine.UnitTests (331)
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 (79)
104List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
117List<TaskRegistry.RegisteredTaskRecord> registrationRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity(taskElement.TaskName, null)];
138List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
157List<TaskRegistry.RegisteredTaskRecord> registrationRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity(taskElement.TaskName, null)];
180List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
201List<TaskRegistry.RegisteredTaskRecord> singletonBucket = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity(elementList[1].TaskName, null)];
210List<TaskRegistry.RegisteredTaskRecord> duplicateBucket = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity(elementList[0].TaskName, null)];
245List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
264List<TaskRegistry.RegisteredTaskRecord> registrationRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity(taskElement.TaskName, null)];
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>();
568List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
609List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
697List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
770List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
822List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
936List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
984List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
1046List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
1109List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
1130IDictionary<TaskRegistry.RegisteredTaskIdentity, List<TaskRegistry.RegisteredTaskRecord>> registeredTasks = registry.TaskRegistrations;
1143List<TaskRegistry.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity(expandedtaskName, null)];
1162List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
1186IDictionary<TaskRegistry.RegisteredTaskIdentity, List<TaskRegistry.RegisteredTaskRecord>> registeredTasks = registry.TaskRegistrations;
1198List<TaskRegistry.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity(expandedtaskName, null)];
1213List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
1224IDictionary<TaskRegistry.RegisteredTaskIdentity, List<TaskRegistry.RegisteredTaskRecord>> registeredTasks = registry.TaskRegistrations;
1227List<TaskRegistry.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Hello", null)];
1237List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
1262List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
1276IDictionary<TaskRegistry.RegisteredTaskIdentity, List<TaskRegistry.RegisteredTaskRecord>> registeredTasks = registry.TaskRegistrations;
1279List<TaskRegistry.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", null)];
1294List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
1312IDictionary<TaskRegistry.RegisteredTaskIdentity, List<TaskRegistry.RegisteredTaskRecord>> registeredTasks = registry.TaskRegistrations;
1315List<TaskRegistry.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", null)];
1349List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1364List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1381List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1424List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1470List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1488List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1559List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1574List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1589List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1606List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1621List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1636List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1653List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
1664List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
1685IDictionary<TaskRegistry.RegisteredTaskIdentity, List<TaskRegistry.RegisteredTaskRecord>> registeredTasks = registry.TaskRegistrations;
1688List<TaskRegistry.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", null)];
1727List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
1737List<TaskRegistry.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", null)];
1751List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
1761List<TaskRegistry.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", null)];
1776List<ProjectUsingTaskElement> elementList = CreateTaskBodyElementWithAttributes(bool.FalseString, body);
1790List<ProjectUsingTaskElement> elementList = CreateTaskBodyElementWithAttributes(bool.TrueString, body);
1810List<ProjectUsingTaskElement> elementList = CreateTaskBodyElementWithAttributes(evaluate, "");
1822List<ProjectUsingTaskElement> elementList = CreateTaskBodyElementWithAttributes(evaluate, "");
1834List<ProjectUsingTaskElement> elementList = CreateTaskBodyElementWithAttributes(evaluate, "");
1846List<ProjectUsingTaskElement> elementList = CreateTaskBodyElementWithAttributes(evaluate, "");
1979public void TaskRegistryCanSerializeViaTranslator(List<ProjectUsingTaskElement> usingTaskElements, Toolset toolset)
2110List<ProjectUsingTaskElement> elementList = CreateParameterElementWithAttributes(output, required, type);
2134private static List<ProjectUsingTaskElement> CreateParameterElementWithAttributes(string output, string required, string type)
2136List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
2152private static List<ProjectUsingTaskElement> CreateTaskBodyElementWithAttributes(string evaluate, string body)
2154List<ProjectUsingTaskElement> elementList = new List<ProjectUsingTaskElement>();
2172internal static int GetDeepCountOfRegisteredTasks(IDictionary<TaskRegistry.RegisteredTaskIdentity, List<TaskRegistry.RegisteredTaskRecord>> registryRecords)
2180internal TaskRegistry CreateTaskRegistryAndRegisterTasks(List<ProjectUsingTaskElement> usingTaskElements, Toolset toolset = null)
2214List<ProjectItemInstance> intermediateAssemblyItemGroup = new List<ProjectItemInstance>();
2223List<ProjectItemInstance> firstItemGroup = new List<ProjectItemInstance>();
2230List<ProjectItemInstance> secondItemGroup = new List<ProjectItemInstance>();
2237List<ProjectItemInstance> thirdItemGroup = new List<ProjectItemInstance>();
2241List<ProjectItemInstance> trueItemGroup = new List<ProjectItemInstance>();
Microsoft.Build.Framework (36)
Microsoft.Build.Framework.UnitTests (8)
Microsoft.Build.Tasks.CodeAnalysis (15)
Microsoft.Build.Tasks.CodeAnalysis.Sdk (15)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (4)
Microsoft.Build.Tasks.Core (364)
AssemblyDependency\ReferenceTable.cs (49)
387internal List<string> ListOfExcludedAssemblies { get; private set; }
524List<Exception> exceptions)
1046var dependencies = new List<AssemblyNameExtension>(dependentAssemblies?.Length ?? 0);
1114List<KeyValuePair<AssemblyNameExtension, Reference>> newEntries)
1235internal static void CalculateParentAssemblyDirectories(List<DirectoryWithParentAssembly> parentReferenceFolders, Reference parentReference)
1286var assembliesConsideredAndRejected = new List<ResolutionSearchLocation>();
1291var parentReferenceFolders = new List<DirectoryWithParentAssembly>();
1298var jaggedResolvers = new List<Resolver[]>();
1382var removedReferences = new List<Reference>();
1385var dependencyGraph = new Dictionary<Reference, List<ReferenceAssemblyExtensionPair>>();
1473private static void AddToDependencyGraph(Dictionary<Reference, List<ReferenceAssemblyExtensionPair>> dependencyGraph, AssemblyNameExtension assemblyName, Reference assemblyReference)
1480if (!dependencyGraph.TryGetValue(dependee, out List<ReferenceAssemblyExtensionPair> dependencies))
1493private void RemoveDependencyMarkedForExclusion(LogExclusionReason logExclusionReason, bool removeOnlyNoWarning, string subsetName, Dictionary<AssemblyNameExtension, Reference> goodReferences, List<Reference> removedReferences, AssemblyNameExtension assemblyName, Reference assemblyReference)
1542private static void RemovePrimaryReferenceMarkedForExclusion(LogExclusionReason logExclusionReason, bool removeOnlyNoWarning, string subsetName, List<Reference> removedReferences, AssemblyNameExtension assemblyName, Reference assemblyReference)
1577private static void RemoveDependencies(Reference removedReference, Dictionary<AssemblyNameExtension, Reference> referenceList, Dictionary<Reference, List<ReferenceAssemblyExtensionPair>> dependencyList)
1580if (!dependencyList.TryGetValue(removedReference, out List<ReferenceAssemblyExtensionPair> dependencies))
1627List<Exception> exceptions)
1697var newEntries = new List<KeyValuePair<AssemblyNameExtension, Reference>>();
1810private void ResolveConflictsBetweenReferences(Dictionary<string, List<AssemblyNameReference>> baseNameToReferences)
1813foreach (List<AssemblyNameReference> assemblyReferences in baseNameToReferences.Values)
1819private void ResolveConflictsBetweenReferences(List<AssemblyNameReference> assemblyReferences)
1848out List<DependentAssembly> idealRemappings,
1849out List<AssemblyNameReference> conflictingReferences)
1855Dictionary<string, List<AssemblyNameReference>> baseNameToReferences = BuildSimpleNameTable();
1873foreach (List<AssemblyNameReference> references in baseNameToReferences.Values)
1921var assemblyNamesList = new List<AssemblyNameReference>(conflictingFullNames.Count);
1928var idealRemappingsList = new List<DependentAssembly>(assemblyNamesList.Count);
2052var assemblyTableInfos = new List<AssemblyTableInfo>();
2184private Dictionary<string, List<AssemblyNameReference>> BuildSimpleNameTable()
2188var baseNameToReferences = new Dictionary<string, List<AssemblyNameReference>>(References.Count, StringComparer.OrdinalIgnoreCase);
2201if (!baseNameToReferences.TryGetValue(baseName, out List<AssemblyNameReference> refs))
2214Dictionary<string, List<AssemblyNameReference>> baseNameToReferences)
2216List<string> toRemove = new(baseNameToReferences.Count);
2217foreach (KeyValuePair<string, List<AssemblyNameReference>> kvp in baseNameToReferences)
2592var primaryItems = new List<ITaskItem>();
2593var dependencyItems = new List<ITaskItem>();
2594var relatedItems = new List<ITaskItem>();
2595var satelliteItems = new List<ITaskItem>();
2596var serializationAssemblyItems = new List<ITaskItem>();
2597var scatterItems = new List<ITaskItem>();
2598var copyLocalItems = new List<ITaskItem>();
2674private ITaskItem SetItemMetadata(List<ITaskItem> relatedItems, List<ITaskItem> satelliteItems, List<ITaskItem> serializationAssemblyItems, List<ITaskItem> scatterItems, string fusionName, Reference reference, AssemblyNameExtension assemblyName)
2735List<string> relatedFileExtensions = reference.GetRelatedFileExtensions();
2736List<string> satellites = reference.GetSatelliteFiles();
2737List<string> serializationAssemblyFiles = reference.GetSerializationAssemblyFiles();
3048private 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>();
3876public 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;
368private bool BuildProjectsInParallel(Dictionary<string, string> propertiesTable, string[] undefinePropertiesArray, List<string[]> targetLists, bool success, bool[] skipProjects)
372var projectsToBuildInParallel = new List<ITaskItem>();
408var expandedProperties = new List<string>();
409var expandedTargets = new List<string>();
448internal static List<string[]> CreateTargetLists(string[] targets, bool runEachTargetSeparately)
454var targetLists = new List<string[]>(runEachTargetSeparately ? targets.Length : 1);
475List<ITaskItem> projects,
478List<string[]> targetLists,
483List<ITaskItem> targetOutputs,
RedistList.cs (15)
93var errors = new List<Exception>();
94var errorFilenames = new List<string>();
95var assemblyList = new List<AssemblyEntry>();
96var remappingEntries = new List<AssemblyRemapping>();
523internal Dictionary<string, string> GenerateDenyList(AssemblyTableInfo[] allowListAssemblyTableInfo, List<Exception> allowListErrors, List<string> allowListErrorFileNames)
547var allowListAssemblies = new List<AssemblyEntry>();
555var allowListAssembliesReadIn = new List<AssemblyEntry>();
649internal static string ReadFile(AssemblyTableInfo assemblyTableInfo, List<AssemblyEntry> assembliesList, List<Exception> errorsList, List<string> errorFilenamesList, List<AssemblyRemapping> remapEntries)
727private static void ParseRemapSection(AssemblyTableInfo assemblyTableInfo, string path, string redistName, XmlReader reader, List<AssemblyRemapping> mapping)
784private static void ParseFileListSection(AssemblyTableInfo assemblyTableInfo, string path, string redistName, XmlReader reader, Dictionary<string, AssemblyEntry> assemblyEntries, List<AssemblyRemapping> remapEntries)
1045var subsetFilesForFrameworkDirectory = new List<string>();
ResolveManifestFiles.cs (18)
171GetPublishInfo(out List<PublishInfo> assemblyPublishInfoList, out List<PublishInfo> filePublishInfoList, out List<PublishInfo> satellitePublishInfoList, out List<PublishInfo> manifestEntryPointList);
384private void GetOutputAssemblies(List<PublishInfo> publishInfos, List<ITaskItem> assemblyList)
496private ITaskItem[] GetOutputAssembliesAndSatellites(List<PublishInfo> assemblyPublishInfos, List<PublishInfo> satellitePublishInfos)
498var assemblyList = new List<ITaskItem>();
504private ITaskItem[] GetOutputFiles(List<PublishInfo> publishInfos, IEnumerable<ITaskItem> outputAssemblies)
506var fileList = new List<ITaskItem>();
603private void GetOutputSatellites(List<PublishInfo> publishInfos, List<ITaskItem> assemblyList)
666private ITaskItem GetOutputEntryPoint(ITaskItem entryPoint, List<PublishInfo> manifestEntryPointList)
704out List<PublishInfo> assemblyPublishInfos,
705out List<PublishInfo> filePublishInfos,
706out List<PublishInfo> satellitePublishInfos,
707out List<PublishInfo> manifestEntryPointPublishInfos)
Microsoft.Build.Tasks.UnitTests (62)
XslTransformation_Tests.cs (25)
102List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs;
103List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs;
167List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs;
168List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs;
213List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs;
214List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs;
263List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs;
264List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs;
293List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs;
294List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs;
327List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs;
328List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs;
361List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs;
362List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs;
398List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs;
399List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs;
434List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs;
435List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs;
488List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs;
489List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs;
613List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs;
614List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs;
1106private 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)
1141List<bool> results = new List<bool>();
Microsoft.Build.UnitTests.Shared (41)
Microsoft.Build.Utilities.Core (88)
ToolLocationHelper.cs (31)
267private static List<string> s_targetFrameworkMonikers = null;
335var assemblyFolders = new List<AssemblyFoldersExInfo>();
661var referenceDirectories = new List<string>(4);
678private static void AddSDKPaths(string sdkRoot, string folderName, string targetConfiguration, string targetArchitecture, List<string> directories)
725var redistDirectories = new List<string>(4);
755var designTimeDirectories = new List<string>(4);
788var filteredTargetPlatformSdkList = new List<TargetPlatformSDK>();
1129var contractWinMDs = new List<string>();
1343var platforms = new List<string>();
1380var availablePlatformVersions = new List<Version>();
2110var referencePaths = new List<string>();
2136var referencePaths = new List<string>();
2160var referencePaths = new List<string>();
2332var referencePaths = new List<string>();
2423private static void AddSDKPath(string sdkRoot, string contentFolderName, string targetConfiguration, string targetArchitecture, List<string> contentDirectories)
2440List<string> sdkDiskRoots = GetTargetPlatformMonikerDiskRoots(diskRoots);
2441List<string> extensionSdkDiskRoots = GetExtensionSdkDiskRoots(extensionDiskRoots);
2578internal static void GatherSDKListFromDirectory(List<string> diskroots, Dictionary<TargetPlatformSDK, TargetPlatformSDK> platformSDKs)
2605SortedDictionary<Version, List<string>> versionsInRoot = VersionUtilities.GatherVersionStrings(null, rootPathWithIdentifier.GetDirectories().Select<DirectoryInfo, string>(directory => directory.Name));
2610foreach (KeyValuePair<Version, List<string>> directoryUnderRoot in versionsInRoot)
2714SortedDictionary<Version, List<string>> sortedVersions = VersionUtilities.GatherVersionStrings(null, versions);
2716foreach (KeyValuePair<Version, List<string>> registryVersions in sortedVersions)
2892private static void GetDefaultSDKDiskRoots(List<string> diskRoots)
2923private static void ExtractSdkDiskRootsFromEnvironment(List<string> diskRoots, string directoryRoots)
2944private static List<string> GetTargetPlatformMonikerDiskRoots(string[] diskRoots)
2946var sdkDiskRoots = new List<string>();
2971private static List<string> GetExtensionSdkDiskRoots(string[] diskRoots)
2973var sdkDiskRoots = new List<string>();
3770var frameworkIdentifiers = new List<string>();
3844var frameworkVersions = new List<string>();
3916var 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 (190)
DocumentationCommentId.cs (44)
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();
701public static bool ParseDeclaredSymbolId(string id, Compilation compilation, List<ISymbol> results)
720public static bool ParseReferencedSymbolId(string id, Compilation compilation, List<ISymbol> results)
733private static void ParseDeclaredId(string id, ref int index, Compilation compilation, List<ISymbol> results)
769var containers = s_namespaceOrTypeListPool.Allocate();
866var results = s_symbolListPool.Allocate();
885private static void ParseTypeSymbol(string id, ref int index, Compilation compilation, ISymbol? typeParameterContext, List<ISymbol> results)
893var contexts = s_symbolListPool.Allocate();
973private static void ParseTypeParameterSymbol(string id, ref int index, ISymbol? typeParameterContext, List<ISymbol> results)
1010private static void ParseNamedTypeSymbol(string id, ref int index, Compilation compilation, ISymbol? typeParameterContext, List<ISymbol> results)
1012var containers = s_namespaceOrTypeListPool.Allocate();
1022List<ITypeSymbol>? typeArguments = null;
1121private static bool ParseTypeArguments(string id, ref int index, Compilation compilation, ISymbol? typeParameterContext, List<ITypeSymbol> typeArguments)
1155private static void GetMatchingTypes(List<INamespaceOrTypeSymbol> containers, string memberName, int arity, List<ISymbol> results)
1163private static void GetMatchingTypes(INamespaceOrTypeSymbol container, string memberName, int arity, List<ISymbol> results)
1180private static void GetMatchingNamespaceOrTypes(List<INamespaceOrTypeSymbol> containers, string memberName, List<ISymbol> results)
1188private static void GetMatchingNamespaceOrTypes(INamespaceOrTypeSymbol container, string memberName, List<ISymbol> results)
1201private static void GetMatchingNamespaces(List<INamespaceOrTypeSymbol> containers, string memberName, List<ISymbol> results)
1209private static void GetMatchingNamespaces(INamespaceOrTypeSymbol container, string memberName, List<ISymbol> results)
1222private static void GetMatchingMethods(string id, ref int index, List<INamespaceOrTypeSymbol> containers, string memberName, int arity, Compilation compilation, List<ISymbol> results)
1224var parameters = s_parameterListPool.Allocate();
1289private static void GetMatchingProperties(string id, ref int index, List<INamespaceOrTypeSymbol> containers, string memberName, Compilation compilation, List<ISymbol> results)
1294List<ParameterInfo>? parameters = null;
1347private static void GetMatchingFields(List<INamespaceOrTypeSymbol> containers, string memberName, List<ISymbol> results)
1363private static void GetMatchingEvents(List<INamespaceOrTypeSymbol> containers, string memberName, List<ISymbol> results)
1379private static bool AllParametersMatch(ImmutableArray<IParameterSymbol> symbolParameters, List<ParameterInfo> expectedParameters)
1453private static bool ParseParameterList(string id, ref int index, Compilation compilation, ISymbol typeParameterContext, List<ParameterInfo> parameters)
1565private 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 (39)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
86var result = new List<ITypeSymbol>
Microsoft.CodeAnalysis.Collections.Package (4)
Microsoft.CodeAnalysis.CSharp (59)
CommandLine\CSharpCommandLineParser.cs (24)
54List<Diagnostic> diagnostics = new List<Diagnostic>();
56List<string>? scriptArgs = IsScriptCommandLineParser ? new List<string>() : null;
57List<string>? responsePaths = IsScriptCommandLineParser ? new List<string>() : null;
100List<CommandLineResource> managedResources = new List<CommandLineResource>();
101List<CommandLineSourceFile> sourceFiles = new List<CommandLineSourceFile>();
102List<CommandLineSourceFile> additionalFiles = new List<CommandLineSourceFile>();
104List<CommandLineSourceFile> embeddedFiles = new List<CommandLineSourceFile>();
111List<CommandLineReference> metadataReferences = new List<CommandLineReference>();
112List<CommandLineAnalyzerReference> analyzers = new List<CommandLineAnalyzerReference>();
113List<string> libPaths = new List<string>();
114List<string> sourcePaths = new List<string>();
115List<string> keyFileSearchPaths = new List<string>();
116List<string> usings = new List<string>();
126List<string> features = new List<string>();
1597private static void ParseAndResolveReferencePaths(string? switchName, ReadOnlyMemory<char>? switchValue, string? baseDirectory, List<string> builder, MessageID origin, List<Diagnostic> diagnostics)
1624private static string? GetWin32Setting(string arg, string? value, List<Diagnostic> diagnostics)
1647List<Diagnostic> diagnostics,
1649List<CommandLineSourceFile> sourceFiles,
1717private ImmutableArray<string> BuildSearchPaths(string? sdkDirectoryOpt, List<string> libPaths, List<string>? responsePathsOpt)
1866private static void ParseAnalyzers(string arg, ReadOnlyMemory<char>? valueMemory, List<CommandLineAnalyzerReference> analyzerReferences, List<Diagnostic> diagnostics)
1893private static void ParseAssemblyReferences(string arg, ReadOnlyMemory<char>? valueMemory, IList<Diagnostic> diagnostics, bool embedInteropTypes, List<CommandLineReference> commandLineReferences)
Microsoft.CodeAnalysis.CSharp.CodeStyle (46)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\BaseFormattingRule.cs (9)
18List<IndentBlockOperation> list,
33List<IndentBlockOperation> list,
58List<IndentBlockOperation> list,
72List<IndentBlockOperation> list,
86List<IndentBlockOperation> list,
101List<IndentBlockOperation> list,
111List<IndentBlockOperation> list,
136protected static void AddAnchorIndentationOperation(List<AnchorIndentationOperation> list, SyntaxToken anchorToken, SyntaxToken endToken)
146protected 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)
46public override void AddIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode node, in NextIndentBlockOperationAction nextOperation)
65private static void AddTypeParameterConstraintClauseOperation(List<IndentBlockOperation> list, SyntaxNode node)
74private void AddSwitchIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
134private void AddLabelIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
150private static void AddAlignmentBlockOperation(List<IndentBlockOperation> list, SyntaxNode node)
205private static void SetAlignmentBlockOperation(List<IndentBlockOperation> list, SyntaxNode baseNode, SyntaxNode body)
216private void AddBlockIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
253private static void AddBracketIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
288private static void AddAlignmentBlockOperationRelativeToFirstTokenOnBaseTokenLine(List<IndentBlockOperation> list, (SyntaxToken openBrace, SyntaxToken closeBrace) bracePair)
294private static void AddEmbeddedStatementsIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
356private static void AddEmbeddedStatementsIndentationOperation(List<IndentBlockOperation> list, StatementSyntax statement)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (26)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (19)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (227)
Completion\CompletionProviders\AbstractCSharpCompletionProviderTests.cs (6)
57List<CompletionFilter> matchingFilters = null, CompletionItemFlags? flags = null,
70List<CompletionFilter> matchingFilters, CompletionItemFlags? flags, CompletionOptions options, bool skipSpeculation = false)
83bool? isComplexTextEdit = null, List<CompletionFilter> matchingFilters = null, CompletionItemFlags? flags = null,
108string displayTextPrefix, string inlineDescription, bool? isComplexTextEdit, List<CompletionFilter> matchingFilters,
128List<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 (17)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (12)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (15)
Microsoft.CodeAnalysis.CSharp.Features (125)
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
222var switchArms = node.Sections
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (10)
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (10)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (165)
Semantics\LookupTests.cs (105)
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);
1088var lookupNames = GetLookupNames(testSrc);
1117var lookupNames = GetLookupNames(testSrc);
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 (79)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (106)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (23)
Microsoft.CodeAnalysis.CSharp.Workspaces (88)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\BaseFormattingRule.cs (9)
18List<IndentBlockOperation> list,
33List<IndentBlockOperation> list,
58List<IndentBlockOperation> list,
72List<IndentBlockOperation> list,
86List<IndentBlockOperation> list,
101List<IndentBlockOperation> list,
111List<IndentBlockOperation> list,
136protected static void AddAnchorIndentationOperation(List<AnchorIndentationOperation> list, SyntaxToken anchorToken, SyntaxToken endToken)
146protected 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)
46public override void AddIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode node, in NextIndentBlockOperationAction nextOperation)
65private static void AddTypeParameterConstraintClauseOperation(List<IndentBlockOperation> list, SyntaxNode node)
74private void AddSwitchIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
134private void AddLabelIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
150private static void AddAlignmentBlockOperation(List<IndentBlockOperation> list, SyntaxNode node)
205private static void SetAlignmentBlockOperation(List<IndentBlockOperation> list, SyntaxNode baseNode, SyntaxNode body)
216private void AddBlockIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
253private static void AddBracketIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
288private static void AddAlignmentBlockOperationRelativeToFirstTokenOnBaseTokenLine(List<IndentBlockOperation> list, (SyntaxToken openBrace, SyntaxToken closeBrace) bracePair)
294private static void AddEmbeddedStatementsIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
356private static void AddEmbeddedStatementsIndentationOperation(List<IndentBlockOperation> list, StatementSyntax statement)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (6)
Microsoft.CodeAnalysis.EditorFeatures (56)
Preview\AbstractPreviewFactoryService.cs (12)
77var previewItems = new List<SolutionPreviewItem>();
470var originalLineSpans = CreateLineSpans(oldBuffer.CurrentSnapshot, originalSpans, cancellationToken);
471var changedLineSpans = CreateLineSpans(newBuffer.CurrentSnapshot, allSpans, cancellationToken);
546var originalLineSpans = CreateLineSpans(oldBuffer.CurrentSnapshot, originalSpans, cancellationToken);
547var changedLineSpans = CreateLineSpans(newBuffer.CurrentSnapshot, changedSpans, cancellationToken);
579List<LineSpan> originalSpans, List<LineSpan> changedSpans, ReferenceCountedDisposable<PreviewWorkspace> leftWorkspace, ReferenceCountedDisposable<PreviewWorkspace> rightWorkspace,
729private static List<LineSpan> CreateLineSpans(ITextSnapshot textSnapshot, NormalizedSpanCollection allSpans, CancellationToken cancellationToken)
733var result = new List<LineSpan>();
771private static void MergeLineSpans(List<LineSpan> lineSpans, LineSpan nextLineSpan)
809var lineSpans = new List<Span>();
824var lineSpans = new List<Span>();
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (43)
Completion\AbstractCompletionProviderTests.cs (26)
125List<CompletionFilter> matchingFilters, CompletionItemFlags? flags, CompletionOptions options,
131List<CompletionFilter> matchingFilters, CompletionItemFlags? flags, CompletionOptions options, bool skipSpeculation = false);
149List<CompletionFilter> matchingFilters,
172List<CompletionFilter> matchingFilters,
303private static bool FiltersMatch(List<CompletionFilter> expectedMatchingFilters, RoslynCompletion.CompletionItem item)
305var matchingFilters = FilterSet.GetFilters(item);
317List<CompletionFilter> matchingFilters, CompletionItemFlags? flags, CompletionOptions options, bool skipSpeculation = false)
343List<CompletionFilter> matchingFilters, CompletionItemFlags? flags, CompletionOptions options, bool skipSpeculation = false)
435bool? isComplexTextEdit = null, List<CompletionFilter> matchingFilters = null,
452bool? isComplexTextEdit = null, List<CompletionFilter> matchingFilters = null, CompletionItemFlags? flags = null,
512List<CompletionFilter> matchingFilters, CompletionItemFlags? flags,
543List<CompletionFilter> matchingFilters,
577List<CompletionFilter> matchingFilters,
1070List<CompletionFilter> matchingFilters, CompletionItemFlags? flags, CompletionOptions options, bool skipSpeculation = false)
1083List<CompletionFilter> matchingFilters, CompletionItemFlags? flags, CompletionOptions options, bool skipSpeculation = false)
1093List<CompletionFilter> matchingFilters, CompletionItemFlags? flags, CompletionOptions options, bool skipSpeculation = false)
1106bool? isComplexTextEdit = null, List<CompletionFilter> matchingFilters = null, CompletionItemFlags? flags = null, CompletionOptions options = null, bool skipSpeculation = false)
1124List<CompletionFilter> matchingFilters = null, CompletionItemFlags? flags = null, CompletionOptions options = null, bool skipSpeculation = false)
1139List<CompletionFilter> matchingFilters = null, CompletionItemFlags? flags = null,
1153List<CompletionFilter> matchingFilters, CompletionItemFlags? flags, CompletionOptions options, bool skipSpeculation = false)
1172List<CompletionFilter> matchingFilters, CompletionItemFlags? flags, CompletionOptions options, bool skipSpeculation = false)
1182List<CompletionFilter> matchingFilters, CompletionItemFlags? flags, CompletionOptions options)
1195List<CompletionFilter> matchingFilters = null, CompletionItemFlags? flags = null,
1220List<CompletionFilter> matchingFilters = null, CompletionItemFlags? flags = null,
1232List<CompletionFilter> matchingFilters, CompletionItemFlags? flags, CompletionOptions options)
1246List<CompletionFilter> matchingFilters = null, CompletionItemFlags? flags = null,
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (35)
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 (6)
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (1)
Microsoft.CodeAnalysis.ExternalAccess.Xaml (1)
Microsoft.CodeAnalysis.Features (216)
CodeFixes\Service\CodeFixService.cs (12)
128var spanToErrorDiagnostics = new SortedDictionary<TextSpan, List<DiagnosticData>>();
129var spanToOtherDiagnostics = new SortedDictionary<TextSpan, List<DiagnosticData>>();
155SortedDictionary<TextSpan, List<DiagnosticData>> spanToDiagnostics,
263private static SortedDictionary<TextSpan, List<DiagnosticData>> ConvertToMap(
270var spanToDiagnostics = new SortedDictionary<TextSpan, List<DiagnosticData>>();
318var spanToDiagnostics = new SortedDictionary<TextSpan, List<DiagnosticData>>
448SortedDictionary<TextSpan, List<DiagnosticData>> spanToDiagnostics,
467using var _1 = PooledDictionary<CodeFixProvider, List<(TextSpan range, List<DiagnosticData> diagnostics)>>.GetInstance(out var fixerToRangesAndDiagnostics);
596List<DiagnosticData> diagnostics,
598PooledDictionary<CodeFixProvider, List<(TextSpan range, List<DiagnosticData> diagnostics)>> fixerToRangesAndDiagnostics)
DocumentationComments\AbstractDocumentationCommentSnippetService.cs (11)
25protected abstract List<string> GetDocumentationCommentStubLines(TMemberNode member, string existingCommentText);
89var lines = addIndentation
110private List<string>? GetDocumentationCommentLines(SyntaxToken token, SourceText text, in DocumentationCommentOptions options, out string? indentText, out int caretOffset, out int spanToReplaceLength)
114var lines = GetDocumentationStubLines(token, text, options, out caretOffset, out spanToReplaceLength, out var existingCommentText);
141private List<string>? GetDocumentationCommentLinesNoIndentation(SyntaxToken token, SourceText text, in DocumentationCommentOptions options, out int caretOffset, out int spanToReplaceLength, out string? indentText)
144var lines = GetDocumentationStubLines(token, text, options, out caretOffset, out spanToReplaceLength, out var existingCommentText);
158private List<string>? GetDocumentationStubLines(SyntaxToken token, SourceText text, in DocumentationCommentOptions options, out int caretOffset, out int spanToReplaceLength, out string? existingCommentText)
185var lines = GetDocumentationCommentStubLines(targetMember, existingCommentText);
251private static void IndentLines(List<string> lines, string? indentText)
296var lines = GetDocumentationCommentLines(token, text, options, out var indentText, out _, out _);
343var lines = GetDocumentationCommentStubLines(targetMember, string.Empty);
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (20)
394protected abstract List<SyntaxNode> GetExceptionHandlingAncestors(SyntaxNode node, SyntaxNode root, bool isNonLeaf);
914var ancestors = GetExceptionHandlingAncestors(newStatement, newBody.EncompassingAncestor, oldActiveStatements[i].Statement.IsNonLeaf);
956public readonly List<int>? ActiveNodeIndices;
962public LambdaInfo(List<int> activeNodeIndices)
967private LambdaInfo(List<int>? activeNodeIndices, DeclarationBodyMap bodyMap, LambdaBody? newLambdaBody)
1434var oldAncestors = GetExceptionHandlingAncestors(oldStatementSyntax, oldEncompassingAncestor, isNonLeaf);
1435var newAncestors = GetExceptionHandlingAncestors(newStatementSyntax, newEncompassingAncestor, isNonLeaf);
1616private static List<KeyValuePair<SyntaxNode, SyntaxNode>>? GetMatchingActiveNodes(IEnumerable<ActiveNode> activeNodes)
1619List<KeyValuePair<SyntaxNode, SyntaxNode>>? lazyKnownMatches = null;
1638var ancestors = GetExceptionHandlingAncestors(node, root, isNonLeaf);
1642private ActiveStatementExceptionRegions GetExceptionRegions(List<SyntaxNode> exceptionHandlingAncestors, SyntaxTree tree, CancellationToken cancellationToken)
1895var newNodes = GetAncestors(newEncompassingAncestor, newActiveStatement, nodeSelector);
1901var oldNodes = GetAncestors(oldEncompassingAncestor, oldActiveStatement, nodeSelector);
1925private void ReportRudeEditsAndInserts(List<SyntaxNode?>? oldNodes, List<SyntaxNode?> newNodes, RudeEditDiagnosticsBuilder diagnostics)
1951List<SyntaxNode?> oldNodes,
1953List<SyntaxNode?> newNodes,
2048private static int IndexOfEquivalent<TSyntaxNode>(SyntaxNode newNode, List<SyntaxNode?> oldNodes, int startIndex, Func<TSyntaxNode, TSyntaxNode, bool> comparer)
2063private static List<SyntaxNode?>? GetAncestors(SyntaxNode? root, SyntaxNode node, Func<SyntaxNode, bool> nodeSelector)
2065List<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 (6)
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)
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 (8)
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);
228PooledDictionary<string, List<(SyntaxTrivia pragma, bool isDisable)>> idToPragmasMap,
510PooledDictionary<string, List<(SyntaxTrivia pragma, bool isDisable)>> idToPragmasMap,
512PooledDictionary<string, List<SyntaxNode>> idToSuppressMessageAttributesMap,
546PooledDictionary<string, List<(SyntaxTrivia pragma, bool isDisable)>> idToPragmasMap,
586PooledDictionary<string, List<SyntaxNode>> idToSuppressMessageAttributesMap,
736PooledDictionary<string, List<SyntaxNode>> idToSuppressMessageAttributesMap,
Microsoft.CodeAnalysis.Features.Test.Utilities (16)
Microsoft.CodeAnalysis.Features.UnitTests (1)
Microsoft.CodeAnalysis.InteractiveHost (8)
Microsoft.CodeAnalysis.LanguageServer (4)
Microsoft.CodeAnalysis.LanguageServer.Protocol (16)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (12)
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)
115var errors = new List<Diagnostic>();
135bool 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)
198private 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)
381private static bool ValidateApiFiles(ImmutableDictionary<AdditionalText, SourceText> additionalFiles, ApiData shippedData, ApiData unshippedData, bool isPublic, List<Diagnostic> errors)
409private 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 (20)
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 (84)
Microsoft.CodeAnalysis.Threading.Package (4)
Microsoft.CodeAnalysis.UnitTests (76)
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 (7)
42var expected = new List<int>();
221var list = new List<int>();
448var expectedList = new List<string>(new[] { "Microsoft", "Windows", "Bing", "Visual Studio", "Comics", "Computers", "Laptops" });
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 (280)
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;
51ref Dictionary<DocumentId, List<DiagnosticData>>? lazyLocals, DocumentId documentId, ImmutableArray<Diagnostic> diagnostics)
96private static void AddDocumentDiagnostic(ref Dictionary<DocumentId, List<DiagnosticData>>? map, TextDocument document, Diagnostic diagnostic)
122Dictionary<DocumentId, List<DiagnosticData>>? dummy = null;
130ref Dictionary<DocumentId, List<DiagnosticData>>? lazyLocals, SyntaxTree? tree, Diagnostic diagnostic)
183ref Dictionary<DocumentId, List<DiagnosticData>>? lazyLocals, SyntaxTree? tree, ImmutableArray<Diagnostic> diagnostics)
189private 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;
164if (_documentToModifiedSpansMap.TryGetValue(documentId, out var modifiedSpans))
169if (_documentToComplexifiedSpansMap.TryGetValue(documentId, out var complexifiedSpans))
189var 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 = [];
686List<(string path, MetadataReferenceProperties properties)> metadataReferencesRemovedInBatch,
687List<(string path, MetadataReferenceProperties properties)> metadataReferencesAddedInBatch)
724var projectReferencesCreated = new List<ProjectReference>();
758List<ProjectReference> projectReferencesRemovedInBatch,
759List<ProjectReference> projectReferencesAddedInBatch)
777List<string> analyzersRemovedInBatch,
778List<string> analyzersAddedInBatch)
797List<string> analyzersRemoved,
798List<string> analyzersAdded)
1347var newList = projectReferencesInWorkspace.ToList();
1440private static void ClearAndZeroCapacity<T>(List<T> list)
Microsoft.CodeAnalysis.Workspaces.MSBuild (8)
Rpc\RpcClient.cs (4)
121public Task InvokeAsync(int targetObject, string methodName, List<object?> parameters, CancellationToken cancellationToken)
127public async Task<T?> InvokeNullableAsync<T>(int targetObject, string methodName, List<object?> parameters, CancellationToken cancellationToken) where T : class
133public async Task<T> InvokeAsync<T>(int targetObject, string methodName, List<object?> parameters, CancellationToken cancellationToken) where T : notnull
140private async Task<object?> InvokeCoreAsync(int targetObject, string methodName, List<object?> parameters, Type? expectedReturnType, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (41)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (24)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (21)
Microsoft.CodeAnalysis.Workspaces.UnitTests (69)
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.Build.Manifest (6)
Microsoft.DotNet.Build.Manifest.Tests (3)
Microsoft.DotNet.Build.Tasks.Feed (7)
Microsoft.DotNet.Build.Tasks.Feed.Tests (16)
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.Deployment.Tasks.Links (3)
Microsoft.DotNet.GenFacades (2)
Microsoft.DotNet.Git.IssueManager (1)
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.SharedFramework.Sdk (6)
Microsoft.DotNet.SignCheckLibrary (19)
Microsoft.DotNet.SignCheckTask (7)
Microsoft.DotNet.SignTool (29)
Microsoft.DotNet.SignTool.Tests (139)
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 (77)
CollectionAssertsTests.cs (43)
58 var indices = new List<int>();
110 var indices = new List<int>();
123 var list = new List<int>();
133 var list = new List<int>();
155 var list = new List<int> { 42, 2112 };
167 var list = new List<int> { 42, 2112 };
196 var list = new List<int>();
206 var list = new List<int>();
228 var list = new List<int> { 42, 2112 };
247 var list = new List<int> { 42, 2112 };
289 var list = new List<object?> { 16, null, "Hi there" };
297 var list = new List<int> { 42 };
305 var list = new List<int> { 41, 43 };
321 var list = new List<object?> { null, 16, "Hi there" };
359 var list = new List<int> { 42 };
433 var list = new List<object?> { 16, "Hi there", null };
441 var list = new List<int> { 42, 42 };
457 var list = new List<string?> { "a", null, "b", null, "c", "d" };
507 var list = new List<object?> { 16, "Hi there" };
515 var list = new List<int> { 42 };
532 var list = new List<int>();
540 var list = new List<object?> { null, 16, "Hi there" };
596 var list = new List<int> { 42 };
662 var list = new List<int>();
670 var list = new List<int> { 42 };
955 var actual = new List<int>(expected);
1010 var actual = actualArray is null ? null : new List<int>(actualArray);
1036 var actual = new List<int>(new int[] { 1, 2, 3, 4, 5 });
1055 var actual = new List<int>(new int[] { 0, 0, 0, 0, 0 });
1078 List<EnumerableItem> actual = new List<EnumerableItem> { new(0), new(2) };
1079 List<EnumerableItem> expected = new List<EnumerableItem> { new(1), new(3) };
1180 var actual = new List<int>(new int[] { 1, 2, 3, 4, 5 });
1199 var actual = new List<int>(new int[] { 0, 0, 0, 0, 0 });
1208 List<EnumerableItem> actual = new List<EnumerableItem> { new(0), new(2) };
1209 List<EnumerableItem> expected = new List<EnumerableItem> { new(1), new(3) };
1614 var list = new List<int>();
1628 var list = new List<int> { 42 };
1739 var actual = new List<int>(expected);
1756 var actual = new List<int>(new[] { 1, 2, 3, 4, 0, 6, 7, 8, 9, 10 });
1768 var actual = new List<int>(new int[] { 1, 2, 3, 4, 5 });
1777 var actual = new List<int>(new int[] { 0, 0, 0, 0, 0 });
1878 var actual = new List<int>(new int[] { 1, 2, 3, 4, 5 });
1887 var actual = new List<int>(new int[] { 0, 0, 0, 0, 0 });
EquivalenceAssertsTests.cs (14)
979 var expected = new[] { new { Foo = "Bar" } }.ToList();
980 var actual = new[] { new { Foo = "Baz" }, new { Foo = "Bar" } }.ToList();
997 var expected = new[] { new { Foo = "Biff" } }.ToList();
998 var actual = new[] { new { Foo = "Baz" }, new { Foo = "Bar" } }.ToList();
1034 var expected = new[] { new { Foo = "Bar" }, new { Foo = "Baz" } }.ToList();
1035 var actual = new[] { new { Foo = "Baz" }, new { Foo = "Bar" } }.ToList();
1052 var expected = new[] { new { Foo = "Biff" } }.ToList();
1053 var actual = new[] { new { Foo = "Baz" }, new { Foo = "Bar" } }.ToList();
1069 var expected = new[] { new { Foo = "Bar" } }.ToList();
1070 var actual = new[] { new { Foo = "Baz" }, new { Foo = "Bar" } }.ToList();
1176 var expected = new Dictionary<string, List<int>> { ["Foo"] = new List<int> { 42 } };
1177 var actual = new Dictionary<string, List<int>> { ["Foo"] = new List<int> { 42 }, ["Bar"] = new List<int> { 2112 } };
1228 var expected = new Dictionary<string, List<int>> { ["Foo"] = new List<int> { 16 } };
1229 var actual = new Dictionary<string, List<int>> { ["Foo"] = new List<int> { 42 }, ["Bar"] = new List<int> { 2112 } };
Microsoft.DotNet.XUnitExtensions (6)
Microsoft.DotNet.XUnitExtensions.Tests (1)
Microsoft.DotNet.XUnitV3Extensions (1)
Microsoft.Extensions.AI (26)
ChatCompletion\FunctionInvokingChatClient.cs (19)
229List<ChatMessage> originalMessages = [.. messages];
232List<ChatMessage>? augmentedHistory = null; // the actual history of messages sent on turns other than the first
234List<ChatMessage>? responseMessages = null; // tracked list of messages, across multiple turns, to be used for the final response
236List<FunctionCallContent>? functionCallContents = null; // function call contents that need responding to in the current turn
325List<ChatMessage> originalMessages = [.. messages];
328List<ChatMessage>? augmentedHistory = null; // the actual history of messages sent on turns other than the first
329List<FunctionCallContent>? functionCallContents = null; // function call contents that need responding to in the current turn
330List<ChatMessage>? responseMessages = null; // tracked list of messages, across multiple turns, to be used in fallback cases to reconstitute history
332List<ChatResponseUpdate> updates = []; // updates from the current response
454[NotNull] ref List<ChatMessage>? augmentedHistory,
456List<ChatMessage> allTurnsResponseMessages,
508IList<ChatMessage> messages, [NotNullWhen(true)] ref List<FunctionCallContent>? functionCalls)
522IList<AIContent> content, [NotNullWhen(true)] ref List<FunctionCallContent>? functionCalls)
569List<ChatMessage> messages, ChatOptions options, List<FunctionCallContent> functionCallContents, int iteration, int consecutiveErrorCount,
595List<FunctionInvocationResult> results = [];
698List<ChatMessage> messages, ChatOptions options, List<FunctionCallContent> callContents,
757var contents = new List<AIContent>(results.Length);
Microsoft.Extensions.AI.Abstractions (23)
Microsoft.Extensions.AI.Abstractions.Tests (25)
Microsoft.Extensions.AI.AzureAIInference (3)
Microsoft.Extensions.AI.AzureAIInference.Tests (7)
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 (22)
Microsoft.Extensions.AI.Ollama (2)
Microsoft.Extensions.AI.Ollama.Tests (2)
Microsoft.Extensions.AI.OpenAI (18)
Microsoft.Extensions.AI.OpenAI.Tests (7)
Microsoft.Extensions.AI.Templates.Tests (1)
Microsoft.Extensions.AI.Tests (57)
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 (17)
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.DependencyInjection (16)
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 (4)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (24)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (24)
Microsoft.Extensions.Diagnostics.Testing (6)
Microsoft.Extensions.Diagnostics.Testing.Tests (6)
Microsoft.Extensions.FileProviders.Composite (3)
Microsoft.Extensions.FileProviders.Embedded (6)
Microsoft.Extensions.FileSystemGlobbing (21)
Microsoft.Extensions.Hosting (16)
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 (37)
Logging\HttpClientLoggerTest.cs (6)
132It.IsAny<List<KeyValuePair<string, string>>>(),
529It.IsAny<List<KeyValuePair<string, string>>>(),
531.Returns((LogRecord a, HttpRequestMessage b, List<KeyValuePair<string, string>> c, CancellationToken d) =>
538It.IsAny<List<KeyValuePair<string, string>>>(),
760var enrichers = new List<IHttpClientLogEnricher> { enricher1.Object, enricher2.Object };
976.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 (16)
100var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
101var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
157var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
158var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
227var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
228var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
302var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
303var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
362var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
363var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
432var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
433var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
499var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
500var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
567var requestHeadersBuffer = new List<KeyValuePair<string, string>>();
568var responseHeadersBuffer = 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 (15)
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 (7)
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 (29)
Resolver\DnsResolver.cs (14)
72var results = new List<ServiceResult>(response.Answers.Count);
83List<AddressResult> addresses = new List<AddressResult>();
178List<AddressResult> results = new List<AddressResult>(response.Answers.Count);
242Dictionary<EncodedDomainName, List<AddressResult>> aRecordMap = new();
267if (!aRecordMap.TryGetValue(answer.Name, out List<AddressResult>? addressList))
300aRecordMap.TryGetValue(currentAlias, out List<AddressResult>? finalAddressList);
559if (!TryReadRecords(header.AnswerCount, ref ttl, ref responseReader, out List<DnsResourceRecord>? answers) ||
560!TryReadRecords(header.AuthorityCount, ref ttl, ref responseReader, out List<DnsResourceRecord>? authorities) ||
561!TryReadRecords(header.AdditionalRecordCount, ref ttl, ref responseReader, out List<DnsResourceRecord>? additionals))
586static bool TryReadRecords(int count, ref int ttl, ref DnsDataReader reader, out List<DnsResourceRecord> records)
608internal static bool GetNegativeCacheExpiration(DateTime createdAt, List<DnsResourceRecord> authorities, out DateTime expiration)
635internal static SendQueryError ValidateResponse(QueryResponseCode responseCode, DateTime createdAt, List<DnsResourceRecord> answers, List<DnsResourceRecord> authorities, ref DateTime expiration)
904List<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 (3)
Microsoft.Extensions.ServiceDiscovery.Yarp (5)
Microsoft.Extensions.Telemetry (28)
Microsoft.Extensions.Telemetry.Abstractions (12)
Microsoft.Extensions.Telemetry.Abstractions.Tests (1)
Microsoft.Extensions.Telemetry.Tests (21)
Microsoft.Extensions.TimeProvider.Testing.Tests (4)
Microsoft.Extensions.Validation (4)
Microsoft.Extensions.Validation.GeneratorTests (3)
Microsoft.Extensions.Validation.Tests (7)
Microsoft.Extensions.Validation.ValidationsGenerator (8)
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)
55var props = GetTypePropertiesToLog(paramTypeSymbol, typesChain, symbols, transitive, ref foundDataClassificationAttributes);
84List<LoggingProperty>? GetTypePropertiesToLog(
91var result = new List<LoggingProperty>();
105var sensitivePropsFromCtor = new Dictionary<string, List<INamedTypeSymbol>>();
114var maybeDataClasses = GetDataClassificationAttributes(parameter, symbols);
173if (sensitivePropsFromCtor.TryGetValue(property.Name, out var dataClassesFromCtor))
280var 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 (10)
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.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 (321)
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 (25)
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 (140)
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 (75)
Model\BPETokenizer.cs (5)
449List<EncodedToken> tokens = new();
508List<int> ids = new();
1301internal void WordToTokens(ref Word word, List<EncodedToken> tokens, int offset, ReadOnlySpan<int> mapping) => word.ToTokens(VocabReverse, tokens, offset, mapping);
1303internal void EncodeWithCache(ReadOnlySpan<char> text, List<EncodedToken> tokens, int offset, ref PriorityQueue<Merge>? priorityQueue)
1412private 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 (122)
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.NET.StringTools.UnitTests (1)
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.LanguageServices (119)
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;
611private static ImmutableArray<Entry> ToImmutableArray((List<Entry> primary, List<Entry> nonPrimary) entries)
Telemetry\CodeMarkerLogger.cs (6)
18private static readonly Dictionary<FunctionId, List<Tuple<CodeMarkerId, CodeMarkerId>>> s_blockMap
19= new Dictionary<FunctionId, List<Tuple<CodeMarkerId, CodeMarkerId>>>()
113private static readonly Dictionary<FunctionId, List<CodeMarkerId>> s_map
114= new Dictionary<FunctionId, List<CodeMarkerId>>()
150private static void FireCodeMarkers<T>(Dictionary<FunctionId, List<T>> map, FunctionId functionId, Func<T, int> getter)
152if (!map.TryGetValue(functionId, out var items))
Venus\ContainedDocument.cs (24)
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();
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();
402using var leftPool = SharedPools.Default<List<ValueTuple<int, int>>>().GetPooledObject();
403using var rightPool = SharedPools.Default<List<ValueTuple<int, int>>>().GetPooledObject();
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();
798using var rulePool = SharedPools.Default<List<AbstractFormattingRule>>().GetPooledObject();
799using var spanPool = SharedPools.Default<List<TextSpan>>().GetPooledObject();
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 (1)
Microsoft.VisualStudio.LanguageServices.CSharp (20)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (10)
Microsoft.VisualStudio.LanguageServices.DevKit (3)
Microsoft.VisualStudio.LanguageServices.LiveShare (1)
Microsoft.VisualStudio.LanguageServices.Xaml (3)
MilvusPlayground.ApiService (4)
MSBuild (48)
XMake.cs (31)
712List<DistributedLoggerRecord> distributedLoggerRecords = null;
1272private static readonly List<BuildManager.DeferredBuildMessage> s_globalMessagesToLogInBuildLoggers = new();
1339List<ForwardingLoggerRecord> remoteLoggerRecords = new List<ForwardingLoggerRecord>();
1554List<BuildManager.DeferredBuildMessage> messagesToLogInBuildLoggers = new();
1763private static List<BuildManager.DeferredBuildMessage> GetMessagesToLogInBuildLoggers(string commandLineString)
1765List<BuildManager.DeferredBuildMessage> messages = new(s_globalMessagesToLogInBuildLoggers)
2013var commandLineArgs = QuotingUtilities.SplitUnquoted(commandLine);
2061internal static void GatherCommandLineSwitches(List<string> commandLineArgs, CommandLineSwitches commandLineSwitches, string commandLine = "")
2224private static List<string> s_includedResponseFiles;
2269List<string> argsFromResponseFile;
2515ref List<DistributedLoggerRecord> distributedLoggerRecords,
3382internal static ProfilerLogger ProcessProfileEvaluationSwitch(string[] parameters, List<ILogger> loggers, out bool enableProfiler)
3612List<string> actualProjectFiles = new List<string>();
3626List<string> actualSolutionFiles = new List<string>();
3627List<string> solutionFilterFiles = new List<string>();
3854out List<DistributedLoggerRecord> distributedLoggerRecords,
3891var loggers = new List<ILogger>();
3969private static void ProcessFileLoggers(string[][] groupedFileLoggerParameters, List<DistributedLoggerRecord> distributedLoggerRecords, int cpuCount, List<ILogger> loggers)
4024private static void ProcessBinaryLogger(string[] binaryLoggerParameters, List<ILogger> loggers, ref LoggerVerbosity verbosity)
4049List<DistributedLoggerRecord> distributedLoggerRecords,
4052List<ILogger> loggers)
4096List<DistributedLoggerRecord> distributedLoggerRecords,
4099List<ILogger> loggers)
4179List<DistributedLoggerRecord> distributedLoggerRecords)
4327private static void ProcessLoggerSwitch(string[] parameters, List<ILogger> loggers, LoggerVerbosity verbosity)
4346private static List<DistributedLoggerRecord> ProcessDistributedLoggerSwitch(string[] parameters, LoggerVerbosity verbosity)
4348List<DistributedLoggerRecord> distributedLoggers = new List<DistributedLoggerRecord>();
4353var loggerSpec = QuotingUtilities.SplitUnquoted(parameter, 2, true /* keep empty splits */, false /* keep quotes */, out _, '*');
4399var loggerSpec = QuotingUtilities.SplitUnquoted(parameter, 2, true /* keep empty splits */, false /* keep quotes */, out _, ';');
4415var loggerTypeSpec = QuotingUtilities.SplitUnquoted(loggerSpec[0], int.MaxValue, true /* keep empty splits */, false /* keep quotes */, out _, ',');
MSBuildTaskHost (21)
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)
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>();
434List<int> realizedColumnIndices,
435List<int> realizedColumnDisplayIndices,
464private static List<RealizedColumnsBlock> BuildRealizedColumnsBlockList(List<int> indexList)
466List<RealizedColumnsBlock> resultList = new List<RealizedColumnsBlock>();
786private static bool InBlockOrNextBlock(List<RealizedColumnsBlock> blockList, int index, ref int blockIndex, ref RealizedColumnsBlock block, out bool pastLastBlock)
823List<int> realizedColumnIndices,
824List<int> realizedColumnDisplayIndices)
864List<int> realizedColumnIndices,
865List<int> realizedColumnDisplayIndices,
952List<int> realizedColumnIndices,
953List<int> realizedColumnDisplayIndices,
996List<int> realizedColumnIndices,
997List<int> realizedColumnDisplayIndices,
1027private void VirtualizeChildren(List<RealizedColumnsBlock> blockList, IItemContainerGenerator generator)
1326private static void Debug_VerifyRealizedIndexCountVsDisplayIndexCount(List<RealizedColumnsBlock> blockList, List<RealizedColumnsBlock> displayIndexBlockList)
1365List<RealizedColumnsBlock> displayIndexBlockList = RealizedColumnsDisplayIndexBlockList;
1369List<RealizedColumnsBlock> blockList = RealizedColumnsBlockList;
1373List<int> additionalChildIndices = GetRealizedChildrenNotInBlockList(blockList, children);
1538private static RealizedColumnsBlock GetRealizedBlockForColumn(List<RealizedColumnsBlock> blockList, int columnIndex)
1557private List<int> GetRealizedChildrenNotInBlockList(List<RealizedColumnsBlock> blockList, IList children)
1569List<int> additionalChildIndices = new List<int>();
1640List<int> displayIndexMap = columns.DisplayIndexMap;
1641List<RealizedColumnsBlock> blockList = RealizedColumnsBlockList;
1702private List<RealizedColumnsBlock> RealizedColumnsBlockList
1733private List<RealizedColumnsBlock> RealizedColumnsDisplayIndexBlockList
2443private 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)
RazorBuildWebSite (1)
RazorWebSite (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 (9)
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 (63)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\BaseFormattingRule.cs (9)
18List<IndentBlockOperation> list,
33List<IndentBlockOperation> list,
58List<IndentBlockOperation> list,
72List<IndentBlockOperation> list,
86List<IndentBlockOperation> list,
101List<IndentBlockOperation> list,
111List<IndentBlockOperation> list,
136protected static void AddAnchorIndentationOperation(List<AnchorIndentationOperation> list, SyntaxToken anchorToken, SyntaxToken endToken)
146protected 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)
46public override void AddIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode node, in NextIndentBlockOperationAction nextOperation)
65private static void AddTypeParameterConstraintClauseOperation(List<IndentBlockOperation> list, SyntaxNode node)
74private void AddSwitchIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
134private void AddLabelIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
150private static void AddAlignmentBlockOperation(List<IndentBlockOperation> list, SyntaxNode node)
205private static void SetAlignmentBlockOperation(List<IndentBlockOperation> list, SyntaxNode baseNode, SyntaxNode body)
216private void AddBlockIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
253private static void AddBracketIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
288private static void AddAlignmentBlockOperationRelativeToFirstTokenOnBaseTokenLine(List<IndentBlockOperation> list, (SyntaxToken openBrace, SyntaxToken closeBrace) bracePair)
294private static void AddEmbeddedStatementsIndentationOperation(List<IndentBlockOperation> list, SyntaxNode node)
356private static void AddEmbeddedStatementsIndentationOperation(List<IndentBlockOperation> list, StatementSyntax statement)
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)
90var testResults = await GetTestResultsAsync(runForThisStage, i, MaxTestsReturnedPerRequest, testClient, cancellationToken);
190private static async Task<List<TestCaseResult>> GetTestResultsAsync(TestRun testRun, int skip, int top, TestResultsHttpClient testClient, CancellationToken cancellationToken)
194var testResults = await testClient.GetTestResultsAsync("public", testRun.Id, skip: skip, top: top, cancellationToken: cancellationToken);
Sample (6)
SampleStartups (1)
ScenarioTests.Common.Tests (5)
SemanticSearch.BuildTask (14)
SemanticSearch.BuildTask.UnitTests (8)
Shared (28)
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 (4)
Stress.TelemetryService (2)
Swaggatherer (18)
System.CodeDom (2)
System.Collections (6)
System.Collections.Concurrent (9)
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 volatile 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 (15)
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 (30)
System.Diagnostics.Process (11)
System.Diagnostics.TraceSource (9)
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 (2)
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 (104)
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 (54)
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 (207)
System.Private.CoreLib.Generators (4)
System.Private.DataContractSerialization (60)
System.Private.Windows.Core (73)
System\Private\Windows\Nrbf\CoreNrbfSerializer.cs (32)
55{ Types.ToTypeName($"{Types.ListName}[[{Types.BooleanType}]]"), typeof(List<bool>) },
56{ Types.ToTypeName($"{Types.ListName}[[{Types.CharType}]]"), typeof(List<char>) },
57{ Types.ToTypeName($"{Types.ListName}[[{Types.StringType}]]"), typeof(List<string>) },
58{ Types.ToTypeName($"{Types.ListName}[[{Types.SByteType}]]"), typeof(List<sbyte>) },
59{ Types.ToTypeName($"{Types.ListName}[[{Types.ByteType}]]"), typeof(List<byte>) },
60{ Types.ToTypeName($"{Types.ListName}[[{Types.Int16Type}]]"), typeof(List<short>) },
61{ Types.ToTypeName($"{Types.ListName}[[{Types.UInt16Type}]]"), typeof(List<ushort>) },
62{ Types.ToTypeName($"{Types.ListName}[[{Types.Int32Type}]]"), typeof(List<int>) },
63{ Types.ToTypeName($"{Types.ListName}[[{Types.UInt32Type}]]"), typeof(List<uint>) },
64{ Types.ToTypeName($"{Types.ListName}[[{Types.Int64Type}]]"), typeof(List<long>) },
65{ Types.ToTypeName($"{Types.ListName}[[{Types.UInt64Type}]]"), typeof(List<ulong>) },
66{ Types.ToTypeName($"{Types.ListName}[[{Types.SingleType}]]"), typeof(List<float>) },
67{ Types.ToTypeName($"{Types.ListName}[[{Types.DoubleType}]]"), typeof(List<double>) },
68{ Types.ToTypeName($"{Types.ListName}[[{Types.DecimalType}]]"), typeof(List<decimal>) },
69{ Types.ToTypeName($"{Types.ListName}[[{Types.DateTimeType}]]"), typeof(List<DateTime>) },
70{ Types.ToTypeName($"{Types.ListName}[[{Types.TimeSpanType}]]"), typeof(List<TimeSpan>) },
122|| type == typeof(List<byte>)
123|| type == typeof(List<sbyte>)
124|| type == typeof(List<short>)
125|| type == typeof(List<ushort>)
126|| type == typeof(List<int>)
127|| type == typeof(List<uint>)
128|| type == typeof(List<long>)
129|| type == typeof(List<ulong>)
130|| type == typeof(List<float>)
131|| type == typeof(List<double>)
132|| type == typeof(List<char>)
133|| type == typeof(List<bool>)
134|| type == typeof(List<string>)
135|| type == typeof(List<decimal>)
136|| type == typeof(List<DateTime>)
137|| type == typeof(List<TimeSpan>)
System.Private.Windows.Core.Tests (57)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (23)
407List<object> value = ["text"];
418Action read = () => TryReadObjectFromStream<List<object>>(ObjectListResolver, out _);
423TryReadObjectFromStream(ObjectListResolver, out List<object>? result).Should().BeTrue();
424result.Should().BeOfType<List<object>>();
434("System.Collections.Generic.List`1[[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]", typeof(List<object>))
455List<int> value = [1, 2, 3];
748("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?>)),
749("System.Collections.Generic.List`1[[System.TimeSpan, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]", typeof(List<TimeSpan>))
1012public List<byte> Bytes = [1];
1013public List<sbyte> Sbytes = [1];
1014public List<short> Shorts = [1];
1015public List<ushort> Ushorts = [1];
1016public List<int> Ints = [1, 2, 3];
1017public List<uint> Uints = [1, 2, 3];
1018public List<long> Longs = [1, 2, 3];
1019public List<ulong> Ulongs = [1, 2, 3];
1020public List<float> Floats = [1.0f, 2.0f, 3.0f];
1021public List<double> Doubles = [1.0, 2.0, 3.0];
1022public List<decimal> Decimals = [1.0m, 2.0m, 3.0m];
1023public List<decimal?> NullableDecimals = [null, 2.0m, 3.0m];
1024public List<DateTime> DateTimes = [DateTime.Now];
1025public List<TimeSpan> TimeSpans = [TimeSpan.FromHours(1)];
1026public 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 (255)
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();
216foreach (List<(MethodInfo ifaceMethod, MethodInfo targetMethod)> mapList in typeBuilder._methodOverrides.Values)
302private void PopulateFieldDefinitionHandles(List<FieldBuilderImpl> fieldDefinitions)
310private void PopulateMethodDefinitionHandles(List<MethodBuilderImpl> methods)
318private void PopulatePropertyDefinitionHandles(List<PropertyBuilderImpl> properties)
326private void PopulateEventDefinitionHandles(List<EventBuilderImpl> eventDefinitions)
350private void WriteMethods(List<MethodBuilderImpl> methods, List<GenericTypeParameterBuilderImpl> genericParams,
422Dictionary<SymbolDocumentWriter, List<SequencePoint>>.Enumerator enumerator = il.DocumentToSequencePoints.GetEnumerator();
446private BlobHandle PopulateMultiDocSequencePointsBlob(Dictionary<SymbolDocumentWriter, List<SequencePoint>>.Enumerator enumerator, StandaloneSignatureHandle localSignature)
452KeyValuePair<SymbolDocumentWriter, List<SequencePoint>> pair = enumerator.Current;
472private static void PopulateSequencePointsBlob(BlobBuilder spBlobBuilder, List<SequencePoint> sequencePoints, ref int previousNonHiddenStartLine, ref int previousNonHiddenStartColumn)
529private LocalVariableHandle GetLocalVariableHandle(List<LocalBuilder>? locals, LocalVariableHandle firstLocalHandleOfLastScope)
552private ImportScopeHandle GetImportScopeHandle(List<string>? importNamespaces, ImportScopeHandle parent)
679internal void WriteCustomAttributes(List<CustomAttributeWrapper>? customAttributes, EntityHandle parent)
1392internal List<TypeBuilderImpl> GetNestedTypeBuilders(TypeBuilderImpl declaringType)
1394List<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 (1)
System.ServiceModel.Primitives.Tests (26)
System.ServiceModel.Syndication (1)
System.Text.Json (88)
System.Text.Json.SourceGeneration (24)
System.Text.RegularExpressions (109)
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)
314private List<(char First, char Last)>? _rangelist;
349private RegexCharClass(bool negate, List<(char First, char Last)>? ranges, StringBuilder? categories, RegexCharClass? subtraction)
401private List<(char First, char Last)> EnsureRangeList() =>
411List<(char First, char Last)> rangeList = EnsureRangeList();
477List<(char First, char Last)>? rangeList = _rangelist;
1492List<(char First, char Last)>? ranges = ComputeRanges(charClass.AsSpan(start));
1510public static List<(char First, char Last)>? ComputeRanges(ReadOnlySpan<char> set)
1516List<(char First, char Last)>? ranges = null;
1661List<(char First, char Last)>? rangelist = _rangelist;
1697List<(char First, char Last)>? rangelist = _rangelist;
1878var 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 (64)
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCharClass.cs (11)
314private List<(char First, char Last)>? _rangelist;
349private RegexCharClass(bool negate, List<(char First, char Last)>? ranges, StringBuilder? categories, RegexCharClass? subtraction)
401private List<(char First, char Last)> EnsureRangeList() =>
411List<(char First, char Last)> rangeList = EnsureRangeList();
477List<(char First, char Last)>? rangeList = _rangelist;
1492List<(char First, char Last)>? ranges = ComputeRanges(charClass.AsSpan(start));
1510public static List<(char First, char Last)>? ComputeRanges(ReadOnlySpan<char> set)
1516List<(char First, char Last)>? ranges = null;
1661List<(char First, char Last)>? rangelist = _rangelist;
1697List<(char First, char Last)>? rangelist = _rangelist;
1878var 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\Controls\PropertyGrid\PropertyGridInternal\MultiSelectRootGridEntry.PropertyMerger.cs (8)
30List<PropertyDescriptor[]>? commonProperties = GetCommonProperties(objects, presort: true, tab, parentEntry);
49List<PropertyDescriptor[]>? properties = GetCommonProperties(objects.AsSpan(1), presort: true, tab, parentEntry);
52List<PropertyDescriptor[]>? firstProperties = GetCommonProperties(objects.AsSpan(0, 1), presort: false, tab, parentEntry);
94private static List<PropertyDescriptor[]>? GetCommonProperties(
130List<PropertyDescriptor[]> mergedList = [];
265private static List<PropertyDescriptor[]> UnsortedMerge(
267List<PropertyDescriptor[]> sortedMergedEntries)
269List<PropertyDescriptor[]> mergedEntries = [];
System.Windows.Forms.Analyzers.CSharp.Tests (1)
System.Windows.Forms.Design (258)
System.Windows.Forms.Design.Tests (289)
System.Windows.Forms.IntegrationTests.Common (1)
System.Windows.Forms.Interop.Tests (2)
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 (150)
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>))
TagHelpersWebSite (1)
Templates.Blazor.Tests (28)
Templates.Blazor.WebAssembly.Auth.Tests (29)
Templates.Blazor.WebAssembly.Tests (29)
Templates.Mvc.Tests (34)
Templates.Tests (29)
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 (9)
Wasm.Performance.Driver (4)
Wasm.Performance.TestApp (1)
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 (13)
xunit.console (57)
Xunit.NetCore.Extensions (8)