1280 references to List
Aspire.Dashboard (9)
Components\Controls\Chart\PlotlyChart.razor.cs (1)
131var sampledList = new List<ChartExemplar>(MaxExemplarsPerTick);
Configuration\DashboardOptions.cs (1)
190var addresses = new List<BindingAddress>(parts.Length);
ConsoleLogs\AnsiParser.cs (3)
305List<int> ret = new(2); 453var classes = new List<string>(2); 454var styles = new List<string>(2);
DashboardWebApplication.cs (1)
507var browserEndpointNames = new List<string>(capacity: frontendAddresses.Count);
Model\ResourceUrlHelpers.cs (1)
13var urls = new List<DisplayedUrl>(resource.Urls.Length);
Otlp\Model\OtlpApplication.cs (1)
237var instruments = new List<OtlpInstrumentSummary>(_instruments.Count);
Otlp\Model\OtlpHelpers.cs (1)
221values ??= new List<KeyValuePair<string, string>>(readLimit);
Aspire.Dashboard.Tests (1)
Integration\ServerRetryHelper.cs (1)
36var ports = new List<int>(portCount);
Aspire.Hosting (3)
ApplicationModel\ReferenceExpression.cs (2)
99private readonly List<IValueProvider> _valueProviders = new(formattedCount); 100private readonly List<string> _manifestExpressions = new(formattedCount);
Eventing\DistributedApplicationEventing.cs (1)
30var pendingSubscriptionCallbacks = new List<Task>(subscriptions.Count);
Aspire.Hosting.Yarp (1)
ConfigurationBuilder\YarpRoute.cs (1)
159transforms = new List<IReadOnlyDictionary<string, string>>(r.Transforms.Count + 1);
Client.ClientBase.IntegrationTests (12)
ChannelBaseTests.4.0.0.cs (6)
60List<string> eventsCalled = new List<string>(4); 61List<string> proxyEventsCalled = new List<string>(4); 112List<string> eventsCalled = new List<string>(4); 113List<string> proxyEventsCalled = new List<string>(4); 167List<string> eventsCalled = new List<string>(4); 168List<string> proxyEventsCalled = new List<string>(4);
ClientBaseTests.4.0.0.cs (6)
536List<string> eventsCalled = new List<string>(4); 537List<string> proxyEventsCalled = new List<string>(4); 587List<string> eventsCalled = new List<string>(4); 588List<string> proxyEventsCalled = new List<string>(4); 640List<string> eventsCalled = new List<string>(4); 641List<string> proxyEventsCalled = new List<string>(4);
CookieSessionSample (1)
Startup.cs (1)
35var claims = new List<Claim>(1001);
csc (3)
src\Compilers\Shared\BuildProtocol.cs (3)
88var requestArgs = new List<Argument>(requestLength); 143var argumentsBuilder = new List<Argument>((int)argumentCount); 474var list = new List<string>(count);
dotnet-svcutil.xmlserializer (1)
Microsoft\Tools\ServiceModel\SvcUtil\Options.cs (1)
334_parent._referencedAssemblies = new List<Assembly>(referenceArgs.Count);
dotnet-svcutil-lib (30)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemaImporter.cs (1)
1406if (IsCyclicReferencedType(itemElement, new List<string>(1) { identifier }))
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriterILGen.cs (2)
956List<Type> argTypes = new List<Type>(5); 957List<string> argNames = new List<string>(5);
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\ClonableStack.cs (1)
15public ClonableStack(int capacity) : base(capacity) { }
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\querybuilder.cs (1)
445List<Query> argList = new List<Query>(numArgs);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\EnumDataContract.cs (2)
276List<DataMember> tempMembers = new List<DataMember>(fields.Length); 277List<long> tempValues = new List<long>(fields.Length);
FrameworkFork\System.ServiceModel\Internals\System\Runtime\Fx.cs (1)
248List<Type> types = new List<Type>(typeNames.Length);
FrameworkFork\System.ServiceModel\System\IdentityModel\Claims\ClaimSet.cs (1)
27List<Claim> claims = new List<Claim>(2);
FrameworkFork\System.ServiceModel\System\IdentityModel\Claims\X509CertificateClaimSet.cs (1)
366List<Claim> claims = new List<Claim>(2);
FrameworkFork\System.ServiceModel\System\IdentityModel\Policy\UnconditionalPolicy.cs (2)
167List<ClaimSet> issuances = new List<ClaimSet>(1); 235identities = new List<IIdentity>(1);
FrameworkFork\System.ServiceModel\System\IdentityModel\SecurityUtils.cs (3)
126List<IAuthorizationPolicy> policies = new List<IAuthorizationPolicy>(1); 280List<SecurityKey> temp = new List<SecurityKey>(1); 334List<IAuthorizationPolicy> ret = new List<IAuthorizationPolicy>(authorizationPolicies.Count);
FrameworkFork\System.ServiceModel\System\IdentityModel\Tokens\SecurityKeyIdentifier.cs (2)
21_clauses = new List<SecurityKeyIdentifierClause>(InitialSize); 30_clauses = new List<SecurityKeyIdentifierClause>(clauses.Length);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageProperties.cs (1)
801List<KeyValuePair<string, object>> pairs = new List<KeyValuePair<string, object>>(_propertyCount);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\EndpointDispatcherTable.cs (1)
34_cachedEndpoints = new List<EndpointDispatcher>(optimizationThreshold);
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\MessagePartSpecification.cs (3)
105_headerTypes = new List<XmlQualifiedName>(headerTypes.Count); 123List<XmlQualifiedName> noDuplicates = new List<XmlQualifiedName>(_headerTypes.Count); 173_headerTypes = new List<XmlQualifiedName>(headerTypes.Length);
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityUtils.cs (2)
525List<Claim> claims = new List<Claim>(2); 529List<IAuthorizationPolicy> policies = new List<IAuthorizationPolicy>(1);
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\Tokens\SecurityContextSecurityToken.cs (1)
276List<SecurityKey> temp = new List<SecurityKey>(1);
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSTrust.cs (2)
175_entropyAuthenticators = new List<SecurityTokenAuthenticator>(2); 238List<RequestSecurityTokenResponse> rstrCollection = new List<RequestSecurityTokenResponse>(2);
FrameworkFork\System.ServiceModel\System\ServiceModel\SynchronizedCollection.cs (1)
49_items = new List<T>(list.Length);
FrameworkFork\System.ServiceModel\System\ServiceModel\SynchronizedReadOnlyCollection.cs (1)
48_items = new List<T>(list.Length);
FrameworkFork\System.ServiceModel\System\ServiceModel\XmlBuffer.cs (1)
66_sections = new List<Section>(1);
GenerateDocumentationAndConfigFiles (6)
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
20return new List<string>(capacity: 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (1)
601IList<TextSpan> normalized = new List<TextSpan>(sorted.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
409var spans = new List<TextSpan>(nodesToReplace.Count + tokensToReplace.Count + triviaToReplace.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
146var mergedList = new List<IndentBlockOperation>(count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
89var result = new List<TextChange>(count);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (1)
18var assemblies = new List<Assembly>(assemblyNames.Length);
http2cat (1)
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
103var list = new List<Http2PeerSetting>(2);
IdeBenchmarks (1)
SQLitePersistentStorageBenchmark.cs (1)
98var tasks = new List<Task>(capacity);
IdeCoreBenchmarks (2)
SegmentedListBenchmarks_InsertRange.cs (2)
32_values = new List<int>(Count); 33_valuesObject = new List<object?>(Count);
IIS.Common.TestLib (1)
DisposableList.cs (1)
15public DisposableList(int capacity) : base(capacity) { }
IIS.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\AspNetCorePortTests.cs (1)
173exceptions = new List<Exception>(retries);
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
103var list = new List<Http2PeerSetting>(2);
IIS.LongTests (1)
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
103var list = new List<Http2PeerSetting>(2);
IIS.NewHandler.FunctionalTests (1)
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
103var list = new List<Http2PeerSetting>(2);
IIS.NewShim.FunctionalTests (1)
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
103var list = new List<Http2PeerSetting>(2);
IIS.ShadowCopy.Tests (1)
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
103var list = new List<Http2PeerSetting>(2);
IISExpress.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\AspNetCorePortTests.cs (1)
173exceptions = new List<Exception>(retries);
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
103var list = new List<Http2PeerSetting>(2);
illink (1)
Infrastructure.Common (2)
xunit\ConditionAttribute.cs (1)
45List<string> falseConditions = new List<string>(conditionCount);
xunit\WcfTestDiscoverer.cs (1)
63List<string> skipReasons = new List<string>(conditions.Length);
InMemory.FunctionalTests (2)
RequestTests.cs (1)
602var tasks = new List<Task>(iterations);
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (1)
108MaybeExtra = new List<KeyValuePair<Type, object>>(2);
Interop.FunctionalTests (4)
HttpClientHttp2InteropTests.cs (4)
129var requestTasks = new List<Task>(requestCount); 177var requestTasks = new List<Task>(requestCount); 1226var tasks = new List<Task<HttpResponseMessage>>(10); 1287var tasks = new List<Task<HttpResponseMessage>>(10);
Metrics (5)
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
20return new List<string>(capacity: 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (1)
601IList<TextSpan> normalized = new List<TextSpan>(sorted.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
409var spans = new List<TextSpan>(nodesToReplace.Count + tokensToReplace.Count + triviaToReplace.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
146var mergedList = new List<IndentBlockOperation>(count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
89var result = new List<TextChange>(count);
Metrics.Legacy (5)
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
20return new List<string>(capacity: 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (1)
601IList<TextSpan> normalized = new List<TextSpan>(sorted.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
409var spans = new List<TextSpan>(nodesToReplace.Count + tokensToReplace.Count + triviaToReplace.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
146var mergedList = new List<IndentBlockOperation>(count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
89var result = new List<TextChange>(count);
Microsoft.Analyzers.Local (1)
ApiLifecycle\AssemblyAnalysis.cs (1)
283var modifiers = new List<string>(6);
Microsoft.AspNetCore.Antiforgery (1)
Internal\DefaultClaimUidExtractor.cs (1)
110var identifierParameters = new List<string>(allClaims.Count * 3);
Microsoft.AspNetCore.Authentication.Certificate (1)
CertificateAuthenticationHandler.cs (1)
146var chainErrors = new List<string>(chain.ChainStatus.Length);
Microsoft.AspNetCore.Authentication.Cookies (1)
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
100var chunks = new List<string>(10); // The client may not have sent all of the chunks, don't allocate based on chunksCount.
Microsoft.AspNetCore.Authentication.JwtBearer (4)
JwtBearerHandler.cs (4)
116validationFailures ??= new List<Exception>(1); 122validationFailures ??= new List<Exception>(1); 140validationFailures ??= new List<Exception>(1); 381var messages = new List<string>(exceptions.Count);
Microsoft.AspNetCore.Authentication.WsFederation (3)
WsFederationHandler.cs (3)
263validationFailures ??= new List<Exception>(1); 271validationFailures ??= new List<Exception>(1); 291validationFailures ??= new List<Exception>(1);
Microsoft.AspNetCore.Components (4)
CascadingParameterState.cs (1)
56resultStates ??= new List<CascadingParameterState>(infos.Length - infoIndex);
PersistentState\PersistentServicesRegistry.cs (1)
48var subscriptions = new List<PersistingComponentStateSubscription>(_registrations.Length + 1);
Rendering\ComponentState.cs (1)
206remainingCascadingParameters ??= new(_cascadingParameters.Count /* upper bound on capacity needed */);
src\Http\Routing\src\Patterns\RoutePatternFactory.cs (1)
617parameterConstraints = new List<RoutePatternParameterPolicyReference>(parameter.ParameterPolicies.Count);
Microsoft.AspNetCore.Components.Endpoints (3)
Discovery\PageCollectionBuilder.cs (1)
58var list = new List<PageComponentInfo>(totalCount);
Rendering\EndpointHtmlRenderer.cs (1)
273var result = new List<StringValues>(form.Keys.Count);
src\Shared\PropertyHelper\PropertyHelper.cs (1)
441var filteredProperties = new List<PropertyHelper>(allProperties.Length);
Microsoft.AspNetCore.Components.WebAssembly (2)
.packages\microsoft.dotnet.hotreload.agent\10.0.100-preview.7.25351.105\contentFiles\cs\netstandard2.1\MetadataUpdateHandlerInvoker.cs (1)
321var sortedAssemblies = new List<Assembly>(assemblies.Length);
Hosting\WebAssemblyHost.cs (1)
180var pendingRenders = new List<Task>(count + initialOperationCount);
Microsoft.AspNetCore.Components.WebView (1)
WebViewManager.cs (1)
230var pendingRenders = new List<Task>(_rootComponentsBySelector.Count);
Microsoft.AspNetCore.CookiePolicy (1)
ResponseCookiesWrapper.cs (1)
142var nonSuppressedValues = new List<KeyValuePair<string, string>>(keyValuePairs.Length);
Microsoft.AspNetCore.CookiePolicy.Test (1)
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
100var chunks = new List<string>(10); // The client may not have sent all of the chunks, don't allocate based on chunksCount.
Microsoft.AspNetCore.Diagnostics (1)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
39var frames = new List<StackFrameInfo>(stackFrames.Length);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (11)
Logging\HttpUtilityExtensionsTests.cs (2)
37var metadata = new List<object>(1); 68var metadata = new List<object>(1);
Logging\IncomingHttpRouteUtilityTests.cs (9)
31controllerActionDescriptor.Parameters = new List<ParameterDescriptor>(parametersInfo.Length); 69controllerActionDescriptor.Parameters = new List<ParameterDescriptor>(parametersInfo.Length); 109controllerActionDescriptor.Parameters = new List<ParameterDescriptor>(parametersInfo.Length); 151controllerActionDescriptor.Parameters = new List<ParameterDescriptor>(parametersInfo.Length); 193controllerActionDescriptor.Parameters = new List<ParameterDescriptor>(parametersInfo.Length); 240controllerActionDescriptor.Parameters = new List<ParameterDescriptor>(parametersInfo.Length); 281controllerActionDescriptor.Parameters = new List<ParameterDescriptor>(parametersInfo.Length); 329controllerActionDescriptor.Parameters = new List<ParameterDescriptor>(parametersInfo.Length); 374controllerActionDescriptor.Parameters = new List<ParameterDescriptor>(parametersInfo.Length);
Microsoft.AspNetCore.Hosting (1)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
39var frames = new List<StackFrameInfo>(stackFrames.Length);
Microsoft.AspNetCore.Html.Abstractions (1)
HtmlContentBuilder.cs (1)
28: this(new List<object>(capacity))
Microsoft.AspNetCore.Http (1)
Features\RequestCookiesFeature.cs (1)
83var headers = new List<string>(_parsedValues.Count);
Microsoft.AspNetCore.Http.Abstractions (1)
src\Shared\PropertyHelper\PropertyHelper.cs (1)
441var filteredProperties = new List<PropertyHelper>(allProperties.Length);
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionManager.cs (1)
190var tasks = new List<Task>(_connections.Count);
Microsoft.AspNetCore.Http.Connections.Tests (1)
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (1)
94var segments = new List<byte[]>((data.Length * 2) + 1);
Microsoft.AspNetCore.Http.Extensions (4)
RequestDelegateFactory.cs (1)
1603var bindings = new List<MemberBinding>(properties.Length);
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (2)
205var parameters = new List<Expression>(paramInfos.Length); 257var parameters = new List<Expression>(paramInfos.Length);
src\Shared\PropertyAsParameterInfo.cs (1)
91List<ParameterInfo> list = new(parameters.Length);
Microsoft.AspNetCore.Identity.Specification.Tests (2)
IdentitySpecificationTestBase.cs (1)
600var roles = new List<TRole>(count);
UserManagerSpecificationTests.cs (1)
1944var users = new List<TUser>(count);
Microsoft.AspNetCore.JsonPatch (2)
JsonPatchDocument.cs (1)
202var allOps = new List<Operation>(Operations?.Count ?? 0);
JsonPatchDocumentOfT.cs (1)
638var allOps = new List<Operation>(Operations?.Count ?? 0);
Microsoft.AspNetCore.JsonPatch.SystemTextJson (2)
JsonPatchDocument.cs (1)
202var allOps = new List<Operation>(Operations?.Count ?? 0);
JsonPatchDocumentOfT.cs (1)
639var allOps = new List<Operation>(Operations?.Count ?? 0);
Microsoft.AspNetCore.Localization (2)
RequestLocalizationOptions.cs (2)
125var supportedCultures = new List<CultureInfo>(cultures.Length); 144var supportedUICultures = new List<CultureInfo>(uiCultures.Length);
Microsoft.AspNetCore.Mvc.Abstractions (1)
ModelBinding\ModelStateDictionary.cs (1)
904ChildNodes = new List<ModelStateNode>(1);
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
src\Shared\PropertyAsParameterInfo.cs (1)
91List<ParameterInfo> list = new(parameters.Length);
Microsoft.AspNetCore.Mvc.Core (25)
ActionConstraints\ActionConstraintCache.cs (2)
59var items = new List<ActionConstraintItem>(action.ActionConstraints.Count); 102var items = new List<ActionConstraintItem>(entry.Items!.Count);
ApplicationModels\ApplicationModelFactory.cs (1)
297var actionDescriptions = new List<string>(actions.Count);
ApplicationModels\ControllerActionDescriptorBuilder.cs (1)
64var parameterDescriptors = new List<ParameterDescriptor>(action.Parameters.Count);
ApplicationModels\DefaultApplicationModelProvider.cs (1)
337var applicableAttributes = new List<object>(routeAttributes.Length);
BindAttribute.cs (1)
26var items = new List<string>(include.Length);
ConsumesAttribute.cs (1)
238var completeArgs = new List<string>(args.Length + 1);
Filters\FilterFactory.cs (1)
76var filterItems = new List<FilterItem>(cachedFilterItems.Length);
Formatters\InputFormatter.cs (1)
156mediaTypes = new List<string>(SupportedMediaTypes.Count);
Formatters\OutputFormatter.cs (2)
67mediaTypes = new List<string>(SupportedMediaTypes.Count); 81mediaTypes = new List<string>(SupportedMediaTypes.Count);
Infrastructure\ActionSelector.cs (2)
116var candidates = new List<ActionSelectorCandidate>(actionsCount); 132results = new List<ActionDescriptor>(matchesCount);
ModelBinding\Metadata\DefaultModelMetadataProvider.cs (1)
337var propertyEntries = new List<DefaultMetadataDetails>(propertyHelpers.Length);
ModelBinding\ModelBindingHelper.cs (1)
583return capacity.HasValue ? new List<T>(capacity.Value) : new List<T>();
ModelBinding\Validation\ClientValidatorCache.cs (2)
41var items = new List<ClientValidatorItem>(metadata.ValidatorMetadata.Count); 85var items = new List<ClientValidatorItem>(entry.Items.Count);
ModelBinding\Validation\ValidatorCache.cs (2)
31var items = new List<ValidatorItem>(metadata.ValidatorMetadata.Count); 75var items = new List<ValidatorItem>(entry.Items.Count);
ProducesAttribute.cs (1)
109var completeArgs = new List<string>(args.Length + 1);
ProducesResponseTypeAttribute.cs (1)
110var completeContentTypes = new List<string>(additionalContentTypes.Length + 1);
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
100var chunks = new List<string>(10); // The client may not have sent all of the chunks, don't allocate based on chunksCount.
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (2)
205var parameters = new List<Expression>(paramInfos.Length); 257var parameters = new List<Expression>(paramInfos.Length);
src\Shared\PropertyHelper\PropertyHelper.cs (1)
441var filteredProperties = new List<PropertyHelper>(allProperties.Length);
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
DataAnnotationsMetadataProvider.cs (1)
305var attributes = new List<object>(contextAttributesCount);
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (1)
DataAnnotationsModelValidatorProviderTest.cs (1)
162var items = new List<ValidatorItem>(metadata.ValidatorMetadata.Count);
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (2)
RazorReferenceManager.cs (1)
54var referencePaths = new List<string>(_options.AdditionalReferencePaths.Count);
RuntimeViewCompiler.cs (1)
283var expirationTokens = new List<IChangeToken>(checksums.Count);
Microsoft.AspNetCore.Mvc.TagHelpers (1)
GlobbingUrlBuilder.cs (1)
83var urls = new List<string>(1 + globbedUrls.Count)
Microsoft.AspNetCore.Mvc.ViewFeatures (4)
Buffers\MemoryPoolViewBufferScope.cs (1)
43_leased = new List<ViewBufferValue[]>(1);
Buffers\ViewBuffer.cs (1)
161_multiplePages = new List<ViewBufferPage>(2);
Infrastructure\DefaultTempDataSerializer.cs (2)
93var array = new List<string>(arrayLength); 104var array = new List<int>(arrayLength);
Microsoft.AspNetCore.OpenApi (3)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (2)
205var parameters = new List<Expression>(paramInfos.Length); 257var parameters = new List<Expression>(paramInfos.Length);
src\Shared\PropertyAsParameterInfo.cs (1)
91List<ParameterInfo> list = new(parameters.Length);
Microsoft.AspNetCore.OutputCaching (1)
OutputCacheEntryFormatter.cs (1)
510var pairs = new List<KeyValuePair<string, int>>(arr.Length);
Microsoft.AspNetCore.RateLimiting (1)
DefaultCombinedLease.cs (1)
83exceptions ??= new List<Exception>(1);
Microsoft.AspNetCore.ResponseCaching.Tests (4)
ResponseCachingMiddlewareTests.cs (4)
64Body = new CachedResponseBody(new List<byte[]>(0), 0) 92Body = new CachedResponseBody(new List<byte[]>(0), 0) 141Body = new CachedResponseBody(new List<byte[]>(0), 0) 165Body = new CachedResponseBody(new List<byte[]>(0), 0)
Microsoft.AspNetCore.Routing (6)
DecisionTree\DecisionTreeBuilder.cs (1)
76var itemDescriptors = new List<ItemDescriptor<TItem>>(itemCount);
Matching\DfaMatcherBuilder.cs (1)
72var work = new List<DfaBuilderWorkerWorkItem>(_endpoints.Count);
Patterns\RoutePatternFactory.cs (1)
617parameterConstraints = new List<RoutePatternParameterPolicyReference>(parameter.ParameterPolicies.Count);
src\Shared\PropertyHelper\PropertyHelper.cs (1)
441var filteredProperties = new List<PropertyHelper>(allProperties.Length);
Template\RouteTemplate.cs (1)
32Segments = new List<TemplateSegment>(other.PathSegments.Count);
Template\TemplateSegment.cs (1)
33Parts = new List<TemplatePart>(partCount);
Microsoft.AspNetCore.Routing.Abstractions (2)
RouteData.cs (1)
148routers = new List<IRouter>(count.Value);
src\Shared\PropertyHelper\PropertyHelper.cs (1)
441var filteredProperties = new List<PropertyHelper>(allProperties.Length);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
103var list = new List<Http2PeerSetting>(2);
Microsoft.AspNetCore.Server.IIS (2)
Core\IISHttpContext.FeatureCollection.cs (1)
94MaybeExtra = new List<KeyValuePair<Type, object>>(2);
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
39var frames = new List<StackFrameInfo>(stackFrames.Length);
Microsoft.AspNetCore.Server.Kestrel.Core (4)
Internal\Http\HttpProtocol.Generated.cs (1)
169MaybeExtra = new List<KeyValuePair<Type, object>>(2);
Internal\Http3\Http3PeerSettings.cs (1)
24var list = new List<Http3PeerSetting>(1);
Internal\KestrelServerImpl.cs (1)
366var configsToStop = new List<EndpointConfig>(endpointsToStop.Count);
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
103var list = new List<Http2PeerSetting>(2);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (1)
94var segments = new List<byte[]>((data.Length * 2) + 1);
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (1)
108MaybeExtra = new List<KeyValuePair<Type, object>>(2);
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (1)
108MaybeExtra = new List<KeyValuePair<Type, object>>(2);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (2)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (1)
108MaybeExtra = new List<KeyValuePair<Type, object>>(2);
src\Servers\Kestrel\shared\TransportMultiplexedConnection.Generated.cs (1)
95MaybeExtra = new List<KeyValuePair<Type, object>>(2);
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (1)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (1)
108MaybeExtra = new List<KeyValuePair<Type, object>>(2);
Microsoft.AspNetCore.Shared.Tests (5)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (2)
205var parameters = new List<Expression>(paramInfos.Length); 257var parameters = new List<Expression>(paramInfos.Length);
src\Shared\PropertyHelper\PropertyHelper.cs (1)
441var filteredProperties = new List<PropertyHelper>(allProperties.Length);
src\Shared\ServerInfrastructure\Http2\Http2PeerSettings.cs (1)
103var list = new List<Http2PeerSetting>(2);
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
39var frames = new List<StackFrameInfo>(stackFrames.Length);
Microsoft.AspNetCore.SignalR.Client.Core (1)
Internal\SerializedHubMessage.cs (1)
87var list = new List<SerializedMessage>(2);
Microsoft.AspNetCore.SignalR.Common.Tests (1)
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (1)
94var segments = new List<byte[]>((data.Length * 2) + 1);
Microsoft.AspNetCore.SignalR.Core (4)
HubOptionsSetup.cs (1)
68options.SupportedProtocols = new List<string>(_defaultProtocols.Count);
SerializedHubMessage.cs (1)
85var list = new List<SerializedMessage>(2);
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (2)
205var parameters = new List<Expression>(paramInfos.Length); 257var parameters = new List<Expression>(paramInfos.Length);
Microsoft.AspNetCore.SignalR.Microbenchmarks (1)
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (1)
94var segments = new List<byte[]>((data.Length * 2) + 1);
Microsoft.AspNetCore.SignalR.StackExchangeRedis (8)
Internal\DefaultHubMessageSerializer.cs (2)
16_hubProtocols = new List<IHubProtocol>(supportedProtocols.Count); 29var list = new List<SerializedMessage>(_hubProtocols.Count);
RedisHubLifetimeManager.cs (6)
245var publishTasks = new List<Task>(connectionIds.Count); 260var publishTasks = new List<Task>(groupNames.Count); 280var publishTasks = new List<Task>(userIds.Count); 461var tasks = new List<Task>(_connections.Count); 597var tasks = new List<Task>(subscriptions.Count); 623var tasks = new List<Task>(groupConnections.Count);
Microsoft.AspNetCore.WebUtilities (1)
KeyValueAccumulator.cs (1)
53var list = new List<string>(8);
Microsoft.AspNetCore.WebUtilities.Microbenchmarks (1)
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (1)
94var segments = new List<byte[]>((data.Length * 2) + 1);
Microsoft.AspNetCore.WebUtilities.Tests (1)
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (1)
94var segments = new List<byte[]>((data.Length * 2) + 1);
Microsoft.Build (83)
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (2)
224var deactivateExceptions = new List<Exception>(_requests.Count); 231var requestsToWait = new List<BuildRequestEntry>(_requests.Count);
BackEnd\Components\Communications\NodeManager.cs (1)
97List<NodeInfo> nodes = new(numberOfNodesToCreate);
BackEnd\Components\Communications\NodeProviderInProc.cs (1)
194var nodes = new List<NodeInfo>(numberOfNodesToCreate);
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
764var graphEntryPoints = new List<ProjectGraphEntryPoint>(projectConfigurations.Count);
BackEnd\Components\RequestBuilder\BatchingEngine.cs (2)
176buckets = new List<ItemBucket>(1); 365var orderedBuckets = new List<ItemBucket>(buckets.Count);
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupLoggingHelper.cs (1)
206keyValuePairList = new List<KeyValuePair<string, string>>(count);
BackEnd\Components\RequestBuilder\IntrinsicTasks\MSBuild.cs (1)
584undefinePropertiesPerProject[i] = new List<string>(propertiesToUndefine.Length);
BackEnd\Components\RequestBuilder\TargetBuilder.cs (2)
149List<TargetSpecification> targets = new List<TargetSpecification>(targetNames.Length); 667List<TargetEntry> targetsToPush = new List<TargetEntry>(targets.Count);
BackEnd\Components\RequestBuilder\TargetEntry.cs (1)
697List<TargetSpecification> allErrorTargets = new List<TargetSpecification>(_target.OnErrorChildren.Count);
BackEnd\Components\RequestBuilder\TaskBuilder.cs (2)
247List<string> taskParameters = new List<string>(_taskNode.ParametersForBuild.Count + _taskNode.Outputs.Count); 1059undeclaredProjects ??= new List<string>(projectReferenceItems.Count);
BackEnd\Components\RequestBuilder\TaskHost.cs (3)
986targetOutputsPerProject = new List<IDictionary<string, ITaskItem[]>>(1); 1163targetOutputsPerProject = new List<IDictionary<string, ITaskItem[]>>(1) 1221targetOutputsPerProject = new List<IDictionary<string, ITaskItem[]>>(results.Length);
BackEnd\Components\Scheduler\SchedulableRequest.cs (2)
572List<SchedulableRequest> ancestors = new List<SchedulableRequest>(16); 590List<SchedulableRequest> ancestors = new List<SchedulableRequest>(16);
BackEnd\Components\Scheduler\SchedulingData.cs (2)
110private readonly List<SchedulingEvent> _buildEvents = new List<SchedulingEvent>(64); 288_buildHierarchy[request] = new List<SchedulableRequest>(8);
BackEnd\Components\SdkResolution\SdkResolverService.cs (2)
197List<string> errors = new List<string>(0); 198List<string> warnings = new List<string>(0);
BackEnd\Components\SdkResolution\SdkResult.cs (1)
89translator.Translate(ref _additionalPaths, (ITranslator t, ref string s) => t.Translate(ref s), count => new List<string>(count));
BackEnd\Shared\BuildRequest.cs (1)
191_targets = new List<string>(escapedTargets.Count);
BackEnd\Shared\BuildRequestConfiguration.cs (1)
790List<(string name, TargetBuiltReason reason)> allTargets = new(
CollectionHelpers.cs (1)
24List<T> inputsWithoutNulls = new List<T>(inputs.Count);
Collections\CopyOnReadEnumerable.cs (2)
73list = new List<TResult>(count); 77list = new List<TResult>(readOnlyCollection.Count);
Collections\LookasideStringInterner.cs (1)
50_strings = new List<string>(defaultCollectionSize);
Collections\PropertyDictionary.cs (2)
560List<TResult> result = new(hashSet.Count); 574List<TResult> result = new(propertiesCollection.Count);
Construction\Solution\SolutionProjectGenerator.cs (2)
737var projectsInOrder = new List<ProjectInSolution>(_solutionFile.ProjectsInOrder.Count); 747var projectInstances = new List<ProjectInstance>(projectsInOrder.Count + 1);
Definition\Project.cs (4)
1507var loggers = new List<ILogger>(1) { logger }; 2262var imports = new List<ResolvedImport>(_data.ImportClosure.Count - 1 /* outer project */); 2285var imports = new List<ResolvedImport>(_data.ImportClosureWithDuplicates.Count - 1 /* outer project */); 2597var globResults = new List<GlobResult>(projectItemElements.Count);
Definition\ProjectItem.cs (3)
837List<ProjectMetadata> temporary = new List<ProjectMetadata>(_directMetadata.Count); 1075inheritedItemDefinitionsClone ??= new List<ProjectItemDefinition>(inheritedItemDefinitionsCount + 1); 1082inheritedItemDefinitionsClone ??= new List<ProjectItemDefinition>(inheritedItemDefinitionsCount + 1);
Evaluation\Conditionals\FunctionCallExpressionNode.cs (1)
167var list = new List<string>(capacity: expandedCount);
Evaluation\Evaluator.cs (8)
439List<ProjectTaskInstanceChild> taskOutputs = new List<ProjectTaskInstanceChild>(taskElement.Count); 481List<ProjectPropertyGroupTaskPropertyInstance> properties = new List<ProjectPropertyGroupTaskPropertyInstance>(propertyGroupElement.Count); 511List<ProjectItemGroupTaskItemInstance> items = new List<ProjectItemGroupTaskItemInstance>(itemGroupElement.Count); 562List<ProjectTargetInstanceChild> targetChildren = new List<ProjectTargetInstanceChild>(targetElement.Count); 673List<string> initialTargets = new List<string>(_initialTargetsList.Count); 758_data.DefaultTargets = new List<string>(1); 839List<P> list = new(dictionary.Count); 977_data.DefaultTargets ??= new List<string>(temp.Count);
Evaluation\Expander.cs (4)
1880List<KeyValuePair<string, S>> transformedItems = new(itemsOfType.Count); 2132result = new List<T>(itemsFromCapture.Count); 2235itemsFromCapture ??= new List<KeyValuePair<string, S>>(itemsOfType.Count); 2440List<KeyValuePair<string, S>> itemsFromCapture = new(itemsOfType.Count);
Evaluation\ItemSpec.cs (2)
202var fragments = new List<ItemSpecFragment>(semicolonCount + 1); 315var result = new List<ItemSpecFragment>(Fragments.Count);
Evaluation\LazyItemEvaluator.LazyItemOperation.cs (1)
233List<KeyValuePair<ProjectMetadataElement, string>> metadataList = new(metadata.Length);
Evaluation\Preprocessor.cs (1)
159_addedNodes = new List<XmlNode>(implicitImportCount);
Graph\GraphBuilder.cs (3)
105var graphRoots = new List<ProjectGraphNode>(entryPointNodes.Count); 311List<ProjectGraphEntryPoint> newEntryPoints = new(projectsInSolution.Count); 343List<string> solutionDependenciesForProject = new(project.Dependencies.Count);
Graph\ParallelWorkSet.cs (2)
40private readonly List<Exception> _exceptions = new List<Exception>(0); 92_tasks = new List<Task>(degreeOfParallelism);
Graph\ProjectGraph.cs (1)
563var toposort = new List<ProjectGraphNode>(graphNodes.Count);
Instance\ProjectInstance.cs (7)
410this.EvaluatedItemElements = new List<ProjectItemElement>(project.Items.Count); 486EvaluatedItemElements = new List<ProjectItemElement>(linkedProject.Items.Count); 3310DefaultTargets = defaultTargets == null ? new List<string>(0) : new List<string>(defaultTargets); 3311InitialTargets = initialTargets == null ? new List<string>(0) : new List<string>(initialTargets); 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 */); 3417inheritedItemDefinitions = new List<ProjectItemDefinitionInstance>(item.InheritedItemDefinitions.Count);
Instance\ProjectItemInstance.cs (5)
949List<string> names = new List<string>(capacity: metadataCollection.Count + FileUtilities.ItemSpecModifiers.All.Length); 1101var result = new List<KeyValuePair<string, string>>(list.Count); 1556(capacity) => new List<ProjectItemDefinitionInstance>(capacity)); 1767(capacity) => new List<ProjectItemDefinitionInstance>(capacity)); 2156itemDefinitionsClone ??= new List<ProjectItemDefinitionInstance>(source._taskItem._itemDefinitions.Count + 1);
Instance\ProjectTargetInstance.cs (2)
573translator.Translate(ref children, ProjectTargetInstanceChild.FactoryForDeserialization, count => new List<ProjectTargetInstanceChild>(count)); 576translator.Translate(ref onErrorChildren, ProjectOnErrorInstance.FactoryForDeserialization, count => new List<ProjectOnErrorInstance>(count));
Logging\BaseConsoleLogger.cs (1)
498var list = new List<DictionaryEntry>(properties.FastCountOrZero());
Logging\BinaryLogger\BuildEventArgsWriter.cs (2)
108private readonly List<KeyValuePair<string, string>> nameValueListBuffer = new List<KeyValuePair<string, string>>(1024); 114private readonly List<KeyValuePair<int, int>> nameValueIndexListBuffer = new List<KeyValuePair<int, int>>(1024);
TelemetryInfra\TelemetryDataUtils.cs (1)
27List<TelemetryItem> telemetryItems = new(4);
Utilities\EngineFileUtilities.cs (1)
570return new List<Regex>(0);
Microsoft.Build.Engine.OM.UnitTests (3)
Construction\ElementLocationPublic_Tests.cs (1)
121List<string> attributeLocations = new List<string>(2);
Construction\SolutionFile_Tests.cs (2)
460List<string> configurationNames = new List<string>(6); 523List<string> configurationNames = new List<string>(6);
Microsoft.Build.Engine.UnitTests (7)
BackEnd\BinaryTranslator_Tests.cs (1)
151List<string> twoItems = new List<string>(2);
Construction\SolutionFile_OldParser_Tests.cs (2)
1695List<string> configurationNames = new List<string>(6); 1755List<string> configurationNames = new List<string>(6);
Construction\SolutionProjectGenerator_Tests.cs (4)
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 };
Microsoft.Build.Framework (4)
BinaryTranslator.cs (2)
329list = new List<string>(count); 346Translate(ref listAsInterface, objectTranslator, count => new List<T>(count));
BuildCheck\BuildCheckEventArgs.cs (1)
83List<BuildCheckRuleTelemetryData> tracingData = new List<BuildCheckRuleTelemetryData>(count);
Telemetry\BuildTelemetry.cs (1)
177List<TelemetryItem> telemetryItems = new(8);
Microsoft.Build.Tasks.CodeAnalysis (6)
src\Compilers\Core\MSBuildTask\Vbc.cs (2)
561var references = new List<ITaskItem>(this.References.Length); 562var links = new List<ITaskItem>(this.References.Length);
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
20return new List<string>(capacity: 0);
src\Compilers\Shared\BuildProtocol.cs (3)
88var requestArgs = new List<Argument>(requestLength); 143var argumentsBuilder = new List<Argument>((int)argumentCount); 474var list = new List<string>(count);
Microsoft.Build.Tasks.CodeAnalysis.Sdk (6)
src\Compilers\Core\MSBuildTask\Vbc.cs (2)
561var references = new List<ITaskItem>(this.References.Length); 562var links = new List<ITaskItem>(this.References.Length);
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
20return new List<string>(capacity: 0);
src\Compilers\Shared\BuildProtocol.cs (3)
88var requestArgs = new List<Argument>(requestLength); 143var argumentsBuilder = new List<Argument>((int)argumentCount); 474var list = new List<string>(count);
Microsoft.Build.Tasks.Core (21)
AssemblyDependency\AssemblyInformation.cs (2)
476List<AssemblyNameExtension> ret = new List<AssemblyNameExtension>(assemblyReferences.Count); 517List<string> assemblyFiles = new List<string>(assemblyFilesCollection.Count);
AssemblyDependency\GenerateBindingRedirects.cs (1)
294var attributes = new List<XAttribute>(4)
AssemblyDependency\ReferenceTable.cs (4)
1046var dependencies = new List<AssemblyNameExtension>(dependentAssemblies?.Length ?? 0); 1921var assemblyNamesList = new List<AssemblyNameReference>(conflictingFullNames.Count); 1928var idealRemappingsList = new List<DependentAssembly>(assemblyNamesList.Count); 2216List<string> toRemove = new(baseNameToReferences.Count);
AssemblyDependency\ResolveAssemblyReference.cs (2)
1237var assemblyIdentityAttributes = new List<XAttribute>(4); 2759var combined = new List<DependentAssembly>(first.Count + second.Count);
AssignProjectConfiguration.cs (2)
181var resolvedReferences = new List<ITaskItem>(ProjectReferences.GetLength(0)); 182var unresolvedReferences = new List<ITaskItem>(ProjectReferences.GetLength(0));
CallTarget.cs (1)
76var singleProject = new List<ITaskItem>(1) { null };
Copy.cs (3)
485destinationFilesSuccessfullyCopied = new List<ITaskItem>(DestinationFiles.Length); 597sourceIndices = new List<int>(1); 624destinationFilesSuccessfullyCopied = new List<ITaskItem>(DestinationFiles.Length);
ListOperators\RemoveDuplicates.cs (1)
49var filteredList = new List<ITaskItem>(Inputs.Length);
MSBuild.cs (3)
268singleProject = new List<ITaskItem>(1) { null }; 454var targetLists = new List<string[]>(runEachTargetSeparately ? targets.Length : 1); 537undefinePropertiesPerProject[i] = new List<string>(propertiesToUndefine.Length);
ResolveNonMSBuildProjectOutput.cs (2)
93var resolvedPaths = new List<ITaskItem>(ProjectReferences.GetLength(0)); 94var unresolvedReferences = new List<ITaskItem>(ProjectReferences.GetLength(0));
Microsoft.Build.UnitTests.Shared (1)
ObjectModelHelpers.cs (1)
1012List<ILogger> loggers = new List<ILogger>(1);
Microsoft.Build.Utilities.Core (8)
LockCheck.cs (1)
347var lockInfos = new List<ProcessInfo>((int)pnProcInfo);
TaskItem.cs (1)
216var metadataNames = new List<string>(capacity: count);
ToolLocationHelper.cs (3)
661var referenceDirectories = new List<string>(4); 725var redistDirectories = new List<string>(4); 755var designTimeDirectories = new List<string>(4);
ToolTask.cs (1)
1361_environmentVariablePairs = new List<KeyValuePair<string, string>>(EnvironmentVariables.Length);
TrackedDependencies\FileTracker.cs (1)
346var rootSources = new List<string>(sources.Length + outputs.Length);
TrackedDependencies\TrackedDependencies.cs (1)
33var expanded = new List<ITaskItem>(expand.Length);
Microsoft.CodeAnalysis (10)
CommandLine\SarifV1ErrorLogger.cs (1)
288var list = new List<KeyValuePair<string, DiagnosticDescriptor>>(Count);
CommandLine\SarifV2ErrorLogger.cs (1)
500var list = new List<(int Index, DiagnosticDescriptor Descriptor, DiagnosticDescriptorErrorLoggerInfo Info)>(Count);
DocumentationCommentId.cs (1)
25: base(() => new List<T>(10), 10)
InternalUtilities\CompilerOptionParseUtilities.cs (1)
20return new List<string>(capacity: 0);
PEWriter\MetadataWriter.cs (1)
441private readonly List<IFileReference> _fileRefList = new List<IFileReference>(32);
PEWriter\MetadataWriter.DynamicAnalysis.cs (2)
57_documentTable = new List<DocumentRow>(documentCountEstimate); 59_methodTable = new List<MethodRow>(methodCountEstimate);
ReferenceManager\CommonReferenceManager.Binding.cs (1)
724private static readonly ObjectPool<List<TAssemblySymbol?>> s_candidateReferencedSymbolsPool = new ObjectPool<List<TAssemblySymbol?>>(() => new List<TAssemblySymbol?>(capacity: 1024));
Syntax\SyntaxDiffer.cs (1)
741var textChanges = new List<ChangeRangeWithText>(changeRecords.Count);
Text\SourceText.cs (1)
904var textChanges = new List<TextChange>(ranges.Count);
Microsoft.CodeAnalysis.Analyzers (6)
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
20return new List<string>(capacity: 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (1)
601IList<TextSpan> normalized = new List<TextSpan>(sorted.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
409var spans = new List<TextSpan>(nodesToReplace.Count + tokensToReplace.Count + triviaToReplace.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
146var mergedList = new List<IndentBlockOperation>(count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
89var result = new List<TextChange>(count);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (1)
18var assemblies = new List<Assembly>(assemblyNames.Length);
Microsoft.CodeAnalysis.AnalyzerUtilities (5)
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
20return new List<string>(capacity: 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (1)
601IList<TextSpan> normalized = new List<TextSpan>(sorted.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
409var spans = new List<TextSpan>(nodesToReplace.Count + tokensToReplace.Count + triviaToReplace.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
146var mergedList = new List<IndentBlockOperation>(count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
89var result = new List<TextChange>(count);
Microsoft.CodeAnalysis.BannedApiAnalyzers (6)
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
20return new List<string>(capacity: 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (1)
601IList<TextSpan> normalized = new List<TextSpan>(sorted.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
409var spans = new List<TextSpan>(nodesToReplace.Count + tokensToReplace.Count + triviaToReplace.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
146var mergedList = new List<IndentBlockOperation>(count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
89var result = new List<TextChange>(count);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (1)
18var assemblies = new List<Assembly>(assemblyNames.Length);
Microsoft.CodeAnalysis.CodeStyle (5)
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
20return new List<string>(capacity: 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (1)
601IList<TextSpan> normalized = new List<TextSpan>(sorted.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
409var spans = new List<TextSpan>(nodesToReplace.Count + tokensToReplace.Count + triviaToReplace.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
146var mergedList = new List<IndentBlockOperation>(count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
89var result = new List<TextChange>(count);
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (1)
18var assemblies = new List<Assembly>(assemblyNames.Length);
Microsoft.CodeAnalysis.CSharp (2)
Parser\AbstractLexer.cs (1)
107_errors = new List<SyntaxDiagnosticInfo>(8);
Syntax\InternalSyntax\CSharpSyntaxNode.cs (1)
181var list = new List<DirectiveTriviaSyntax>(32);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (2)
58var nodesFromDiagnostics = new List<( 70var references = new List<ExpressionSyntax>(diagnostic.AdditionalLocations.Count - 2);
Microsoft.CodeAnalysis.CSharp.Features (2)
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (2)
58var nodesFromDiagnostics = new List<( 70var references = new List<ExpressionSyntax>(diagnostic.AdditionalLocations.Count - 2);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
SourceGeneration\GeneratorDriverFuzzTests.cs (1)
274var originalInputs = new List<InMemoryAdditionalText>(originalInputsLength);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
Syntax\SyntaxNodeTests.cs (4)
1037var list = new List<SyntaxToken>(tokens.Count); 1062var list = new List<SyntaxToken>(tokens.Count); 1137var list = new List<SyntaxToken>(tokens.Count); 1166var list = new List<SyntaxToken>(tokens.Count);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
EmitMetadataTestBase.cs (1)
102var actualEntries = new List<DeclSecurityEntry>(expectedEntries.Length);
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\SemanticTokens\SemanticTokensHelpers.cs (1)
24private static readonly ObjectPool<List<int>> s_tokenListPool = new(() => new List<int>(capacity: 1000));
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (6)
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
20return new List<string>(capacity: 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (1)
601IList<TextSpan> normalized = new List<TextSpan>(sorted.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
409var spans = new List<TextSpan>(nodesToReplace.Count + tokensToReplace.Count + triviaToReplace.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
146var mergedList = new List<IndentBlockOperation>(count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
89var result = new List<TextChange>(count);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (1)
18var assemblies = new List<Assembly>(assemblyNames.Length);
Microsoft.CodeAnalysis.PublicApiAnalyzers (6)
DeclarePublicApiAnalyzer.Impl.cs (1)
511var nestedNamespaceOrTypesApiNames = new List<string>(nestedNamespaceOrTypeMembers.Length);
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
20return new List<string>(capacity: 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (1)
601IList<TextSpan> normalized = new List<TextSpan>(sorted.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
409var spans = new List<TextSpan>(nodesToReplace.Count + tokensToReplace.Count + triviaToReplace.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
146var mergedList = new List<IndentBlockOperation>(count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
89var result = new List<TextChange>(count);
Microsoft.CodeAnalysis.ResxSourceGenerator (5)
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
20return new List<string>(capacity: 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (1)
601IList<TextSpan> normalized = new List<TextSpan>(sorted.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
409var spans = new List<TextSpan>(nodesToReplace.Count + tokensToReplace.Count + triviaToReplace.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
146var mergedList = new List<IndentBlockOperation>(count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
89var result = new List<TextChange>(count);
Microsoft.CodeAnalysis.UnitTests (1)
Collections\List\TestBase.Generic.cs (1)
185List<T> list = new List<T>(count);
Microsoft.CodeAnalysis.Workspaces (8)
Serialization\AbstractOptionsSerializationService.cs (2)
138specificDiagnosticOptionsList = new List<KeyValuePair<string, ReportDiagnostic>>(count); 224featuresList = new List<KeyValuePair<string, string>>(count);
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
20return new List<string>(capacity: 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (1)
601IList<TextSpan> normalized = new List<TextSpan>(sorted.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
409var spans = new List<TextSpan>(nodesToReplace.Count + tokensToReplace.Count + triviaToReplace.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
146var mergedList = new List<IndentBlockOperation>(count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
89var result = new List<TextChange>(count);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (1)
18var assemblies = new List<Assembly>(assemblyNames.Length);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
Rpc\RpcServer.cs (1)
97var remainingTasks = new List<Task>(capacity: runningTasks.Count);
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
20return new List<string>(capacity: 0);
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
WorkspaceServiceTests\TemporaryStorageServiceTests.cs (1)
162var storageHandles = new List<TemporaryStorageStreamHandle>(fileCount);
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (1)
247list = new List<Type>(ifaces.Length + 2)
Microsoft.Data.Analysis (12)
DataFrame.cs (2)
200List<DataFrameColumn> newColumns = new List<DataFrameColumn>(Columns.Count); 683List<DataFrameColumn> newColumns = new List<DataFrameColumn>(Columns.Count);
DataFrame.IO.cs (2)
124var columns = new List<DataFrameColumn>(columnsCount); 441columns = new List<DataFrameColumn>(numberOfColumns);
DataFrameColumnCollection.cs (1)
33var ret = new List<string>(Count);
DataFrameColumns\StringDataFrameColumn.cs (2)
31List<string> buffer = new List<string>((int)Math.Min(MaxCapacity, bufferLen)); 209List<int[]> bufferSortIndices = new List<int[]>(_stringBuffers.Count);
DataFrameColumns\VBufferDataFrameColumn.cs (1)
35List<VBuffer<T>> buffer = new List<VBuffer<T>>(bufferLen);
IDataView.Extension.cs (1)
48List<DataFrameColumn> dataFrameColumns = new List<DataFrameColumn>(schema.Count);
PrimitiveColumnContainer.cs (1)
372var ret = new List<T?>(length);
PrimitiveDataFrameColumn.cs (1)
214var ret = new List<object>(length);
PrimitiveDataFrameColumn.Sort.cs (1)
25List<List<int>> bufferSortIndices = new List<List<int>>(_columnContainer.Buffers.Count);
Microsoft.Data.Analysis.Tests (1)
DataFrame.IOTests.cs (1)
1666List<Type> typesToRemove = new List<Type>(possibleTypes.Count);
Microsoft.DotNet.Build.Tasks.TargetFramework (2)
ChooseBestP2PTargetFrameworkTask.cs (1)
63List<ITaskItem> assignedProjects = new(AnnotatedProjectReferences.Length);
ChooseBestTargetFrameworksTask.cs (1)
31List<ITaskItem> bestTargetFrameworkList = new(BuildTargetFrameworks!.Length);
Microsoft.DotNet.GenFacades (1)
GenPartialFacadeSourceGenerator.cs (1)
164assemblyListForTypes = new List<string>(1);
Microsoft.DotNet.XUnitExtensions (2)
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\ConditionalTestDiscoverer.cs (1)
41List<string> falseConditions = new List<string>(conditionMemberNames.Count());
src\Microsoft.DotNet.XUnitExtensions.Shared\XunitParallelTheoryTestCaseRunner.cs (1)
135var runningTests = new List<Task<RunSummary>>(_testRunners.Count);
Microsoft.DotNet.XUnitV3Extensions (1)
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\ConditionalTestDiscoverer.cs (1)
41List<string> falseConditions = new List<string>(conditionMemberNames.Count());
Microsoft.Extensions.AI (1)
ChatCompletion\FunctionInvokingChatClient.cs (1)
757var contents = new List<AIContent>(results.Length);
Microsoft.Extensions.AI.Abstractions (3)
ChatCompletion\ChatResponse.cs (1)
51get => _messages ??= new List<ChatMessage>(1);
Embeddings\GeneratedEmbeddings.cs (1)
30_embeddings = new List<TEmbedding>(Throw.IfLessThan(capacity, 0));
src\Shared\JsonSchemaExporter\JsonSchemaExporter.cs (1)
142List<JsonSchema>? anyOf = new(derivedTypes.Count);
Microsoft.Extensions.ApiDescription.Client (1)
GetOpenApiReferenceMetadata.cs (1)
52var outputs = new List<ITaskItem>(Inputs.Length);
Microsoft.Extensions.AsyncState (1)
src\Shared\Pools\PooledListWithCapacityPolicy.cs (1)
23public override List<T> Create() => new(_listCapacity);
Microsoft.Extensions.Caching.Memory (1)
CacheEntry.CacheEntryTokens.cs (1)
39_expirationTokenRegistrations ??= new List<IDisposable>(1);
Microsoft.Extensions.Compliance.Abstractions (1)
src\Shared\Pools\PooledListWithCapacityPolicy.cs (1)
23public override List<T> Create() => new(_listCapacity);
Microsoft.Extensions.Configuration (1)
ConfigurationRoot.cs (1)
32_changeTokenRegistrations = new List<IDisposable>(providers.Count);
Microsoft.Extensions.Diagnostics.HealthChecks (1)
HealthCheckPublisherHostedService.cs (1)
114var timers = new List<Timer>(delayPeriodGroups.Count);
Microsoft.Extensions.Diagnostics.HealthChecks.Common (1)
src\Shared\Pools\PooledListWithCapacityPolicy.cs (1)
23public override List<T> Create() => new(_listCapacity);
Microsoft.Extensions.Diagnostics.ResourceMonitoring (3)
Linux\Network\LinuxNetworkMetrics.cs (1)
58List<Measurement<long>> measurements = new(24);
src\Shared\Pools\PooledListWithCapacityPolicy.cs (1)
23public override List<T> Create() => new(_listCapacity);
Windows\Network\WindowsNetworkMetrics.cs (1)
48List<Measurement<long>> measurements = new(24);
Microsoft.Extensions.FileProviders.Embedded (1)
Manifest\ManifestDirectory.cs (1)
89var list = new List<ManifestEntry>(Children.Count);
Microsoft.Extensions.FileSystemGlobbing (2)
InMemoryDirectoryInfo.cs (1)
48var fileList = new List<string>(files.Count());
MatcherExtensions.cs (1)
61List<string> result = matches is ICollection matchCollection ? new(matchCollection.Count) : new();
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (1)
Benchmarks\HeadersReaderBenchmark.cs (1)
34_outputBuffer = new(capacity: 10240);
Microsoft.Extensions.Http.Resilience (1)
src\Shared\Pools\PooledListWithCapacityPolicy.cs (1)
23public override List<T> Create() => new(_listCapacity);
Microsoft.Extensions.Identity.Core (1)
UserManager.cs (1)
2020var newCodes = new List<string>(number);
Microsoft.Extensions.ObjectPool.Tests (2)
DefaultObjectPoolTest.cs (1)
104return new List<int>(17);
DisposableObjectPoolTest.cs (1)
129return new List<int>(17);
Microsoft.Extensions.Options.SourceGeneration (1)
Parser.cs (1)
78var modelsValidatorTypeValidates = new List<ValidatedModel>(modelTypes.Count);
Microsoft.Extensions.ServiceDiscovery.Dns (3)
Resolver\DnsResolver.cs (3)
72var results = new List<ServiceResult>(response.Answers.Count); 178List<AddressResult> results = new List<AddressResult>(response.Answers.Count); 591records = new(Math.Min(count, 32));
Microsoft.Extensions.ServiceDiscovery.Yarp (2)
ServiceDiscoveryDestinationResolver.cs (2)
27var tasks = new List<Task<(List<(string Name, DestinationConfig Config)>, IChangeToken ChangeToken)>>(destinations.Count); 61var results = new List<(string Name, DestinationConfig Config)>(result.Endpoints.Count);
Microsoft.Extensions.Telemetry (3)
Logging\ExtendedLogger.LegacyTagJoiner.cs (1)
22private readonly List<KeyValuePair<string, object?>> _extraTags = new(TagCapacity);
Logging\ExtendedLogger.ModernTagJoiner.cs (1)
23private readonly List<KeyValuePair<string, object?>> _extraTags = new(TagCapacity);
src\Shared\Pools\PooledListWithCapacityPolicy.cs (1)
23public override List<T> Create() => new(_listCapacity);
Microsoft.Extensions.Telemetry.Abstractions (1)
src\Shared\Pools\PooledListWithCapacityPolicy.cs (1)
23public override List<T> Create() => new(_listCapacity);
Microsoft.Interop.SourceGeneration (3)
Marshalling\MarshallerHelpers.cs (3)
125List<T> nodeIdToElement = new(elements.Count); 151List<T> L = new(elements.Count); 153List<T> S = new(elements.Count);
Microsoft.Maui (2)
Core\Extensions\IPickerExtension.cs (1)
19 var returnValue = new List<string>(picker.GetCount());
PropertyMapper.cs (1)
180 var updatePropertiesMappers = new List<Action<IElementHandler, IElement>>(updatePropertiesKeys.Count);
Microsoft.Maui.Controls (21)
Element\Element.cs (1)
374 _changeHandlers ??= new List<Action<object, ResourcesChangedEventArgs>>(2);
ElementTemplate.cs (1)
42 _changeHandlers = _changeHandlers ?? new List<Action<object, ResourcesChangedEventArgs>>(1);
Items\SelectableItemsView.cs (1)
39 static readonly IList<object> s_empty = new List<object>(0);
Items\SelectionChangedEventArgs.cs (3)
15 static readonly IReadOnlyList<object> s_empty = new List<object>(0); 19 PreviousSelection = previousSelection != null ? new List<object>(1) { previousSelection } : s_empty; 20 CurrentSelection = currentSelection != null ? new List<object>(1) { currentSelection } : s_empty;
Items\SelectionList.cs (1)
12 static readonly IList<object> s_empty = new List<object>(0);
MultiBinding.cs (1)
58 var bindingsclone = new List<BindingBase>(Bindings.Count);
ObservableList.cs (1)
51 var items = new List<T>(count);
OrderedDictionary.cs (1)
65 _keyOrder = new List<TKey>(capacity);
Page\Page.cs (1)
585 var startingLayout = new List<Rect>(logicalChildren.Count);
Profiler.cs (1)
50 Data = new List<Datum>(Capacity);
ResourceDictionary.cs (1)
367 StyleSheets = StyleSheets ?? new List<StyleSheets.StyleSheet>(2);
Shell\ShellUriHandler.cs (1)
320 var builder = new RouteRequestBuilder(routeKey, routeKey, null, new List<string>(1) { routeKey });
TemplatedItemsList.cs (7)
684 var contentItems = new List<TItem>(items.Count); 807 newItems = new List<TemplatedItemsList<TView, TItem>>(e.NewItems.Count); 827 oldItems = new List<TemplatedItemsList<TView, TItem>>(e.OldItems.Count); 847 oldItems = new List<TemplatedItemsList<TView, TItem>>(e.OldItems.Count); 848 newItems = new List<TemplatedItemsList<TView, TItem>>(e.NewItems.Count); 890 oldItems = new List<TemplatedItemsList<TView, TItem>>(e.OldItems.Count); 1304 var newList = new List<string>(list.Count);
Microsoft.Maui.Controls.SourceGen (1)
src\Controls\src\Xaml\XmlTypeXamlExtensions.cs (1)
64 var lookupNames = new List<string>(capacity: 2);
Microsoft.Maui.Controls.Xaml (1)
XmlTypeXamlExtensions.cs (1)
64 var lookupNames = new List<string>(capacity: 2);
Microsoft.ML.Core (3)
Utilities\Heap.cs (2)
49_rgv = new List<T>(capacity); 249_rgv = new List<T>(capacity);
Utilities\MathUtils.cs (1)
357_logFactorialCache = new List<double>(LogFactorialCacheSize);
Microsoft.ML.Core.Tests (1)
UnitTests\TestVBuffer.cs (1)
471List<int> indices = new List<int>(a.GetIndices().Length);
Microsoft.ML.Data (5)
DataLoadSave\Database\LoadColumnNameAttribute.cs (1)
23var sources = new List<string>(1);
EntryPoints\EntryPointNode.cs (1)
888var result = new List<EntryPointNode>(nodes.Count);
Evaluators\Metrics\ConfusionMatrix.cs (1)
88List<IReadOnlyList<double>> counts = new List<IReadOnlyList<double>>(NumberOfClasses);
Model\Pfa\PfaContext.cs (1)
171var lets = new List<KeyValuePair<string, JToken>>(locals.Length - sets.Count);
Transforms\NormalizeColumnSng.cs (1)
546Elements = new List<TType>(startingSize);
Microsoft.ML.FastTree (2)
FastTree.cs (1)
2417_sparse = new List<KeyValuePair<int, double>>(_nonZeroElements);
Training\DocumentPartitioning.cs (1)
85.Select(x => new List<int>(innerLoopSize / tree.NumLeaves))
Microsoft.ML.Parquet (2)
PartitionedPathParser.cs (2)
342names = new List<string>(dirs.Count()); 343values = new List<string>(dirs.Count());
Microsoft.ML.Samples (4)
Dynamic\Transforms\TimeSeries\DetectIidChangePoint.cs (1)
27var data = new List<TimeSeriesData>(Size)
Dynamic\Transforms\TimeSeries\DetectIidChangePointBatchPrediction.cs (1)
25var data = new List<TimeSeriesData>(Size)
Dynamic\Transforms\TimeSeries\DetectIidSpike.cs (1)
23var data = new List<TimeSeriesData>(Size + 1)
Dynamic\Transforms\TimeSeries\DetectIidSpikeBatchPrediction.cs (1)
21var data = new List<TimeSeriesData>(Size + 1)
Microsoft.ML.StandardTrainers (3)
Optimizer\DifferentiableFunction.cs (2)
204List<int> indices = new List<int>(dirCount); 205List<float> values = new List<float>(dirCount);
Standard\ModelStatistics.cs (1)
413List<CoefficientStatistics> result = new List<CoefficientStatistics>(ParametersCount - 1);
Microsoft.ML.Tests (1)
Transformers\NormalizerTests.cs (1)
1113var list = new List<float>(num);
Microsoft.ML.TimeSeries (5)
SeasonalityDetector.cs (1)
71var valueCache = seasonalityWindowSize == -1 ? new List<double>() : new List<double>(seasonalityWindowSize);
SrCnnEntireAnomalyDetector.cs (2)
286_previousBatch = new List<double>(batchSize); 287_batch = new List<double>(batchSize);
STL\InnerStl.cs (2)
301var newXValues = new List<double>(length); 313List<double> results = new List<double>(s.Count);
Microsoft.ML.TimeSeries.Tests (4)
TimeSeriesDirectApi.cs (1)
112List<Data> data = new List<Data>(size);
TimeSeriesSimpleApiTests.cs (3)
43var data = new List<Data>(size); 128List<Data> data = new List<Data>(size); 180List<Data> data = new List<Data>(size);
Microsoft.ML.Tokenizers (15)
Model\BertTokenizer.cs (6)
308ids = new(capacity) { ClassificationTokenId }; 313ids = new List<int>(10) { ClassificationTokenId }; 419mask = new List<int>(capacity); 423mask = new List<int>(10); 575typeIds = new List<int>(capacity); 579typeIds = new List<int>(10);
Model\CodeGenTokenizer.cs (1)
1659List<EncodedToken> result = new List<EncodedToken>(text.Length);
Model\EnglishRobertaTokenizer.cs (6)
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); 964List<string> word = new(token.Length); 1045var tokens = new List<EncodedToken>(word.Count);
PreTokenizer\CompositePreTokenizer.cs (1)
54var list = new List<PreTokenizer>(specialTokens.Count + 1);
Utils\PriorityQueue.cs (1)
17_data = new List<T>(capacity);
Microsoft.ML.TorchSharp (6)
Roberta\QATrainer.cs (2)
282List<Tensor> inputTensors = new List<Tensor>(Parent.Option.BatchSize); 283List<Tensor> targetTensors = new List<Tensor>(Parent.Option.BatchSize);
TorchSharpBaseTrainer.cs (4)
206List<Tensor> inputTensors = new List<Tensor>(Parent.Option.BatchSize); 207List<TTargetsCol> targets = new List<TTargetsCol>(Parent.Option.BatchSize); 278List<Tensor> inputTensors = new List<Tensor>(Parent.Option.BatchSize); 279List<TTargetsCol> targets = new List<TTargetsCol>(Parent.Option.BatchSize);
Microsoft.ML.Transforms (5)
Expression\MethodGenerator.cs (1)
180locals = new List<LocalBuilder>(4);
Text\SentimentAnalyzingTransform.cs (1)
121var toHide = new List<string>(colNames.Length);
Text\TextFeaturizingEstimator.cs (3)
562var xfCols = new List<LpNormNormalizingEstimator.ColumnOptions>(2); 585var srcTaggedCols = new List<KeyValuePair<string, string>>(2); 651var metadata = new List<SchemaShape.Column>(2);
Microsoft.NET.StringTools (1)
SpanBasedStringBuilder.cs (1)
109_spans = new List<ReadOnlyMemory<char>>(capacity);
Microsoft.VisualBasic.Core (7)
Microsoft\VisualBasic\CompilerServices\ConversionResolution.vb (6)
756Dim operatorChoices As List(Of Method) = New List(Of Method)(operatorSet.Count) 757Dim candidates As List(Of Method) = New List(Of Method)(operatorSet.Count) 759Dim sourceBases As List(Of Type) = New List(Of Type)(operatorSet.Count) 760Dim targetDeriveds As List(Of Type) = New List(Of Type)(operatorSet.Count) 765sourceDeriveds = New List(Of Type)(operatorSet.Count) 766targetBases = New List(Of Type)(operatorSet.Count)
Microsoft\VisualBasic\CompilerServices\OverloadResolution.vb (1)
735Dim candidates As List(Of Method) = New List(Of Method)(members.Length)
Microsoft.VisualStudio.LanguageServices.CSharp (1)
ProjectSystemShim\TempPECompilerService.cs (1)
39var trees = new List<SyntaxTree>(capacity: sourceCount);
MSBuild (1)
CollectionHelpers.cs (1)
24List<T> inputsWithoutNulls = new List<T>(inputs.Count);
MSBuildTaskHost (3)
BinaryTranslator.cs (2)
329list = new List<string>(count); 346Translate(ref listAsInterface, objectTranslator, count => new List<T>(count));
CollectionHelpers.cs (1)
24List<T> inputsWithoutNulls = new List<T>(inputs.Count);
PresentationBuildTasks (11)
Microsoft\Build\Tasks\Windows\UidManager.cs (2)
652_uids = new List<Uid>(32); 653_namespacePrefixes = new List<string>(2);
MS\Internal\MarkupCompiler\MarkupCompiler.cs (1)
1310var paths = new List<string>(ReferenceAssemblyList?.Count ?? 0);
src\Microsoft.DotNet.Wpf\src\PresentationCore\MS\Internal\Media\XamlSerializationHelper.cs (2)
372List<ThreeDoublesMarkup> resource = new List<ThreeDoublesMarkup>( source.Length/ 8 ) ; // SWAG the length of the collection. 398List<Point> resource = new List<Point>(source.Length/ 8 ); // SWAG the length of the collection.
src\Microsoft.DotNet.Wpf\src\PresentationFramework\MS\Internal\Globalization\LocalizationComments.cs (1)
81List<PropertyComment> tokens = new List<PropertyComment>(8);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlMapTable.cs (1)
1826private readonly List<BamlAttributeInfoRecord> _attributeIdToInfo = new(10);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlRecordWriter.cs (3)
301_staticResourceRecordList = new List<ValueDeferRecord>(5); 1160_staticResourceRecordList = new List<ValueDeferRecord>(1); 1784_staticResourceRecordList = new List<List<ValueDeferRecord>>(1);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlTypeMapper.cs (1)
3256namespaceAssemblyPair = new List<ClrNamespaceAssemblyPair>(1);
PresentationCore (199)
MS\Internal\FontCache\FontResourceCache.cs (2)
137folderResourceMap[folderName] = new List<string>(1); 141folderResourceMap[resourceFullName] = new List<string>(1);
MS\Internal\FontCache\FontSourceCollection.cs (4)
55_fontSources = new List<Text.TextInterface.IFontSource>(1); 107fontSources = new List<Text.TextInterface.IFontSource>(files.Count); 130fontSources = new List<Text.TextInterface.IFontSource>(0); 136fontSources = new List<Text.TextInterface.IFontSource>(resourceEntries.Count);
MS\Internal\IListConverters.cs (4)
98List<double> list = new List<double>(Math.Min(256, value.Length / EstimatedCharCountPerItem + 1)); 141List<ushort> list = new List<ushort>(Math.Min(256, value.Length / EstimatedCharCountPerItem + 1)); 182List<bool> list = new List<bool>(Math.Min(256, value.Length / EstimatedCharCountPerItem + 1)); 224List<Point> list = new List<Point>(Math.Min(256, value.Length / EstimatedCharCountPerItem + 1));
MS\Internal\Ink\CuspData.cs (2)
32_points = new List<CDataPoint>(stylusPoints.Count); 33_nodes = new List<double>(stylusPoints.Count);
MS\Internal\Ink\ErasingStroke.cs (1)
60_erasingStrokeNodes = new List<StrokeNode>(points.Length);
MS\Internal\Ink\InkSerializedFormat\AlgoModule.cs (1)
249List<byte> compressedData = new List<byte>(input.Length + 1); //reasonable default based on profiling.
MS\Internal\Ink\InkSerializedFormat\GorillaCodec.cs (1)
626List<byte> output = new List<byte>((bitsToWrite / 8) * unitsToDecode);
MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (2)
93List<char> charData = new List<char>((int)inkData.Length); 1684_strokeDescriptorTable = new List<StrokeDescriptor>(_coreStrokes.Count);
MS\Internal\Ink\StrokeIntersection.cs (2)
187List<StrokeFIndices> inFIndices = new List<StrokeFIndices>(intersections.Length); 219List<StrokeFIndices> hitFIndices = new List<StrokeFIndices>(intersections.Length);
MS\Internal\Ink\StrokeRenderer.cs (2)
49List<Point> connectingQuadPoints = new List<Point>(iterator.Count * 4); 261List<Point> polyLinePoints = new List<Point>(4);
MS\Internal\Media\ParserStreamGeometryContext.cs (1)
542points = new List<Point>(count);
MS\Internal\Shaping\TypefaceMap.cs (1)
37private IList<ScaledShapeTypeface> _cachedScaledTypefaces = new List<ScaledShapeTypeface>(InitialScaledGlyphableTypefaceCount);
MS\Internal\TextFormatting\FullTextLine.cs (2)
1981IList<TextRunBounds> boundsList = new List<TextRunBounds>(2); 2062List<TextSpan<TextRun>> lsrunList = new List<TextSpan<TextRun>>(2);
MS\Internal\TextFormatting\LineServicesCallbacks.cs (4)
3097glyphAdvances = new List<double>(glyphCount); 3103glyphOffsets = new List<Point>(glyphCount); 3234charWidths = new List<double>(cchText); 3496_indexedGlyphRuns = new List<IndexedGlyphRun>(8);
MS\Internal\TextFormatting\LineServicesRun.cs (1)
641List<DWriteFontFeature> fontFeatures = new List<DWriteFontFeature>((int)CustomOpenTypeFeatures.Count);
MS\Internal\TextFormatting\SimpleTextLine.cs (4)
826boundsList = new List<TextRunBounds>(2); 898List<IndexedGlyphRun> indexedGlyphRuns = new List<IndexedGlyphRun>(_runs.Length); 921displayGlyphAdvances = new List<double>(run.NominalAdvances.Length); 1767displayGlyphAdvances = new List<double>(NominalAdvances.Length);
src\Microsoft.DotNet.Wpf\src\Common\Graphics\exports.cs (2)
1101_others = new List<Entry>(2); // by default we have two entries in the extra storage. 1334List<Entry> others = new List<Entry>(2); // by default we have two entries in the extra storage.
System\Windows\FreezableCollection.cs (3)
50_collection = new List<T>(capacity); 70_collection = new List<T>(count); 795_collection = new List<T>(count);
System\Windows\Ink\IncrementalHitTester.cs (2)
121_strokeInfos = new List<StrokeInfo>(strokes.Count); 226List<StrokeInfo> newStrokeInfos = new List<StrokeInfo>(_strokes.Count);
System\Windows\Input\AccessKeyManager.cs (2)
377List<IInputElement> finalTargets = new List<IInputElement>(1); 589List<IInputElement> copy = new List<IInputElement>(elements.Count);
System\Windows\Input\Command\CommandBindingCollection.cs (3)
159_innerCBList ??= new Collections.Generic.List<CommandBinding>(1); 181_innerCBList ??= new System.Collections.Generic.List<CommandBinding>(collection.Count); 336System.Collections.Generic.List<CommandBinding> list = new System.Collections.Generic.List<CommandBinding>(0);
System\Windows\Input\Command\CommandManager.cs (1)
579list ??= new List<ValueTuple<Type, CommandBinding>>(8)
System\Windows\Input\Command\InputBindingCollection.cs (3)
199_innerBindingList = new System.Collections.Generic.List<InputBinding>(1); 248_innerBindingList = new System.Collections.Generic.List<InputBinding>(collection.Count); 379System.Collections.Generic.List<InputBinding> list = new System.Collections.Generic.List<InputBinding>(0);
System\Windows\Input\Command\InputGestureCollection.cs (3)
158List<InputGesture> list = new List<InputGesture>(0); 275_innerGestureList = new System.Collections.Generic.List<InputGesture>(collection.Count); 402_innerGestureList = new List<InputGesture>(1);
System\Windows\Input\ManipulationDevice.cs (1)
151_manipulators = new List<IManipulator>(2);
System\Windows\Input\ManipulationStartingEventArgs.cs (1)
128_parameters = new List<ManipulationParameters2D>(1);
System\Windows\Input\Stylus\Wisp\PenContext.cs (1)
109List<StylusPointPropertyInfo> propertyInfos = new List<StylusPointPropertyInfo>(cProps + cButtons + 3);
System\Windows\Input\Stylus\Wisp\PenThreadWorker.cs (1)
904List<StylusPointProperty> properties = new List<StylusPointProperty>(cProps + cButtons + 3);
System\Windows\Input\TouchDevice.cs (2)
431others = new List<DependencyObject>(count); 1126_activeDevices = new List<TouchDevice>(2);
System\Windows\Media\Animation\AnimationLayer.cs (1)
198animationClockList = new List<AnimationClock>(oldClocksCount + newClocksCount);
System\Windows\Media\Animation\Generated\BooleanKeyFrameCollection.cs (6)
37_keyFrames = new List< BooleanKeyFrame>(2); 55_keyFrames = new List<BooleanKeyFrame>(0) 98_keyFrames = new List< BooleanKeyFrame>(count); 119_keyFrames = new List< BooleanKeyFrame>(count); 140_keyFrames = new List< BooleanKeyFrame>(count); 161_keyFrames = new List< BooleanKeyFrame>(count);
System\Windows\Media\Animation\Generated\ByteKeyFrameCollection.cs (6)
37_keyFrames = new List< ByteKeyFrame>(2); 55_keyFrames = new List<ByteKeyFrame>(0) 98_keyFrames = new List< ByteKeyFrame>(count); 119_keyFrames = new List< ByteKeyFrame>(count); 140_keyFrames = new List< ByteKeyFrame>(count); 161_keyFrames = new List< ByteKeyFrame>(count);
System\Windows\Media\Animation\Generated\CharKeyFrameCollection.cs (6)
37_keyFrames = new List< CharKeyFrame>(2); 55_keyFrames = new List<CharKeyFrame>(0) 98_keyFrames = new List< CharKeyFrame>(count); 119_keyFrames = new List< CharKeyFrame>(count); 140_keyFrames = new List< CharKeyFrame>(count); 161_keyFrames = new List< CharKeyFrame>(count);
System\Windows\Media\Animation\Generated\ColorKeyFrameCollection.cs (6)
37_keyFrames = new List< ColorKeyFrame>(2); 55_keyFrames = new List<ColorKeyFrame>(0) 98_keyFrames = new List< ColorKeyFrame>(count); 119_keyFrames = new List< ColorKeyFrame>(count); 140_keyFrames = new List< ColorKeyFrame>(count); 161_keyFrames = new List< ColorKeyFrame>(count);
System\Windows\Media\Animation\Generated\DecimalKeyFrameCollection.cs (6)
37_keyFrames = new List< DecimalKeyFrame>(2); 55_keyFrames = new List<DecimalKeyFrame>(0) 98_keyFrames = new List< DecimalKeyFrame>(count); 119_keyFrames = new List< DecimalKeyFrame>(count); 140_keyFrames = new List< DecimalKeyFrame>(count); 161_keyFrames = new List< DecimalKeyFrame>(count);
System\Windows\Media\Animation\Generated\DoubleKeyFrameCollection.cs (6)
37_keyFrames = new List< DoubleKeyFrame>(2); 55_keyFrames = new List<DoubleKeyFrame>(0) 98_keyFrames = new List< DoubleKeyFrame>(count); 119_keyFrames = new List< DoubleKeyFrame>(count); 140_keyFrames = new List< DoubleKeyFrame>(count); 161_keyFrames = new List< DoubleKeyFrame>(count);
System\Windows\Media\Animation\Generated\Int16KeyFrameCollection.cs (6)
37_keyFrames = new List< Int16KeyFrame>(2); 55_keyFrames = new List<Int16KeyFrame>(0) 98_keyFrames = new List< Int16KeyFrame>(count); 119_keyFrames = new List< Int16KeyFrame>(count); 140_keyFrames = new List< Int16KeyFrame>(count); 161_keyFrames = new List< Int16KeyFrame>(count);
System\Windows\Media\Animation\Generated\Int32KeyFrameCollection.cs (6)
37_keyFrames = new List< Int32KeyFrame>(2); 55_keyFrames = new List<Int32KeyFrame>(0) 98_keyFrames = new List< Int32KeyFrame>(count); 119_keyFrames = new List< Int32KeyFrame>(count); 140_keyFrames = new List< Int32KeyFrame>(count); 161_keyFrames = new List< Int32KeyFrame>(count);
System\Windows\Media\Animation\Generated\Int64KeyFrameCollection.cs (6)
37_keyFrames = new List< Int64KeyFrame>(2); 55_keyFrames = new List<Int64KeyFrame>(0) 98_keyFrames = new List< Int64KeyFrame>(count); 119_keyFrames = new List< Int64KeyFrame>(count); 140_keyFrames = new List< Int64KeyFrame>(count); 161_keyFrames = new List< Int64KeyFrame>(count);
System\Windows\Media\Animation\Generated\MatrixKeyFrameCollection.cs (6)
37_keyFrames = new List< MatrixKeyFrame>(2); 55_keyFrames = new List<MatrixKeyFrame>(0) 98_keyFrames = new List< MatrixKeyFrame>(count); 119_keyFrames = new List< MatrixKeyFrame>(count); 140_keyFrames = new List< MatrixKeyFrame>(count); 161_keyFrames = new List< MatrixKeyFrame>(count);
System\Windows\Media\Animation\Generated\ObjectKeyFrameCollection.cs (6)
37_keyFrames = new List< ObjectKeyFrame>(2); 55_keyFrames = new List<ObjectKeyFrame>(0) 98_keyFrames = new List< ObjectKeyFrame>(count); 119_keyFrames = new List< ObjectKeyFrame>(count); 140_keyFrames = new List< ObjectKeyFrame>(count); 161_keyFrames = new List< ObjectKeyFrame>(count);
System\Windows\Media\Animation\Generated\Point3DKeyFrameCollection.cs (6)
37_keyFrames = new List< Point3DKeyFrame>(2); 55_keyFrames = new List<Point3DKeyFrame>(0) 98_keyFrames = new List< Point3DKeyFrame>(count); 119_keyFrames = new List< Point3DKeyFrame>(count); 140_keyFrames = new List< Point3DKeyFrame>(count); 161_keyFrames = new List< Point3DKeyFrame>(count);
System\Windows\Media\Animation\Generated\PointKeyFrameCollection.cs (6)
37_keyFrames = new List< PointKeyFrame>(2); 55_keyFrames = new List<PointKeyFrame>(0) 98_keyFrames = new List< PointKeyFrame>(count); 119_keyFrames = new List< PointKeyFrame>(count); 140_keyFrames = new List< PointKeyFrame>(count); 161_keyFrames = new List< PointKeyFrame>(count);
System\Windows\Media\Animation\Generated\QuaternionKeyFrameCollection.cs (6)
37_keyFrames = new List< QuaternionKeyFrame>(2); 55_keyFrames = new List<QuaternionKeyFrame>(0) 98_keyFrames = new List< QuaternionKeyFrame>(count); 119_keyFrames = new List< QuaternionKeyFrame>(count); 140_keyFrames = new List< QuaternionKeyFrame>(count); 161_keyFrames = new List< QuaternionKeyFrame>(count);
System\Windows\Media\Animation\Generated\RectKeyFrameCollection.cs (6)
37_keyFrames = new List< RectKeyFrame>(2); 55_keyFrames = new List<RectKeyFrame>(0) 98_keyFrames = new List< RectKeyFrame>(count); 119_keyFrames = new List< RectKeyFrame>(count); 140_keyFrames = new List< RectKeyFrame>(count); 161_keyFrames = new List< RectKeyFrame>(count);
System\Windows\Media\Animation\Generated\Rotation3DKeyFrameCollection.cs (6)
37_keyFrames = new List< Rotation3DKeyFrame>(2); 55_keyFrames = new List<Rotation3DKeyFrame>(0) 98_keyFrames = new List< Rotation3DKeyFrame>(count); 119_keyFrames = new List< Rotation3DKeyFrame>(count); 140_keyFrames = new List< Rotation3DKeyFrame>(count); 161_keyFrames = new List< Rotation3DKeyFrame>(count);
System\Windows\Media\Animation\Generated\SingleKeyFrameCollection.cs (6)
37_keyFrames = new List< SingleKeyFrame>(2); 55_keyFrames = new List<SingleKeyFrame>(0) 98_keyFrames = new List< SingleKeyFrame>(count); 119_keyFrames = new List< SingleKeyFrame>(count); 140_keyFrames = new List< SingleKeyFrame>(count); 161_keyFrames = new List< SingleKeyFrame>(count);
System\Windows\Media\Animation\Generated\SizeKeyFrameCollection.cs (6)
37_keyFrames = new List< SizeKeyFrame>(2); 55_keyFrames = new List<SizeKeyFrame>(0) 98_keyFrames = new List< SizeKeyFrame>(count); 119_keyFrames = new List< SizeKeyFrame>(count); 140_keyFrames = new List< SizeKeyFrame>(count); 161_keyFrames = new List< SizeKeyFrame>(count);
System\Windows\Media\Animation\Generated\StringKeyFrameCollection.cs (6)
37_keyFrames = new List< StringKeyFrame>(2); 55_keyFrames = new List<StringKeyFrame>(0) 98_keyFrames = new List< StringKeyFrame>(count); 119_keyFrames = new List< StringKeyFrame>(count); 140_keyFrames = new List< StringKeyFrame>(count); 161_keyFrames = new List< StringKeyFrame>(count);
System\Windows\Media\Animation\Generated\Vector3DKeyFrameCollection.cs (6)
37_keyFrames = new List< Vector3DKeyFrame>(2); 55_keyFrames = new List<Vector3DKeyFrame>(0) 98_keyFrames = new List< Vector3DKeyFrame>(count); 119_keyFrames = new List< Vector3DKeyFrame>(count); 140_keyFrames = new List< Vector3DKeyFrame>(count); 161_keyFrames = new List< Vector3DKeyFrame>(count);
System\Windows\Media\Animation\Generated\VectorKeyFrameCollection.cs (6)
37_keyFrames = new List< VectorKeyFrame>(2); 55_keyFrames = new List<VectorKeyFrame>(0) 98_keyFrames = new List< VectorKeyFrame>(count); 119_keyFrames = new List< VectorKeyFrame>(count); 140_keyFrames = new List< VectorKeyFrame>(count); 161_keyFrames = new List< VectorKeyFrame>(count);
System\Windows\Media\ColorContext.cs (1)
377colorContextsList = new List<ColorContext>((int)numContexts);
System\Windows\Media\Effects\ShaderEffect.cs (2)
470list = new List<T?>(maxIndex); 497_samplerData = new List<SamplerData?>(maxIndex);
System\Windows\Media\FamilyMap.cs (1)
226List<Range> ranges = new List<Range>(3);
System\Windows\Media\Imaging\BitmapDecoder.cs (1)
1428_frames = new List<BitmapFrame>((int)numFrames);
System\Windows\Media\Imaging\BitmapEncoder.cs (3)
290_frames = new List<BitmapFrame>(0); 834private IList<SafeMILHandle> _frameHandles = new List<SafeMILHandle>(0); 835private IList<SafeMILHandle> _writeSourceHandles = new List<SafeMILHandle>(0);
System\Windows\Media\Imaging\LateBoundBitmapDecoder.cs (1)
169_frames = new List<BitmapFrame>((int)1);
System\Windows\Media\PathGeometry.cs (1)
242List<Point> points = new List<Point>((int)pSegmentPoly->Count);
System\Windows\Media\textformatting\TextCharacters.cs (1)
246IList<TextShapeableSymbols> shapeables = new List<TextShapeableSymbols>(2);
System\Windows\UIElement.cs (2)
4647internal static List<double> DpiScaleXValues = new List<double>(3); 4648internal static List<double> DpiScaleYValues = new List<double>(3);
PresentationFramework (195)
MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (2)
229List<ContentLocatorPart> res = new List<ContentLocatorPart>(1); 658private IList<PointSegment> _segments = new List<PointSegment>(1);
MS\Internal\Annotations\Anchoring\LocatorManager.cs (4)
364returnLocators = new List<ContentLocatorBase>(0); 716List<ContentLocatorBase> tempLocators = new List<ContentLocatorBase>(locatorsToReturn.Count * locatorParts.Count); 918locators = new List<ContentLocator>(1); 1209List<ContentLocatorBase> res = new List<ContentLocatorBase>(1);
MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (4)
433res = new List<ITextView>(1); 447res = new List<ITextView>(0); 486res = new List<ITextView>(1); 523res = new List<ITextView>(endPageNumber - startPageNumber + 1);
MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (1)
163List<ContentLocatorPart> res = new List<ContentLocatorPart>(1);
MS\Internal\Annotations\Anchoring\TextViewSelectionProcessor.cs (1)
130res = new List<ContentLocatorPart>(1);
MS\Internal\Annotations\Anchoring\TreeNodeSelectionProcessor.cs (1)
142return new List<ContentLocatorPart>(0);
MS\Internal\Annotations\AnnotationMap.cs (3)
26list = new List<IAttachedAnnotation>(1); 87List<IAttachedAnnotation> result = new List<IAttachedAnnotation>(_annotationIdToAttachedAnnotations.Keys.Count); 108private static readonly List<IAttachedAnnotation> _emptyList = new List<IAttachedAnnotation>(0);
MS\Internal\Annotations\Component\AnnotationHighlightLayer.cs (5)
605List<IHighlightRange> list = new List<IHighlightRange>(1); 622_owners = new List<IHighlightRange>(owners.Count); 767res = new List<HighlightSegment>(1); 773res = new List<HighlightSegment>(2); 1195private List<TextSegment> _contentSegments = new List<TextSegment>(1);
MS\Internal\Annotations\TextAnchor.cs (2)
593List<TextSegment> orderedList = new List<TextSegment>(textSegments.Count); 746private List<TextSegment> _segments = new List<TextSegment>(1);
MS\Internal\Data\CollectionViewGroupRoot.cs (1)
334List<GroupTreeNode> list = new List<GroupTreeNode>(parentGroups.Count + 1);
MS\Internal\Data\LiveShapingItem.cs (1)
188list = new List<CollectionViewGroupInternal>(2);
MS\Internal\Documents\FlowDocumentPaginator.cs (1)
919private List<AsyncRequest> _asyncRequests = new List<AsyncRequest>(0);
MS\Internal\Documents\PageCache.cs (6)
38_cache = new List<PageCacheEntry>(_defaultCacheSize); 367List<PageCacheChange> changes = new List<PageCacheChange>(2); 530List<PageCacheChange> changes = new List<PageCacheChange>(1); 617List<PageCacheChange> changes = new List<PageCacheChange>(2); 705List<PageCacheChange> changes = new List<PageCacheChange>(PageCount); 845List<PageCacheChange> changes = new List<PageCacheChange>(1);
MS\Internal\Documents\RowCache.cs (5)
30_rowCache = new List<RowInfo>(_defaultRowCacheSize); 477List<RowCacheChange> changes = new List<RowCacheChange>(1); 570List<RowCacheChange> changes = new List<RowCacheChange>(1); 672List<RowInfo> tempRows = new List<RowInfo>(pivotPage / columns); 1200List<RowCacheChange> changes = new List<RowCacheChange>(args.Changes.Count);
MS\Internal\Documents\TextBoxView.cs (4)
367_lineMetrics = new List<LineRecord>(1); 1255List<TextSegment> segments = new List<TextSegment>(1); 1782_visualChildren = new List<TextBoxLineDrawingVisual>(1); 2638_viewportLineVisuals = new List<TextBoxLineDrawingVisual>(count);
MS\Internal\Documents\TextContainerHelper.cs (2)
89segments = new List<TextSegment>(1); 97segments = new List<TextSegment>(_size);
MS\Internal\Documents\TextDocumentView.cs (1)
3245List<TextSegment> segments = new List<TextSegment>(1);
MS\Internal\Documents\TextParagraphView.cs (1)
478List<TextSegment> segments = new List<TextSegment>(1);
MS\Internal\Documents\UndoManager.cs (3)
67_undoStack = new List<IUndoUnit>(4); 696List<IUndoUnit> undoStack = new List<IUndoUnit>(UndoCount); 748List<IUndoUnit> undoStack = new List<IUndoUnit>(UndoLimit);
MS\Internal\Globalization\BamlResourceContent.cs (1)
188List<BamlStringToken> tokens = new(8);
MS\Internal\Globalization\BamlTreeNode.cs (3)
42_nodeList = new List<BamlTreeNode>(size); 70List<BamlTreeNode> newNodeList = new List<BamlTreeNode>(Size); 104parent.Children = new List<BamlTreeNode>(children.Count);
MS\Internal\Globalization\BamlTreeUpdater.cs (1)
409IList<BamlTreeNode> list = new List<BamlTreeNode>(4);
MS\Internal\Globalization\LocalizationComments.cs (1)
81List<PropertyComment> tokens = new List<PropertyComment>(8);
MS\Internal\Helper.cs (1)
850itemValues = new List<KeyValuePair<int, object>>(3); // So far the only use of this is to store three values.
MS\Internal\Ink\ClipboardProcessor.cs (1)
376List<UIElement> children = new List<UIElement>(rootInkCanvas.Children.Count);
MS\Internal\Ink\LassoHelper.cs (1)
308_lasso = new List<Point>(100);
MS\Internal\Ink\LassoSelectionBehavior.cs (1)
429List<Point> pointArray = new(4);
MS\Internal\PtsHost\ContainerParaClient.cs (1)
339List<ParagraphResult> paragraphResults = new List<ParagraphResult>(arrayParaDesc.Length);
MS\Internal\PtsHost\FigureParaClient.cs (6)
578paragraphResults = new List<ParagraphResult>(arrayParaDesc.Length); 618paragraphResults = new List<ParagraphResult>(arrayParaDesc.Length); 643List<ColumnResult> columnResults = new List<ColumnResult>(0); 665columnResults = new List<ColumnResult>(1); 685columnResults = new List<ColumnResult>(1); 772List<ParagraphResult> floatingElements = new List<ParagraphResult>(0);
MS\Internal\PtsHost\FloaterParaClient.cs (6)
587paragraphResults = new List<ParagraphResult>(arrayParaDesc.Length); 627paragraphResults = new List<ParagraphResult>(arrayParaDesc.Length); 652List<ColumnResult> columnResults = new List<ColumnResult>(0); 674columnResults = new List<ColumnResult>(1); 694columnResults = new List<ColumnResult>(1); 781List<ParagraphResult> floatingElements = new List<ParagraphResult>(0);
MS\Internal\PtsHost\FlowDocumentPage.cs (6)
334List<Rect> transformedRectangles = new List<Rect>(rectangles.Count); 379List<ParagraphResult> floatingElements = new List<ParagraphResult>(0); 413List<ColumnResult> columnResults = new List<ColumnResult>(0); 443columnResults = new List<ColumnResult>(1); 485columnResults = new List<ColumnResult>(sectionDetails.u.withpagenotes.cBasicColumns); 580List<ParagraphResult> paragraphResults = new List<ParagraphResult>(arrayParaDesc.Length);
MS\Internal\PtsHost\Line.cs (2)
283List<InlineObject> inlineObjects = new List<InlineObject>(1); 675List<GlyphRun> glyphRunsCollection = new(4);
MS\Internal\PtsHost\PtsCache.cs (1)
145_contextPool = new List<ContextDesc>(1);
MS\Internal\PtsHost\PtsHelper.cs (1)
514List<Rect> offsetRectangles = new List<Rect>(rectangleList.Count);
MS\Internal\PtsHost\SubpageParaClient.cs (5)
538List<ColumnResult> columnResults = new List<ColumnResult>(0); 560columnResults = new List<ColumnResult>(1); 579columnResults = new List<ColumnResult>(subpageDetails.u.complex.cBasicColumns); 619List<ParagraphResult> paragraphResults = new List<ParagraphResult>(arrayParaDesc.Length); 691List<ParagraphResult> floatingElements = new List<ParagraphResult>(0);
MS\Internal\PtsHost\TableParaClient.cs (4)
690List<ParagraphResult> rowParagraphResults = new List<ParagraphResult>(0); 733List<ParagraphResult> cellParagraphResults = new List<ParagraphResult>(0); 783List<ParagraphResult> listResults = new List<ParagraphResult>(0); 804List<ParagraphResult> listResults = new List<ParagraphResult>(0);
MS\Internal\PtsHost\TextParaClient.cs (6)
396floaters = new List<ParagraphResult>(arrayAttachedObjectDesc.Length); 433figures = new List<ParagraphResult>(arrayAttachedObjectDesc.Length); 1525List<LineResult> lines = new List<LineResult>(arrayLineDesc.Length); 1577List<LineResult> lines = new List<LineResult>(arrayLineDesc.Length); 2095rectangles = new List<Rect>(1); 2206rectangles = new List<Rect>(1);
MS\Internal\PtsHost\TextParagraph.cs (2)
1057objects = new List<InlineObject>(_inlineObjects.Count); 1533objectsCached = new List<T>(objectsNew.Count);
System\Windows\Annotations\AnnotationHelper.cs (1)
776List<IAttachedAnnotation> attachedAnnotations = new List<IAttachedAnnotation>(annotations.Count);
System\Windows\Annotations\AnnotationService.cs (6)
803List<IAttachedAnnotation> leftover = new List<IAttachedAnnotation>(annotations.Count); 864List<AttachedAnnotationChangedEventArgs> eventsToFire = new List<AttachedAnnotationChangedEventArgs>(attachedAnnotations.Count); 918List<AttachedAnnotationChangedEventArgs> eventsToFire = new List<AttachedAnnotationChangedEventArgs>(attachedAnnotations.Count); 1286List<AttachedAnnotationChangedEventArgs> eventsToFire = new List<AttachedAnnotationChangedEventArgs>(annotation.Anchors.Count); 1318List<AttachedAnnotationChangedEventArgs> eventsToFire = new List<AttachedAnnotationChangedEventArgs>(list.Length); 1483list = new List<IAttachedAnnotation>(1);
System\Windows\Annotations\LocatorGroup.cs (1)
217List<ContentLocatorBase> tempList = new List<ContentLocatorBase>(locatorGroup.Locators.Count * (this.Locators.Count - 1));
System\Windows\Annotations\LocatorPartList.cs (2)
354results = new List<ContentLocatorBase>(1); 359results = new List<ContentLocatorBase>(additionalLocatorParts.Count);
System\Windows\Annotations\Storage\XmlStreamStore.cs (2)
560retObj = new List<Guid>(iterator.Count); 583retObj = new List<Guid>(0);
System\Windows\Automation\Peers\DataGridAutomationPeer.cs (1)
55children = new List<AutomationPeer>(1);
System\Windows\Automation\Peers\DataGridCellItemAutomationPeer.cs (2)
567List<IRawElementProviderSimple> providers = new List<IRawElementProviderSimple>(1); 589List<IRawElementProviderSimple> providers = new List<IRawElementProviderSimple>(1);
System\Windows\Automation\Peers\DataGridColumnHeadersPresenterAutomationPeer.cs (1)
83children = new List<AutomationPeer>(childItems.Count);
System\Windows\Automation\Peers\DataGridItemAutomationPeer.cs (1)
434children = new List<AutomationPeer>(childItems.Count);
System\Windows\Automation\Peers\DataGridRowAutomationPeer.cs (1)
57List<AutomationPeer> children = new List<AutomationPeer>(3);
System\Windows\Automation\Peers\GridViewAutomationPeer.cs (1)
132List<IRawElementProviderSimple> array = new List<IRawElementProviderSimple>(_owner.HeaderRowPresenter.ActualColumnHeaders.Count);
System\Windows\Automation\Peers\GridViewHeaderRowPresenterAutomationPeer.cs (1)
43newList = new List<AutomationPeer>(list.Count);
System\Windows\Automation\Peers\ItemsControlAutomationPeer.cs (2)
76children = new List<AutomationPeer>(childItems.Count); 140children = new List<AutomationPeer>(childItems.Count);
System\Windows\Automation\Peers\MenuItemAutomationPeer.cs (1)
171children = new List<AutomationPeer>(items.Count);
System\Windows\Automation\Peers\SelectorAutomationPeer.cs (1)
91List<IRawElementProviderSimple> selectedProviders = new List<IRawElementProviderSimple>(count);
System\Windows\Automation\Peers\TreeViewAutomationPeer.cs (1)
69children = new List<AutomationPeer>(items.Count);
System\Windows\Controls\DataGridCellsPanel.cs (1)
1948_realizedChildren = new List<UIElement>(children.Count);
System\Windows\Controls\DataGridColumnCollection.cs (1)
22DisplayIndexMap = new List<int>(5);
System\Windows\Controls\Frame.cs (1)
1371_commandBindings = new List<CommandBinding>(6);
System\Windows\Controls\Panel.cs (1)
1001stableKeyValues = new System.Collections.Generic.List<Int64>(count);
System\Windows\Controls\Primitives\DocumentViewerBase.cs (1)
426pageViewList = new List<DocumentPageView>(1/* simplest case has just one element */);
System\Windows\Controls\Primitives\GridViewRowPresenterBase.cs (1)
189DesiredWidthList = new List<double>(count);
System\Windows\Controls\Primitives\Selector.cs (2)
1959List<int> knownIndices = new List<int>(_selectedItems.Count); 2668_list = new List<ItemInfo>(capacity);
System\Windows\Controls\Primitives\ToolBarPanel.cs (1)
348_generatedItemsCollection = new List<UIElement>(children.Count);
System\Windows\Controls\TextBlock.cs (8)
1290_subsequentLines = new List<LineMetrics>(subsequentLinesInitialSize); 1731return new ReadOnlyCollection<Rect>(new List<Rect>(0)); 1741return new ReadOnlyCollection<Rect>(new List<Rect>(0)); 1748return new ReadOnlyCollection<Rect>(new List<Rect>(0)); 1764return new ReadOnlyCollection<Rect>(new List<Rect>(0)); 1852return new HostedElements(new ReadOnlyCollection<TextSegment>(new List<TextSegment>(0))); 1856System.Collections.Generic.List<TextSegment> textSegmentsList = new System.Collections.Generic.List<TextSegment>(1); 2036List<LineResult> lines = new List<LineResult>(lineCount);
System\Windows\Controls\TextSearch.cs (1)
675_charsEntered = new List<string>(10);
System\Windows\Controls\ToolBarTray.cs (1)
965private List<BandInfo> _bands = new List<BandInfo>(0);
System\Windows\Controls\VirtualizingStackPanel.cs (4)
9176_realizedChildren = new List<UIElement>(children.Count); 9444List<String> list = new List<String>(count); 9464List<String> list = new List<String>(count); 11968OffsetList = new List<double>(2);
System\Windows\Diagnostics\ResourceDictionaryDiagnostics.cs (3)
158List<ResourceDictionary> result = new List<ResourceDictionary>(list.Count); 211list = new List<WeakReference<ResourceDictionary>>(1); 300List<T> result = new List<T>(list.Count);
System\Windows\Documents\DocumentSequenceTextContainer.cs (1)
713List<TextSegment> rangeArray = new List<TextSegment>(4);
System\Windows\Documents\DocumentSequenceTextView.cs (1)
548List<TextSegment> parentSegments = new List<TextSegment>(childSegments.Count);
System\Windows\Documents\FixedTextView.cs (1)
717List<TextSegment> list = new List<TextSegment>(1);
System\Windows\Documents\Glyphs.cs (1)
521parsedGlyphs = new List<ParsedGlyphData>(estimatedNumberOfGlyphs);
System\Windows\Documents\MsSpellCheckLib\SpellChecker\SpellChecker.cs (1)
450hasErrorsCache = new List<HasErrorsResult>(HasErrorsCacheCapacity);
System\Windows\Documents\Speller.cs (2)
184List<string> suggestions = new(4); 212_ignoredWordsList = new List<string>(1);
System\Windows\Documents\SpellerHighlightLayer.cs (1)
204list = new List<TextSegment>(1);
System\Windows\Documents\TextRangeBase.cs (1)
1777thisRange._TextSegments = new List<TextSegment>(1);
System\Windows\Documents\TextRangeEditTables.cs (2)
338List<TextSegment> cellRange = new List<TextSegment>(lastRowIndex - firstRowIndex + 1); 374List<TextSegment> textSegments = new List<TextSegment>(1);
System\windows\Documents\TextSelectionHighlightLayer.cs (3)
334rangeArray = new List<TextSegment>(1); 339rangeArray = new List<TextSegment>(1); 344rangeArray = new List<TextSegment>(2);
System\Windows\FrameworkContextData.cs (1)
93private List<WalkerEntry> _currentWalkers = new List<WalkerEntry>(4);
System\Windows\FrameworkElementFactory.cs (2)
744noChildIndexChildren = new List<DependencyObject>(4); 1025noChildIndexChildren = new List<DependencyObject>(4);
System\Windows\Input\KeyboardNavigation.cs (1)
3595private List<WeakReference> _list = new List<WeakReference>(1);
System\Windows\Markup\BamlMapTable.cs (1)
1826private readonly List<BamlAttributeInfoRecord> _attributeIdToInfo = new(10);
System\Windows\Markup\BamlRecordReader.cs (1)
1734staticResourceValuesList = new List<object[]>(defKeyList.Capacity);
System\Windows\Markup\BamlRecordWriter.cs (3)
301_staticResourceRecordList = new List<ValueDeferRecord>(5); 1160_staticResourceRecordList = new List<ValueDeferRecord>(1); 1784_staticResourceRecordList = new List<List<ValueDeferRecord>>(1);
System\Windows\Markup\XamlTypeMapper.cs (1)
3256namespaceAssemblyPair = new List<ClrNamespaceAssemblyPair>(1);
System\Windows\Media\Animation\Generated\ThicknessKeyFrameCollection.cs (6)
37_keyFrames = new List< ThicknessKeyFrame>(2); 55_keyFrames = new List<ThicknessKeyFrame>(0) 98_keyFrames = new List< ThicknessKeyFrame>(count); 119_keyFrames = new List< ThicknessKeyFrame>(count); 140_keyFrames = new List< ThicknessKeyFrame>(count); 161_keyFrames = new List< ThicknessKeyFrame>(count);
System\Windows\Media\Animation\Storyboard.cs (1)
620clockList = new List<AnimationClock>(1);
System\Windows\ResourceDictionary.cs (2)
1905oldDictionaries = new List<ResourceDictionary>(e.OldItems.Count); 1923newDictionaries = new List<ResourceDictionary>(e.NewItems.Count);
System\Windows\ResourcesChangeInfo.cs (2)
45_oldDictionaries = new List<ResourceDictionary>(1); 52_newDictionaries = new List<ResourceDictionary>(1);
System\Windows\Shell\JumpList.cs (6)
493successList = new List<JumpItem>(JumpItems.Count); 496rejectedList = new List<_RejectedJumpItemPair>(JumpItems.Count); 643var items = new List<JumpItem>(rejectedList.Count); 644var reasons = new List<JumpItemRejectionReason>(rejectedList.Count); 657var items = new List<JumpItem>(removedList.Count); 1101var reasons = new List<JumpItemRejectionReason>(_jumpItems.Count);
System\Windows\StyleHelper.cs (4)
1784List<DependencyObject> affectedChildren = new List<DependencyObject>(lastChildIndex); 1843List<DependencyObject> affectedChildren = new List<DependencyObject>(lastChildIndex); 3544dictionaries = new List<ResourceDictionary>(1); 3570List<ResourceDictionary> table = new List<ResourceDictionary>(1);
System\Windows\TriggerActionCollection.cs (1)
38_rawList = new List<TriggerAction>(initialSize);
PresentationFramework.Aero (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (1)
320_freezableCache = new List<Freezable>(size);
PresentationFramework.Aero2 (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (1)
320_freezableCache = new List<Freezable>(size);
PresentationFramework.AeroLite (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (1)
320_freezableCache = new List<Freezable>(size);
PresentationFramework.Classic (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (1)
320_freezableCache = new List<Freezable>(size);
PresentationFramework.Luna (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (1)
320_freezableCache = new List<Freezable>(size);
PresentationFramework.Royale (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (1)
320_freezableCache = new List<Freezable>(size);
PresentationUI (4)
MS\Internal\Documents\Application\CommandEnforcer.cs (1)
65_bindings = new List<PolicyBinding>(_initialBindCount);
MS\Internal\Documents\PeoplePickerWrapper.cs (1)
228List<String> addresses = new List<String>(paths.Length);
MS\Internal\Documents\RightsManagementProvider.cs (2)
369new List<RightsManagementUser>(users.Count); 532grantDictionary[owner] = new List<ContentGrant>(1);
ReachFramework (1)
AlphaFlattener\Flattener.cs (1)
792oldUnderlay[i] = new List<int>(l.Count);
Replay (4)
Replay.cs (1)
148var tasks = new List<Task<BuildData>>(capacity: maxParallel);
src\Compilers\Shared\BuildProtocol.cs (3)
88var requestArgs = new List<Argument>(requestLength); 143var argumentsBuilder = new List<Argument>((int)argumentCount); 474var list = new List<string>(count);
Roslyn.Diagnostics.Analyzers (6)
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
20return new List<string>(capacity: 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (1)
601IList<TextSpan> normalized = new List<TextSpan>(sorted.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
409var spans = new List<TextSpan>(nodesToReplace.Count + tokensToReplace.Count + triviaToReplace.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
146var mergedList = new List<IndentBlockOperation>(count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
89var result = new List<TextChange>(count);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (1)
18var assemblies = new List<Assembly>(assemblyNames.Length);
Shared (2)
JsonSchemaExporter\JsonSchemaExporter.cs (1)
142List<JsonSchema>? anyOf = new(derivedTypes.Count);
Pools\PooledListWithCapacityPolicy.cs (1)
23public override List<T> Create() => new(_listCapacity);
SignalRSamples (1)
ConnectionHandlers\MessagesConnectionHandler.cs (1)
65var tasks = new List<Task>(Connections.Count);
System.Collections (2)
System\Collections\Generic\SortedSet.cs (2)
1052List<T> toSave = new List<T>(Count); 1432List<T> matches = new List<T>(this.Count);
System.Collections.Concurrent (2)
System\Collections\Concurrent\BlockingCollection.cs (2)
1051List<WaitHandle> handlesList = new List<WaitHandle>(collections.Length + 1); // + 1 for the external token handle to be added 1052List<CancellationToken> tokensList = new List<CancellationToken>(collections.Length + 1); // + 1 for the external token
System.Collections.Immutable (2)
System\Collections\Immutable\ImmutableSortedSet_1.cs (2)
1184list = new List<T>(addedItems.Length); 1191list = new List<T>(this.Count + addedItems.Length);
System.ComponentModel.Annotations (2)
System\ComponentModel\DataAnnotations\ValidationAttributeStore.cs (1)
238List<Attribute> attributes = new List<Attribute>(propertyDescriptorAttributes.Count);
System\ComponentModel\DataAnnotations\Validator.cs (1)
520var items = new List<KeyValuePair<ValidationContext, object?>>(properties.Count);
System.ComponentModel.TypeConverter (2)
System\ComponentModel\ReflectTypeDescriptionProvider.cs (2)
605propertyList ??= new List<PropertyDescriptor>(propertyArray.Length * extenders.Length); 1269List<ReflectPropertyDescriptor> extendedList = new List<ReflectPropertyDescriptor>(attributes.Count);
System.Composition.Hosting (1)
System\Composition\Hosting\Core\LifetimeContext.cs (1)
38private List<IDisposable> _boundPartInstances = new List<IDisposable>(0);
System.Configuration.ConfigurationManager (2)
System\Configuration\BaseConfigurationRecord.cs (1)
422indirectLocationInputs.Add(configKey, new List<SectionInput>(1));
System\Configuration\SectionRecord.cs (1)
220inputs = new List<SectionInput>(1);
System.Console (2)
System\TermInfo.Database.cs (2)
224var values = new List<string>(extendedStringCount); 244var names = new List<string>(extendedBoolCount + extendedNumberCount + extendedStringCount);
System.Data.Common (1)
System\Data\XMLSchema.cs (1)
2719List<DataTable> _tableList = new List<DataTable>(_ds.Tables.Count);
System.Data.Odbc (2)
Common\System\Data\Common\DBConnectionString.cs (1)
447List<string> newlist = new List<string>(a.Length + b.Length);
Common\System\Data\ProviderBase\DbConnectionPool.cs (1)
164_objectList = new List<DbConnectionInternal>(MaxPoolSize);
System.Diagnostics.DiagnosticSource (2)
System\Diagnostics\ActivityTagsCollection.cs (2)
98List<string> list = new List<string>(_list.Count); 114List<object?> list = new List<object?>(_list.Count);
System.Diagnostics.Process (1)
System\Diagnostics\ProcessInfo.cs (1)
39_threadInfoList = new List<ThreadInfo>(threadsNumber);
System.Diagnostics.TraceSource (3)
System\Diagnostics\Switch.cs (1)
78List<WeakReference<Switch>> buffer = new List<WeakReference<Switch>>(s_switches.Count);
System\Diagnostics\TraceListeners.cs (1)
20_list = new List<TraceListener?>(1);
System\Diagnostics\TraceSource.cs (1)
49List<WeakReference<TraceSource>> buffer = new List<WeakReference<TraceSource>>(s_tracesources.Count);
System.Formats.Nrbf (2)
System\Formats\Nrbf\ArraySinglePrimitiveRecord.cs (1)
256List<T> values = new List<T>(Math.Min(count, 4));
System\Formats\Nrbf\RectangularArrayRecord.cs (1)
30_records = new List<SerializationRecord>(Math.Min(4, arrayInfo.GetSZArrayLength()));
System.IO.Compression (2)
System\IO\Compression\ZipArchive.Async.cs (1)
328entriesToWrite = new(_entries.Count);
System\IO\Compression\ZipArchive.cs (1)
775entriesToWrite = new(_entries.Count);
System.IO.Packaging (6)
System\IO\Packaging\Package.cs (1)
418List<string> partIndex = new(parts.Length);
System\IO\Packaging\PackageRelationshipSelector.cs (1)
113List<PackageRelationship> relationships = new List<PackageRelationship>(0);
System\IO\Packaging\ZipPackage.cs (4)
176List<PackagePart> parts = new List<PackagePart>(InitialPartListSize); 1410zipFileInfoNameList = new List<string>(count); 1472_ignoredItemDictionary.Add(normalizedPrefixName, new List<string>(_listInitialSize)); 1487_extensionDictionary.Add(extension, new List<string>(_listInitialSize));
System.Linq (19)
System\Linq\AppendPrepend.SpeedOpt.cs (3)
104return new List<TSource>(1) { _item }; 107List<TSource> list = count == -1 ? [] : new List<TSource>(count); 264List<TSource> list = count == -1 ? [] : new List<TSource>(count);
System\Linq\Cast.SpeedOpt.cs (1)
30List<TResult> list = new(_source.Count);
System\Linq\Concat.SpeedOpt.cs (1)
373var list = count != -1 ? new List<TSource>(count) : new List<TSource>();
System\Linq\Lookup.cs (1)
156List<TResult> list = new List<TResult>(_count);
System\Linq\OrderedEnumerable.SpeedOpt.cs (2)
32List<TElement> list = new(buffer.Length); 104return new List<TElement>(1) { GetEnumerableSorter().ElementAt(buffer, buffer.Length, minIdx) };
System\Linq\Range.SpeedOpt.cs (1)
30List<T> list = new List<T>(count);
System\Linq\Repeat.SpeedOpt.cs (1)
26List<TResult> list = new List<TResult>(_count);
System\Linq\SegmentedArrayBuilder.cs (1)
263result = new List<T>(count);
System\Linq\Select.SpeedOpt.cs (6)
158var results = new List<TResult>(source.Length); 301var results = new List<TResult>(count); 414var results = new List<TResult>(source.Length); 532var results = new List<TResult>(count); 798list = new List<TResult>(count); 975List<TResult> list = new List<TResult>(count);
System\Linq\Shuffle.SpeedOpt.cs (2)
211reservoir = new(takeCount); 239reservoir = new List<TSource>(Math.Min(takeCount, 4)) { e.Current };
System.Linq.Expressions (3)
System\Linq\Expressions\Compiler\LambdaCompiler.Statements.cs (1)
666var initializers = new List<ElementInit>(tests);
System\Linq\Expressions\Compiler\StackSpiller.ChildRewriter.cs (1)
205List<Expression> comma = new List<Expression>(count + 1);
System\Linq\Expressions\Interpreter\LightCompiler.cs (1)
2834var parameterList = new List<ParameterExpression>(count);
System.Linq.Queryable (2)
System\Linq\EnumerableRewriter.cs (2)
76newArgs = new List<Expression>(argList.Count); 109List<Expression> exprs = new List<Expression>(na.Expressions.Count);
System.Net.Http (2)
System\Net\Http\DiagnosticsHandler.cs (1)
36var fieldDescriptors = new List<HeaderDescriptor>(fields.Count);
System\Net\Http\Headers\HttpHeaders.cs (1)
1028storeValues = new List<T>(2);
System.Net.HttpListener (1)
System\Net\Managed\ChunkStream.cs (1)
111var chunksForRemoving = new List<Chunk>(count);
System.Net.Requests (1)
System\Net\WebRequest.cs (1)
357var prefixList = new List<WebRequestPrefixElement>(Count)
System.Net.Sockets (1)
System\Net\Sockets\SocketAsyncEventArgs.cs (1)
169_bufferListInternal = new List<ArraySegment<byte>>(bufferCount);
System.Private.CoreLib (23)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\List.cs (2)
371List<TOutput> list = new List<TOutput>(_size); 690List<T> list = new List<T>(count);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (2)
4566Interlocked.CompareExchange(ref s_EventSources, new List<WeakReference<EventSource>>(2), null); 5515byteArrArgIndices ??= new List<int>(4);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingEventSource.cs (1)
745List<byte> traitMetaData = new List<byte>(100);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingEventTypes.cs (2)
178var recursionCheck = new List<Type>(paramInfos.Length); 193var recursionCheck = new List<Type>(types.Length);
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (1)
1775List<string> results = new List<string>(DEFAULT_ALL_DATETIMES_SIZE);
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (1)
1297List<string> results = new List<string>(DEFAULT_ALL_DATETIMES_SIZE);
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (2)
590results ??= new List<MethodInfo>(semiFinalists.Length) { finalist }; 642results ??= new List<MethodInfo>(semiFinalists.Length) { finalist };
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (1)
237cs.m_exceptions ??= new List<Exception>(faultedException.InnerExceptionCount);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (2)
5073list ??= new List<T>(initSize); 5163exceptions ??= new List<Exception>(ex.InnerExceptionCount);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskExceptionHolder.cs (1)
148List<ExceptionDispatchInfo>? exceptions = m_faultExceptions ??= new List<ExceptionDispatchInfo>(1);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadInt64PersistentCounter.cs (1)
53List<ThreadLocalNodeFinalizationHelper>? nodeFinalizationHelpers = t_nodeFinalizationHelpers ??= new List<ThreadLocalNodeFinalizationHelper>(1);
src\libraries\System.Private.CoreLib\src\System\Threading\TimerQueue.Portable.cs (2)
33var timers = new List<TimerQueue>(Instances.Length); 34s_scheduledTimersToFire ??= new List<TimerQueue>(Instances.Length);
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.StringSerializer.cs (1)
375List<AdjustmentRule> rules = new List<AdjustmentRule>(1);
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.cs (1)
155List<AdjustmentRule> rulesList = new List<AdjustmentRule>(_adjustmentRules.Length);
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeNameParser.cs (1)
123genericArgs = new List<TypeName>(2);
src\System\Reflection\Associates.cs (1)
192otherList ??= new List<MethodInfo>(cAssociates);
src\System\RuntimeType.CoreCLR.cs (1)
1336cache = new List<RuntimePropertyInfo>(1);
System.Private.DataContractSerialization (3)
System\Runtime\Serialization\ClassDataContract.cs (1)
1373boundClassContract.Members = new List<DataMember>(Members.Count);
System\Runtime\Serialization\EnumDataContract.cs (2)
220List<DataMember> tempMembers = new List<DataMember>(fields.Length); 221List<long> tempValues = new List<long>(fields.Length);
System.Private.Xml (20)
System\Xml\Core\XmlWriterSettings.cs (1)
677CDataSectionElements = new List<XmlQualifiedName>(length);
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (1)
1592var allMembersList = new List<Member>(mappings.Length);
System\Xml\Serialization\XmlSchemaImporter.cs (1)
1303if (IsCyclicReferencedType(itemElement, new List<string>(1) { identifier }))
System\Xml\Serialization\XmlSerializationReader.cs (3)
3309var arraysToDeclareList = new List<Member>(mappings.Length); 3310var arraysToSetList = new List<Member>(mappings.Length); 3311var allMembersList = new List<Member>(mappings.Length);
System\Xml\Serialization\XmlSerializationReaderILGen.cs (3)
1533var arraysToDeclareList = new List<Member>(mappings.Length); 1534var arraysToSetList = new List<Member>(mappings.Length); 1535var allMembersList = new List<Member>(mappings.Length);
System\Xml\Serialization\XmlSerializationWriterILGen.cs (2)
915List<Type> argTypes = new List<Type>(5); 916List<string> argNames = new List<string>(5);
System\Xml\XPath\Internal\QueryBuilder.cs (1)
443List<Query> argList = new List<Query>(numArgs);
System\Xml\Xsl\Runtime\StringConcat.cs (1)
94List<string?> strList = _strList = new List<string?>(capacity);
System\Xml\Xsl\XmlQueryTypeFactory.cs (1)
826List<XmlQueryType> members = new List<XmlQueryType>(length);
System\Xml\Xsl\Xslt\QilGenerator.cs (2)
199List<EarlyBoundInfo> ebTypes = new List<EarlyBoundInfo>(scriptClasses.Count); 2552args = new List<XslNode>(3);
System\Xml\Xsl\Xslt\XPathPatternBuilder.cs (1)
237List<QilNode> convertedPredicates = new List<QilNode>(predicates.Count);
System\Xml\Xsl\Xslt\XPathPatternParser.cs (1)
127List<QilNode> args = new List<QilNode>(2);
System\Xml\Xsl\Xslt\XslAstAnalyzer.cs (1)
1428newtemplate.SetContent(new List<XslNode>(content.Count - split + 8));
System\Xml\Xsl\Xslt\XsltLoader.cs (1)
2664List<QilName> modes = new List<QilName>(list.Length);
System.Reflection.Emit (5)
System\Reflection\Emit\GenericTypeParameterBuilderImpl.cs (1)
64_interfaces ??= new List<Type>(interfaceConstraints.Length);
System\Reflection\Emit\TypeBuilderImpl.cs (4)
75_interfaces = new List<Type>(interfaces.Length); 913List<FieldInfo> fields = new List<FieldInfo>(_fieldDefinitions.Count); 1021List<PropertyInfo> candidates = new List<PropertyInfo>(_propertyDefinitions.Count); 1081List<PropertyInfo> candidates = new List<PropertyInfo>(properties.Length);
System.Reflection.Metadata (1)
System\Reflection\PortableExecutable\DebugDirectory\DebugDirectoryBuilder.cs (1)
25_entries = new List<Entry>(3);
System.Reflection.MetadataLoadContext (4)
System\Reflection\TypeLoading\Assemblies\RoAssembly.Modules.cs (2)
47List<Module> modules = new List<Module>(_loadedModules.Length + 1) 89List<RoModule> modules = new List<RoModule>(_loadedModules.Length + 1);
System\Reflection\TypeLoading\Events\Ecma\EcmaEvent.cs (1)
68List<MethodInfo> results = new List<MethodInfo>(capacity: count);
System\Reflection\TypeLoading\Types\RoModifiedFunctionPointerType.cs (1)
53List<Type> builder = new(returnTypeOptionalModifiers.Length + 1);
System.Runtime.Caching (2)
System\Runtime\Caching\HostFileChangeMonitor.cs (1)
177List<string> newList = new List<string>(filePaths.Count);
System\Runtime\Caching\MemoryCacheEntryChangeMonitor.cs (1)
35_dependencies = new List<MemoryCacheEntry>(_keys.Count);
System.Security.Claims (1)
System\Security\Claims\GenericPrincipal.cs (1)
49List<Claim> roleClaims = new List<Claim>(roles.Length);
System.Security.Cryptography (6)
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (2)
298return new List<Pkcs12SafeBag>(0); 306List<Pkcs12SafeBag> bags = new List<Pkcs12SafeBag>(serializedBags.Count);
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (1)
1013List<X509ExtensionAsn> extensionAsns = new List<X509ExtensionAsn>(CertificateExtensions.Count);
System\Security\Cryptography\X509Certificates\OpenSslX509ChainProcessor.cs (1)
947var elementStatus = new List<X509ChainStatus>(overallStatus.Count);
System\Security\Cryptography\X509Certificates\X500NameEncoder.cs (1)
203List<byte[]> encodedSets = new List<byte[]>(InitalRdnSize);
System\Security\Cryptography\X509Certificates\X509SubjectAlternativeNameExtension.cs (1)
18_decoded = new List<GeneralNameAsn>(0);
System.Security.Cryptography.Cose (1)
System\Security\Cryptography\Cose\CoseMessage.cs (1)
336List<CoseSignature> signatures = new List<CoseSignature>(signaturesLength.GetValueOrDefault());
System.Security.Cryptography.Pkcs (4)
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (2)
298return new List<Pkcs12SafeBag>(0); 306List<Pkcs12SafeBag> bags = new List<Pkcs12SafeBag>(serializedBags.Count);
System\Security\Cryptography\Pkcs\CmsRecipientCollection.cs (2)
21_recipients = new List<CmsRecipient>(1); 30_recipients = new List<CmsRecipient>(certificates.Count);
System.ServiceModel.NetFramingBase (1)
System\ServiceModel\Channels\ConnectionPool.cs (1)
332var closeTasks = new List<Task>(itemsToClose.Count);
System.ServiceModel.Syndication (2)
System\ServiceModel\Syndication\ResourceCollectionInfo.cs (1)
122s_singleEmptyAccept ??= new List<string>(1) { string.Empty }.AsReadOnly();
System\ServiceModel\XmlBuffer.cs (1)
50_sections = new List<Section>(1);
System.Text.Json (6)
System\Text\Json\Nodes\JsonArray.cs (3)
87_list = new List<JsonNode?>(list.Count) 163List<JsonNode?> list = new(items.Length); 305list = new List<JsonNode?>(jElement.GetArrayLength());
System\Text\Json\Schema\JsonSchemaExporter.cs (1)
103List<JsonSchema>? anyOf = new(derivedTypes.Count);
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (2)
1075List<JsonPropertyInfo> propertyCache = new(properties.Count); 1189List<JsonParameterInfo> parameterCache = new(ParameterCount);
System.Text.RegularExpressions (3)
System\Text\RegularExpressions\Regex.Cache.cs (1)
55private static readonly List<Node> s_cacheList = new List<Node>(DefaultMaxCacheSize);
System\Text\RegularExpressions\RegexCharClass.cs (2)
402_rangelist ??= new List<(char First, char Last)>(6); 1519ranges = new List<(char First, char Last)>(setLength);
System.Text.RegularExpressions.Generator (2)
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCharClass.cs (2)
402_rangelist ??= new List<(char First, char Last)>(6); 1519ranges = new List<(char First, char Last)>(setLength);
System.Threading.Tasks.Dataflow (3)
Blocks\BatchBlock.cs (2)
293ReservedSourcesTemp = new List<KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>>(batchSize); 1101exceptions ??= new List<Exception>(1);
Internal\QueuedMap.cs (1)
65_storage = new List<KeyValuePair<int, T>>(capacity);
System.Windows.Controls.Ribbon (9)
Microsoft\Windows\Automation\Peers\RibbonComboBoxAutomationPeer.cs (1)
66children = new List<AutomationPeer>(1);
Microsoft\Windows\Automation\Peers\RibbonGalleryAutomationPeer.cs (1)
128children = new List<AutomationPeer>(1);
Microsoft\Windows\Automation\Peers\RibbonGroupAutomationPeer.cs (1)
43children = new List<AutomationPeer>(1);
Microsoft\Windows\Automation\Peers\RibbonMenuButtonAutomationPeer.cs (1)
56children = new List<AutomationPeer>(1);
Microsoft\Windows\Automation\Peers\RibbonTabAutomationPeer.cs (1)
48children = new List<AutomationPeer>(1);
Microsoft\Windows\Controls\KeyTipService.cs (1)
1621handlerList = new List<WeakReference>(1);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonGroupsPanel.cs (2)
368List<StarLayoutInfo> starInfoList = new List<StarLayoutInfo>(2); 369List<IProvideStarLayoutInfo> starLayoutInfoProviders = new List<IProvideStarLayoutInfo>(2);
Microsoft\Windows\Controls\TextSearchInternal.cs (1)
708_charsEntered = new List<string>(10);
System.Windows.Forms (23)
System\Resources\AssemblyNamesTypeResolutionService.cs (1)
112List<AssemblyName> assemblyList = new(_names.Length);
System\Windows\Forms\Application.ThreadWindows.cs (1)
23_windows = new List<HWND>(16);
System\Windows\Forms\ComponentModel\COM2Interop\COM2TypeInfoProcessor.cs (1)
104List<nint> handles = new((int)count);
System\Windows\Forms\Control.cs (2)
5481List<ControlTabOrderHolder> holders = new(Controls.Count); 12847List<Rectangle> neighboringControlsRectangles = new(4);
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (1)
936List<DataGridViewColumn> cols = new(_props.Count);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
911autoFillColumns ??= new(Columns.Count);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnCollection.cs (2)
193List<DataGridViewColumn> initialColumns = new(dataGridViewColumns.Length); 194List<DataGridViewColumn> sortedColumns = new(dataGridViewColumns.Length);
System\Windows\Forms\Controls\Labels\LinkLabel.cs (2)
39private readonly List<Link> _links = new(2); 629List<CharacterRange> ranges = new(Links.Count + 1);
System\Windows\Forms\Controls\ListView\ListView.cs (3)
461_savedCheckedItems = new List<ListViewItem>(CheckedItems.Count); 506_savedCheckedItems = new List<ListViewItem>(CheckedItems.Count); 4734_savedSelectedItems = new List<ListViewItem>(lviArr.Length);
System\Windows\Forms\Controls\ListView\ListViewItem.cs (1)
187_subItems = new List<ListViewSubItem>(items.Length);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
161internal List<ToolStripDropDown> ActiveDropDowns { get; } = new(1);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (1)
3551List<Rectangle> neighbors = new(3);
System\Windows\Forms\Input\KeysConverter.cs (1)
37List<string> localizedOrder = new(34);
System\Windows\Forms\Layout\ArrangedElementCollection.cs (1)
18private ArrangedElementCollection(int size) => InnerList = new List<IArrangedElement>(size);
System\Windows\Forms\Layout\TableLayout.cs (2)
1394List<LayoutInfo> childrenInfo = new(children.Count); 1455List<LayoutInfo> layoutInfos = new(container.Children.Count);
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutSettings.cs (1)
497List<ControlInformation> controlsInfo = new(Owner!.Children.Count);
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutSettings.TableLayoutSettingsStub.cs (1)
88List<ControlInformation> listOfControlInfo = new(_controlsInfo.Count);
System.Windows.Forms.Design (28)
System\ComponentModel\Design\DesignerHost.cs (2)
1136List<IComponent> selectedComponents = new(_savedSelection.Count); 1170List<string> list = new(ss.SelectionCount);
System\ComponentModel\Design\EventBindingService.cs (1)
176List<PropertyDescriptor> props = new(events.Count);
System\ComponentModel\Design\ExtenderProviderService.cs (1)
32_providers ??= new(4);
System\ComponentModel\Design\ReferenceService.cs (2)
84_references = new(container.Components.Count); 287List<object> results = new(_references.Count);
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.ComponentListCodeDomSerializer.cs (2)
588defaultPropList ??= new(data.Members.Count); 628defaultPropList ??= new(data.Members.Count);
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.ModifierConverter.cs (1)
101List<MemberAttributes> list = new(values.Count);
System\ComponentModel\Design\Serialization\CollectionCodeDomSerializer.cs (1)
566List<CodeExpression> arrayList = new(valuesToSerialize.Count);
System\ComponentModel\Design\UndoEngine.UndoUnit.cs (1)
472List<IComponent> list = new(_lastSelection.Count);
System\Drawing\Design\ToolboxItem.cs (1)
709List<string> propertyNames = new(Properties.Count);
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (1)
160List<SnapLine> lines = new(2);
System\Windows\Forms\Design\CommandSet.cs (2)
458List<IComponent> list = new(components.Length); 3158List<string?> names = new(objects.Count);
System\Windows\Forms\Design\ControlCodeDomSerializer.cs (1)
34suspendedComponents = new(container.Components.Count);
System\Windows\Forms\Design\ControlCommandSet.cs (1)
464List<SnapLine> lines = new(2);
System\Windows\Forms\Design\ControlDesigner.cs (1)
347List<SnapLine> snapLines = new(8);
System\Windows\Forms\Design\DataGridViewDesigner.cs (1)
622columnsToBeAdded = new List<DataGridViewColumn>(backEndProps!.Count);
System\Windows\Forms\Design\DesignerFrame.cs (1)
318List<ThemedScrollbarWindow> windows = new(Controls.Count);
System\Windows\Forms\Design\DesignerUtils.cs (2)
708List<Type> final = new(types.Count); 765List<IComponent> newObjects = new(objects.Count);
System\Windows\Forms\Design\DocumentDesigner.cs (1)
833_suspendedComponents = new(container.Components.Count + 1);
System\Windows\Forms\Design\FormDocumentDesigner.cs (1)
194snapLines = new List<SnapLine>(4);
System\Windows\Forms\Design\OleDragDropHandler.ComponentDataObject.cs (1)
249List<object> topComponents = new(_components.Length);
System\Windows\Forms\Design\ParentControlDesigner.cs (2)
301=> AddPaddingSnapLinesCommon(snapLines ??= new List<SnapLine>(4)); 340snapLines = new List<SnapLine>(4);
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (1)
260List<Type> creatableTypes = new(itemTypes.Count);
System.Windows.Forms.Primitives.Tests (2)
System\Windows\Forms\SinglyLinkedListTests.cs (2)
177List<T> list = new(linkedList.Count); 190List<T> list = new(linkedList.Count);
System.Windows.Forms.UI.IntegrationTests (1)
Infra\ScreenRecordService.cs (1)
242List<(TimeSpan elapsed, Bitmap image, Size offset)> resultFrames = new(frames.Length);
System.Windows.Input.Manipulations (1)
System\Windows\Input\Manipulations\ManipulationSequence.cs (1)
319addedManipulatorList = new List<ManipulatorState>(20);
System.Xaml (11)
System\Xaml\NameScope.cs (2)
229var list = new List<string>(_nameMap.Keys.Count); 248var list = new List<object>(_nameMap.Values.Count);
System\Xaml\Schema\TypeReflector.cs (3)
472knownMembers = new List<XamlMember>(propList.Length + eventList.Length); 536List<PropertyInfo> filteredResult = new List<PropertyInfo>(result.Count); 590List<EventInfo> filteredResult = new List<EventInfo>(result.Count);
System\Xaml\XamlNodeList.cs (1)
41_nodeList = new List<XamlNode>(size);
System\Xaml\XamlObjectReader.cs (1)
1649IList constructorArguments = new List<object>(constructorParameters.Length);
System\Xaml\XamlSchemaContext.cs (1)
1413: base(capacity)
System\Xaml\XamlType.cs (3)
728List<XamlType> result = new List<XamlType>(contentWrappers.Count + 1); 828contentWrappers = new List<XamlType>(wrapperTypes.Count); 1663List<XamlMember> result = new List<XamlMember>(excludedMembers.Count);
Test.Utilities (5)
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
20return new List<string>(capacity: 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (1)
601IList<TextSpan> normalized = new List<TextSpan>(sorted.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
409var spans = new List<TextSpan>(nodesToReplace.Count + tokensToReplace.Count + triviaToReplace.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
146var mergedList = new List<IndentBlockOperation>(count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
89var result = new List<TextChange>(count);
Text.Analyzers (6)
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
20return new List<string>(capacity: 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (1)
601IList<TextSpan> normalized = new List<TextSpan>(sorted.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
409var spans = new List<TextSpan>(nodesToReplace.Count + tokensToReplace.Count + triviaToReplace.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
146var mergedList = new List<IndentBlockOperation>(count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
89var result = new List<TextChange>(count);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (1)
18var assemblies = new List<Assembly>(assemblyNames.Length);
UIAutomationClientSideProviders (4)
MS\Internal\AutomationProxies\ProxyHwnd.cs (1)
510List<WinEventTracker.EvtIdProperty> automationEvents = new(16);
MS\Internal\AutomationProxies\ProxySimple.cs (2)
587List<ClickablePoint.CPRect> listIn = new(100); 588List<ClickablePoint.CPRect> listOut = new(100);
MS\Internal\AutomationProxies\WinEventTracker.cs (1)
394hookParams._hWndList = new List<EventCreateParams>(16);
vbc (3)
src\Compilers\Shared\BuildProtocol.cs (3)
88var requestArgs = new List<Argument>(requestLength); 143var argumentsBuilder = new List<Argument>((int)argumentCount); 474var list = new List<string>(count);
VBCSCompiler (3)
src\Compilers\Shared\BuildProtocol.cs (3)
88var requestArgs = new List<Argument>(requestLength); 143var argumentsBuilder = new List<Argument>((int)argumentCount); 474var list = new List<string>(count);
xunit.console (1)
CommandLine.cs (1)
119var args = new List<string>(capacity: rspLines.Length);