619 references to List
AnalyzerRunner (1)
CodeRefactoringRunner.cs (1)
201var assemblies = new List<Assembly>(MefHostServices.DefaultAssemblies);
Aspire.Hosting (1)
src\Shared\CustomResourceSnapshotExtensions.cs (1)
36var existingProperties = new List<ResourcePropertySnapshot>(properties);
Aspire.Hosting.Azure (1)
src\Shared\CustomResourceSnapshotExtensions.cs (1)
36var existingProperties = new List<ResourcePropertySnapshot>(properties);
BuildValidator (1)
Program.cs (1)
107var excludes = new List<string>(exclude ?? Array.Empty<string>());
Diagnostics.EFCore.FunctionalTests (1)
Helpers\TestLoggerProvider.cs (1)
38return new List<string>(_messages);
dotnet-dev-certs (1)
Program.cs (1)
52var newArgs = new List<string>(args);
dotnet-svcutil (1)
GlobalTool.cs (1)
18var arguments = new List<string>(args);
dotnet-svcutil.xmlserializer (1)
Microsoft\Tools\ServiceModel\SvcUtil\Options.cs (1)
257_parent._inputParameters = new List<string>(_arguments.GetArguments(String.Empty));
dotnet-svcutil-lib (24)
CodeDomFixup\VisitorFixup.cs (1)
49List<CodeDomVisitor> list = new List<CodeDomVisitor>(visitors);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlWriterSettings.cs (1)
316clonedSettings._cdataSections = new List<XmlQualifiedName>(_cdataSections);
FrameworkFork\Microsoft.Xml\Xml\schema\XdrBuilder.cs (2)
791builder._ElementDef._ElementDecl.Values = new List<string>((string[])obj); 1091builder._AttributeDef._AttDef.Values = new List<string>((string[])obj);
FrameworkFork\Microsoft.Xml\Xml\schema\XmlValueConverter.cs (1)
3625return new List<string>(XmlConvert.SplitString(value));
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlMapping.cs (1)
126List<XmlRootAttribute> list = new List<XmlRootAttribute>(type.GetTypeInfo().GetCustomAttributes<XmlRootAttribute>());
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (1)
517List<XmlSchemaProviderAttribute> attrs = new List<XmlSchemaProviderAttribute>(type.GetTypeInfo().GetCustomAttributes<XmlSchemaProviderAttribute>(false));
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\CacheAxisQuery.cs (1)
25this.outputBuffer = new List<XPathNavigator>(other.outputBuffer);
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\CacheOutputQuery.cs (1)
29this.outputBuffer = new List<XPathNavigator>(other.outputBuffer);
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\ClonableStack.cs (1)
17private ClonableStack(System.Collections.Generic.IEnumerable<T> collection) : base(collection) { }
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\followingsibling.cs (1)
28_parentStk = new List<XPathNavigator>(other._parentStk);
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\SortQuery.cs (1)
31_results = new List<SortKey>(other._results);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ExceptionDataContract.cs (1)
263tempMembers = new List<DataMember>(BaseContract.Members); //Don't set tempMembers = BaseContract.Members and then start adding, because this alters the base's reference.
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\AddressHeaderCollection.cs (1)
22: base(new List<AddressHeader>(addressHeaders))
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceReflector.cs (1)
600List<Type> types = new List<Type>(GetInheritedContractTypes(interfaceType));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\FaultFormatter.cs (1)
31faultContractInfoList = new List<FaultContractInfo>(faultContractInfoCollection);
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityProtocolFactory.cs (1)
144_channelSupportingTokenAuthenticatorSpecification = new Collection<SupportingTokenAuthenticatorSpecification>(new List<SupportingTokenAuthenticatorSpecification>(factory._channelSupportingTokenAuthenticatorSpecification));
FrameworkFork\System.ServiceModel\System\ServiceModel\SynchronizedCollection.cs (1)
38_items = new List<T>(list);
FrameworkFork\System.ServiceModel\System\ServiceModel\SynchronizedReadOnlyCollection.cs (2)
37_items = new List<T>(list); 63_items = new List<T>(list);
FrameworkFork\System.Web.Services\Configuration\WebServicesSection.cs (3)
58object[] attrs = new List<object>(extensionType.GetTypeInfo().GetCustomAttributes(typeof(XmlFormatExtensionAttribute), false)).ToArray(); 76attrs = new List<object>(extensionType.GetTypeInfo().GetCustomAttributes(typeof(XmlFormatExtensionPrefixAttribute), false)).ToArray(); 111object[] attrs = new List<object>(type.GetTypeInfo().GetCustomAttributes(typeof(XmlFormatExtensionPointAttribute), false)).ToArray();
Metadata\ServiceDescriptor.cs (1)
185var orphanContracts = new List<ContractDescription>(this.Contracts);
dotnet-svcutil-lib.Tests (1)
FixupUtil.cs (1)
99var replacements = new List<ReplaceInfo>(_replacements);
Identity.DefaultUI.WebSite (1)
src\Identity\test\InMemory.Test\InMemoryUserStore.cs (1)
419var updatedCodes = new List<string>(splitCodes.Where(s => s != code));
IIS.Common.TestLib (1)
DisposableList.cs (1)
13public DisposableList(IEnumerable<T> collection) : base(collection) { }
illink (5)
ILLink.RoslynAnalyzer (1)
DataFlow\InterproceduralState.cs (1)
55 var methodsList = new List<MethodBodyValue> (Methods.GetKnownValues ());
Microsoft.Arcade.Test.Common (2)
DiffUtil.cs (2)
79IList<T> expectedList = expected as IList<T> ?? new List<T>(expected); 80IList<T> actualList = actual as IList<T> ?? new List<T>(actual);
Microsoft.AspNetCore.Antiforgery (1)
Internal\DefaultClaimUidExtractor.cs (1)
44identitiesList = new List<ClaimsIdentity>(claimsIdentities);
Microsoft.AspNetCore.Antiforgery.Test (1)
DefaultAntiforgeryTokenSerializerTest.cs (1)
158var input = new List<byte>(data);
Microsoft.AspNetCore.Authorization (2)
AuthorizationPolicy.cs (2)
38Requirements = new List<IAuthorizationRequirement>(requirements).AsReadOnly(); 39AuthenticationSchemes = new List<string>(authenticationSchemes).AsReadOnly();
Microsoft.AspNetCore.Diagnostics (1)
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
47_exceptionHandlers = exceptionHandlers as IExceptionHandler[] ?? new List<IExceptionHandler>(exceptionHandlers).ToArray();
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (9)
ServerStreamingServerCallHandlerTests.cs (5)
49var descriptorPath = new List<FieldDescriptor>(new[] { HelloRequest.Descriptor.FindFieldByNumber(HelloRequest.NameFieldNumber) }); 99["name"] = CreateRouteParameter(new List<FieldDescriptor>(new[] { HelloRequest.Descriptor.FindFieldByNumber(HelloRequest.NameFieldNumber) })) 141["name"] = CreateRouteParameter(new List<FieldDescriptor>(new[] { HelloRequest.Descriptor.FindFieldByNumber(HelloRequest.NameFieldNumber) })) 181["name"] = CreateRouteParameter(new List<FieldDescriptor>(new[] { HelloRequest.Descriptor.FindFieldByNumber(HelloRequest.NameFieldNumber) })) 230["name"] = CreateRouteParameter(new List<FieldDescriptor>(new[] { HelloRequest.Descriptor.FindFieldByNumber(HelloRequest.NameFieldNumber) }))
UnaryServerCallHandlerTests.cs (4)
56["name"] = CreateRouteParameter(new List<FieldDescriptor>(new[] { HelloRequest.Descriptor.FindFieldByNumber(HelloRequest.NameFieldNumber) })), 57["sub.subfield"] = CreateRouteParameter(new List<FieldDescriptor>(new[] 100["name"] = CreateRouteParameter(new List<FieldDescriptor>(new[] { HelloRequest.Descriptor.FindFieldByNumber(HelloRequest.NameFieldNumber) })) 134["name"] = CreateRouteParameter(new List<FieldDescriptor>(new[] { HelloRequest.Descriptor.FindFieldByNumber(HelloRequest.NameFieldNumber) }))
Microsoft.AspNetCore.Http.Extensions (5)
QueryBuilder.cs (1)
34_params = new List<KeyValuePair<string, string>>(parameters);
RequestDelegateFactory.cs (2)
309return new List<object>(metadata); 650factoryContext.Parameters = new List<ParameterInfo>(parameters);
src\Shared\PropertyAsParameterInfo.cs (1)
180var attributes = new List<CustomAttributeData>(
TagsAttribute.cs (1)
28Tags = new List<string>(tags);
Microsoft.AspNetCore.Http.Features (1)
CookieOptions.cs (1)
48_extensions = new List<string>(options._extensions);
Microsoft.AspNetCore.Identity.InMemory.Test (1)
InMemoryUserStore.cs (1)
419var updatedCodes = new List<string>(splitCodes.Where(s => s != code));
Microsoft.AspNetCore.JsonPatch.Tests (6)
Internal\ListAdapterTest.cs (6)
309var targetObject = new List<int>(input); 328var targetObject = new List<int>(input); 337Assert.Equal(new List<int>(input), targetObject); 348var targetObject = new List<int>(input); 367var targetObject = new List<int>(input); 375Assert.Equal(new List<int>(expected), targetObject);
Microsoft.AspNetCore.Mvc.ApiExplorer (2)
EndpointMetadataApiDescriptionProvider.cs (1)
471actionDescriptor.EndpointMetadata = new List<object>(endpointMetadata);
src\Shared\PropertyAsParameterInfo.cs (1)
180var attributes = new List<CustomAttributeData>(
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
EndpointMetadataApiDescriptionProviderTest.cs (1)
1551var metadataItems = new List<object>(requestDelegateResult.EndpointMetadata) { methodInfo, httpMethodMetadata };
Microsoft.AspNetCore.Mvc.Core (21)
ApplicationModels\ActionModel.cs (5)
35Attributes = new List<object>(attributes); 59Attributes = new List<object>(other.Attributes); 60Filters = new List<IFilterMetadata>(other.Filters); 66Parameters = new List<ParameterModel>(other.Parameters.Select(p => new ParameterModel(p) { Action = this })); 67Selectors = new List<SelectorModel>(other.Selectors.Select(s => new SelectorModel(s)));
ApplicationModels\ControllerActionDescriptorBuilder.cs (2)
185actionDescriptor.ActionConstraints = new List<IActionConstraintMetadata>(selectorModel.ActionConstraints); 193actionDescriptor.EndpointMetadata = new List<object>(selectorModel.EndpointMetadata);
ApplicationModels\ControllerModel.cs (6)
35Attributes = new List<object>(attributes); 58Attributes = new List<object>(other.Attributes); 59Filters = new List<IFilterMetadata>(other.Filters); 64Actions = new List<ActionModel>(other.Actions.Select(a => new ActionModel(a) { Controller = this })); 67new List<PropertyModel>(other.ControllerProperties.Select(p => new PropertyModel(p) { Controller = this })); 68Selectors = new List<SelectorModel>(other.Selectors.Select(s => new SelectorModel(s)));
ApplicationModels\ParameterModelBase.cs (2)
26Attributes = new List<object>(attributes ?? throw new ArgumentNullException(nameof(attributes))); 40Attributes = new List<object>(other.Attributes);
ApplicationModels\SelectorModel.cs (2)
30ActionConstraints = new List<IActionConstraintMetadata>(other.ActionConstraints); 31EndpointMetadata = new List<object>(other.EndpointMetadata);
Filters\FilterFactory.cs (1)
32var allFilterItems = new List<FilterItem>(staticFilterItems);
Infrastructure\CopyOnWriteList.cs (1)
30_copy = new List<T>(_source);
Infrastructure\ObjectResultExecutor.cs (1)
164var considered = new List<string?>(contentTypes);
ModelBinding\Validation\CompositeClientModelValidatorProvider.cs (1)
23ValidatorProviders = new List<IClientModelValidatorProvider>(providers);
Microsoft.AspNetCore.Mvc.Core.Test (3)
Filters\FilterProviderTest.cs (1)
142actionContext.ActionDescriptor.FilterDescriptors = new List<FilterDescriptor>(
Infrastructure\ActionSelectionTableTest.cs (1)
555var metadata = new List<object>(a.EndpointMetadata ?? Array.Empty<object>());
ModelBinding\Binders\BodyModelBinderProviderTest.cs (1)
137new List<IInputFormatter>(formatters),
Microsoft.AspNetCore.Mvc.IntegrationTests (1)
ModelBindingTestHelper.cs (1)
40ValueProviderFactories = new List<IValueProviderFactory>(options.Value.ValueProviderFactories),
Microsoft.AspNetCore.Mvc.Razor (1)
TagHelperComponentManager.cs (1)
22Components = new List<ITagHelperComponent>(tagHelperComponents);
Microsoft.AspNetCore.Mvc.RazorPages (9)
ApplicationModels\PageApplicationModel.cs (5)
48EndpointMetadata = new List<object>(ActionDescriptor.EndpointMetadata ?? Array.Empty<object>()); 64Filters = new List<IFilterMetadata>(other.Filters); 67HandlerMethods = new List<PageHandlerModel>(other.HandlerMethods.Select(m => new PageHandlerModel(m))); 68HandlerProperties = new List<PagePropertyModel>(other.HandlerProperties.Select(p => new PagePropertyModel(p))); 70EndpointMetadata = new List<object>(other.EndpointMetadata);
ApplicationModels\PageHandlerModel.cs (2)
48Attributes = new List<object>(other.Attributes); 52Parameters = new List<PageParameterModel>(other.Parameters.Select(p => new PageParameterModel(p) { Handler = this }));
ApplicationModels\PageRouteModel.cs (1)
56Selectors = new List<SelectorModel>(other.Selectors.Select(m => new SelectorModel(m)));
Infrastructure\DynamicPageEndpointMatcherPolicy.cs (1)
156var loadedEndpoints = new List<Endpoint>(endpoints);
Microsoft.AspNetCore.Mvc.ViewFeatures (5)
PartialViewResultExecutor.cs (1)
86var locations = new List<string>(originalResult.SearchedLocations);
ViewComponents\ViewComponentDescriptorCollection.cs (1)
20Items = new List<ViewComponentDescriptor>(items);
ViewEngines\CompositeViewEngine.cs (2)
66searchedList = new List<string>(searchedLocations); 111searchedList = new List<string>(searchedLocations);
ViewResultExecutor.cs (1)
87var locations = new List<string>(originalResult.SearchedLocations);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
DefaultHtmlGeneratorTest.cs (1)
775metadataProvider.GetModelExplorerForType(typeof(List<string>), new List<string>(rawValue));
Microsoft.AspNetCore.OpenApi (1)
src\Shared\PropertyAsParameterInfo.cs (1)
180var attributes = new List<CustomAttributeData>(
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiGeneratorTests.cs (1)
1036var metadataItems = new List<object>(attributes) { methodInfo, httpMethodMetadata };
Microsoft.AspNetCore.Razor (1)
TagHelpers\TagHelperAttributeList.cs (1)
25: base(new List<TagHelperAttribute>(attributes))
Microsoft.AspNetCore.Razor.Test (1)
TagHelpers\ReadOnlyTagHelperAttributeListTest.cs (1)
729: base(new List<TagHelperAttribute>(attributes))
Microsoft.AspNetCore.Routing (7)
Builder\EndpointRouteBuilderExtensions.cs (1)
214new List<object>(options.EndpointBuilder.Metadata) :
Constraints\HttpMethodRouteConstraint.cs (1)
24AllowedMethods = new List<string>(allowedMethods);
DefaultEndpointDataSource.cs (1)
38_endpoints = new List<Endpoint>(endpoints);
Matching\DfaNode.cs (1)
72Matches = new List<Endpoint>(endpoints);
Patterns\DefaultRoutePatternTransformer.cs (3)
174updatedSegments = new List<RoutePatternPathSegment>(original.PathSegments); 175updatedParameters = new List<RoutePatternParameterPart>(original.Parameters); 230var updatedParts = new List<RoutePatternPart>(segment.Parts);
Microsoft.AspNetCore.Routing.Abstractions (1)
RouteData.cs (1)
40_routers = new List<IRouter>(other.Routers);
Microsoft.AspNetCore.Routing.Microbenchmarks (1)
EndpointRoutingBenchmarkBase.cs (1)
112var endpointMetadata = new List<object>(metadata ?? Array.Empty<object>());
Microsoft.AspNetCore.Routing.Tests (3)
Tree\TreeRouterTest.cs (3)
1748nestedRouters = new List<IRouter>(c.RouteData.Routers); 1785nestedRouters = new List<IRouter>(c.RouteData.Routers); 1829nestedRouters = new List<IRouter>(c.RouteData.Routers);
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Internal\Infrastructure\TransportManager.cs (1)
121return StopTransportsAsync(new List<ActiveTransport>(_transports), cancellationToken);
Internal\ServerAddressesCollection.cs (1)
91return new List<string>(_addresses).GetEnumerator();
Microsoft.AspNetCore.SignalR.Core (4)
HubConnectionHandler.cs (2)
80hubFilters = new List<IHubFilter>(_hubOptions.HubFilters); 93hubFilters = new List<IHubFilter>(_globalHubOptions.HubFilters);
HubOptionsSetup`T.cs (2)
32options.SupportedProtocols = new List<string>(_hubOptions.SupportedProtocols ?? Array.Empty<string>()); 46options.HubFilters = new List<IHubFilter>(_hubOptions.HubFilters);
Microsoft.AspNetCore.StaticAssets (2)
Development\StaticAssetDevelopmentRuntimeHandler.cs (2)
256var responseHeaders = new List<StaticAssetResponseHeader>(descriptor.ResponseHeaders); 284var propertiesList = new List<StaticAssetProperty>(descriptor.Properties);
Microsoft.Build (63)
BackEnd\BuildManager\BuildManager.cs (4)
967var submissionsToCheck = new List<BuildSubmissionBase>(_buildSubmissions.Values); 2574var submissions = new List<BuildSubmissionBase>(_buildSubmissions.Values); 2777var remoteLoggers = new List<LoggerDescription>(loggingService.LoggerDescriptions); 2814var submissions = new List<BuildSubmissionBase>(_buildSubmissions.Values);
BackEnd\BuildManager\BuildParameters.cs (2)
280_forwardingLoggers = other._forwardingLoggers != null ? new List<ForwardingLoggerRecord>(other._forwardingLoggers) : null; 283_loggers = other._loggers != null ? new List<ILogger>(other._loggers) : null;
BackEnd\BuildManager\BuildRequestData.cs (1)
80PropertiesToTransfer = new List<string>(propertiesToTransfer);
BackEnd\BuildManager\BuildRequestDataBase.cs (1)
22TargetNames = new List<string>(targetNames);
BackEnd\BuildManager\RequestedProjectState.cs (2)
47result.PropertyFilters = new List<string>(PropertyFilters); 53kvp => kvp.Value == null ? null : new List<string>(kvp.Value));
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (1)
222var requestsToShutdown = new List<BuildRequestEntry>(_requests);
BackEnd\Components\Caching\ResultsCache.cs (1)
208List<string> targetsToAddResultsFor = new List<string>(configInitialTargets);
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (1)
146var contextsToShutDown = new List<NodeContext>(_nodeContexts.Values);
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (1)
202contextsToShutDown = new List<NodeContext>(_nodeContexts.Values);
BackEnd\Components\RequestBuilder\IntrinsicTasks\MSBuild.cs (1)
577undefinePropertiesPerProject[i] = new List<string>(undefineProperties);
BackEnd\Components\RequestBuilder\Lookup.cs (2)
849List<string> metadataToRemove = new List<string>(itemToModify.Metadata.Where(m => modificationsToApply[m.Name].Remove).Select(m => m.Name)); 1095var metadataToRemove = new List<string>(_modifications.Keys.Where(m => other[m].Remove));
BackEnd\Components\RequestBuilder\RequestBuilder.cs (1)
1034List<BuildResult> resultsList = new List<BuildResult>(results.Values);
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (1)
621List<ProjectItemInstance> upToDateInputItems = new List<ProjectItemInstance>(inputItems);
BackEnd\Components\Scheduler\SchedulableRequest.cs (2)
424List<SchedulableRequest> requestsToUnblock = new List<SchedulableRequest>(_requestsWeAreBlocking); 613List<SchedulableRequest> tempRequests = new List<SchedulableRequest>(_requestsWeAreBlockedBy.Values);
BackEnd\Components\Scheduler\Scheduler.cs (10)
434List<SchedulableRequest> unscheduledRequests = new List<SchedulableRequest>(_schedulingData.UnscheduledRequests); 995List<SchedulableRequest> unscheduledRequests = new List<SchedulableRequest>(_schedulingData.UnscheduledRequestsWhichCanBeScheduled); 1022List<int> nodesByConfigurationCountAscending = new List<int>(_availableNodes.Keys); 1306List<int> nodesByConfigurationCountAscending = new List<int>(_availableNodes.Keys); 1937List<SchedulableRequest> unscheduledRequests = new List<SchedulableRequest>(_schedulingData.UnscheduledRequests); 2264List<string> leftTargets = new List<string>(existingRequest.BuildRequest.Targets); 2265List<string> rightTargets = new List<string>(request.Targets); 2537List<SchedulableRequest> childRequests = new List<SchedulableRequest>(_schedulingData.GetRequestsByHierarchy(request)); 2616List<SchedulableRequest> scheduledRequestsByNode = new List<SchedulableRequest>(_schedulingData.GetScheduledRequestsByNode(nodeId)); 2715List<int> configurations = new List<int>(_schedulingData.Configurations);
BackEnd\Components\Scheduler\SchedulingPlan.cs (5)
113List<KeyValuePair<int, double>> configurationsInOrder = new(accumulatedTimeByConfiguration); 236List<KeyValuePair<int, PlanConfigData>> projectsInOrderOfTotalPlanTime = new(_configIdToData); 259List<KeyValuePair<int, PlanConfigData>> projectsInOrderOfImmediateChildCount = new(_configIdToData); 275List<int> projectsInOrderOfReference = new List<int>(_configIdToData.Keys); 334List<PlanConfigData> projectsByExpense = new List<PlanConfigData>(_configIdToData.Values);
BackEnd\Shared\BuildRequestConfiguration.cs (1)
178RequestedTargets = new List<string>(data.TargetNames);
Definition\Project.cs (1)
3243var itemsList = new List<ProjectItem>(items);
Definition\ProjectCollection.cs (7)
617: new List<ILogger>(_loggingService.Loggers); 634return new List<Toolset>(_toolsets.Values); 1053var toolsets = new List<Toolset>(Toolsets); 1112loaded = fullPath == null ? new List<Project>(_loadedProjects) : new List<Project>(_loadedProjects.GetMatchingProjectsIfAny(fullPath)); 1453var projects = new List<Project>(_loadedProjects); 1480var projects = new List<Project>(_loadedProjects);
Definition\Toolset.cs (1)
506List<string> orderedSubToolsetList = new List<string>(additionalSubToolsetNames);
Evaluation\Evaluator.cs (2)
957List<string> temp = new List<string>(expanded.Split(s_splitter, StringSplitOptions.RemoveEmptyEntries)); 1833projectList = new List<ProjectRootElement>(projects);
Instance\ProjectInstance.cs (7)
675this.EvaluatedItemElements = new List<ProjectItemElement>(data.EvaluatedItemElements); 740this.DefaultTargets = new List<string>(that.DefaultTargets); 741this.InitialTargets = new List<string>(that.InitialTargets); 2699parameters.Loggers = (loggers is ICollection<ILogger> loggersCollection) ? loggersCollection : new List<ILogger>(loggers); 2714new List<ForwardingLoggerRecord>(remoteLoggers); 3222DefaultTargets = defaultTargets == null ? new List<string>(0) : new List<string>(defaultTargets); 3223InitialTargets = initialTargets == null ? new List<string>(0) : new List<string>(initialTargets);
Instance\ProjectItemInstance.cs (3)
317get { return new List<string>(MetadataNames); } 717inheritedItemDefinitions = (itemDefinitions == null) ? null : new List<ProjectItemDefinitionInstance>(itemDefinitions); 1436destinationAsTaskItem._itemDefinitions = (_itemDefinitions == null) ? null : new List<ProjectItemDefinitionInstance>(_itemDefinitions);
Instance\ProjectTargetInstance.cs (1)
514_children = new List<ProjectTargetInstanceChild>(_children);
Instance\ProjectTaskInstance.cs (1)
116_outputs = new List<ProjectTaskInstanceChild>(outputs);
ReadOnlyCollection.cs (1)
88backingCollection = new List<T>(_backing);
TaskParameter.cs (1)
793List<string> metadataNames = (_customEscapedMetadata == null) ? new List<string>() : new List<string>(_customEscapedMetadata.Keys);
TypeLoader.cs (1)
59List<string> runtimeAssembliesList = new(runtimeAssemblies);
Microsoft.Build.CommandLine.UnitTests (9)
CommandLineSwitches_Tests.cs (8)
1268MSBuildApp.GatherCommandLineSwitches(new List<string>(new[] { "" }), commandLineSwitches); 1283MSBuildApp.GatherCommandLineSwitches(new List<string>(new[] 1308MSBuildApp.GatherCommandLineSwitches(new List<string>(new[] 1331MSBuildApp.GatherCommandLineSwitches(new List<string>(new[] 1353MSBuildApp.GatherCommandLineSwitches(new List<string>(new[] { "/warnaserror" }), commandLineSwitches); 1372MSBuildApp.GatherCommandLineSwitches(new List<string>(new[] { "/warnasmessage" }), commandLineSwitches, command); 1410MSBuildApp.GatherCommandLineSwitches(new List<string>(new[] 1435MSBuildApp.GatherCommandLineSwitches(new List<string>(new[] { "/profileevaluation" }), commandLineSwitches);
TestProgram.cs (1)
12var newArgs = new List<string>(args);
Microsoft.Build.Engine.OM.UnitTests (12)
Construction\ConstructionEditing_Tests.cs (6)
2383List<ProjectElement> allChildren = new List<ProjectElement>(group2.AllChildren); 2406List<ProjectElement> allChildren = new List<ProjectElement>(group2.AllChildren); 2429List<ProjectElement> allChildren = new List<ProjectElement>(group2.AllChildren); 2452List<ProjectElement> allChildren = new List<ProjectElement>(group2.AllChildren); 2475List<ProjectElement> allChildren = new List<ProjectElement>(group2.AllChildren); 2499List<ProjectElement> allChildren = new List<ProjectElement>(group2.AllChildren);
Construction\ElementLocationPublic_Tests.cs (1)
131var values = new List<KeyValuePair<string, ElementLocation>>((ICollection<KeyValuePair<string, ElementLocation>>)property.GetValue(element, null));
Definition\Project_Tests.cs (3)
619List<ProjectElement> logicalElements = new List<ProjectElement>(project.GetLogicalProject()); 2573List<ProjectElement> logicalProject = new List<ProjectElement>(project.GetLogicalProject()); 2619List<ProjectElement> logicalProject = new List<ProjectElement>(project.GetLogicalProject());
ObjectModelRemoting\RemoteProjectsProviderMock\ExporterMock.cs (1)
420var updatedGroup = new List<ProjectCollectionLinker>(group);
TestProgram.cs (1)
12var newArgs = new List<string>(args);
Microsoft.Build.Engine.UnitTests (41)
BackEnd\BuildManager_Tests.cs (3)
347int numberProcsOriginally = (new List<Process>(Process.GetProcessesByName("MSBuild"))).Count; 378int numberProcsAfterBuild = (new List<Process>(Process.GetProcessesByName("MSBuild"))).Count; 389int numberProcsAfterShutdown = (new List<Process>(Process.GetProcessesByName("MSBuild"))).Count;
BackEnd\EventSourceTestHelper.cs (1)
80resultList = new List<EventWrittenEventArgs>(emittedEvents);
BackEnd\ResultsCache_Tests.cs (6)
186ResultsCacheResponse response = cache.SatisfyRequest(request, new List<string>(), new List<string>(new string[] { "testTarget2" }), skippedResultsDoNotCauseCacheMiss: false); 241new List<string>(new string[] { targetName }), 247new List<string>(new string[] { targetName }), 253new List<string>(new string[] { targetName }), 322new List<string>(new string[] { targetName }), 328new List<string>(new string[] { targetName }),
BackEnd\Scheduler_Tests.cs (27)
111List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker)); 129List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker)); 153List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker)); 176List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker)); 183response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker)); 207List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker)); 227List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker)); 250List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker)); 278List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker)); 302List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker)); 329List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker)); 355List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker)); 398List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, new BuildRequestBlocker(-1, Array.Empty<string>(), new BuildRequest[] { _defaultParentRequest, request1, request2, request3 }))); 404List<NodeInfo> nodeInfos = new List<NodeInfo>(new NodeInfo[] { new NodeInfo(1, NodeProviderType.InProc) }); 405List<ScheduleResponse> moreResponses = new List<ScheduleResponse>(_scheduler.ReportNodesCreated(nodeInfos)); 433List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker)); 463List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker)); 493List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker)); 526List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker)); 550List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker)); 592List<ScheduleResponse> responses = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, new BuildRequestBlocker(-1, Array.Empty<string>(), new BuildRequest[] { _defaultParentRequest, request1, request2, request3 }))); 628List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker)); 647List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker)); 667List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker)); 683List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, blocker)); 686response = new List<ScheduleResponse>(_scheduler.ReportResult(1, result)); 883List<ScheduleResponse> moreResponses = new List<ScheduleResponse>(_scheduler.ReportNodesCreated(nodeInfos));
Collections\CopyOnReadEnumerable_Tests.cs (2)
21List<int> values = new List<int>(new int[] { 1, 2, 3 }); 39List<string> values = new List<string>(new string[] { "a", "b", "c" });
Definition\ToolsVersion_Tests.cs (1)
971List<string> matches = new List<string>(_defaultTasksFileMap.Keys);
TestProgram.cs (1)
12var newArgs = new List<string>(args);
Microsoft.Build.Framework (1)
FileClassifier.cs (1)
215_knownImmutableDirectoriesSnapshot = new List<string>(_knownImmutableDirectories.Values);
Microsoft.Build.Framework.UnitTests (1)
TestProgram.cs (1)
12var newArgs = new List<string>(args);
Microsoft.Build.Tasks.Core (9)
AssemblyDependency\Reference.cs (1)
712return new List<UnificationVersion>(_preUnificationVersions.Values);
AssemblyDependency\ReferenceTable.cs (1)
2026referenceAssemblyDirectories = new List<string>(_latestTargetFrameworkDirectories);
Copy.cs (2)
749var sourceFiles = SourceFiles != null ? new List<ITaskItem>(SourceFiles) : new List<ITaskItem>(); 750var destinationFiles = DestinationFiles != null ? new List<ITaskItem>(DestinationFiles) : new List<ITaskItem>();
ManifestUtil\DeployManifest.cs (1)
637set => _compatibleFrameworks = new List<CompatibleFramework>(value);
MSBuild.cs (1)
529undefinePropertiesPerProject[i] = new List<string>(undefineProperties);
ReadOnlyCollection.cs (1)
88backingCollection = new List<T>(_backing);
ResolveProjectBase.cs (1)
165List<ITaskItem> updatedProjectReferenceList = new List<ITaskItem>(_projectReferences);
WriteCodeFragment.cs (1)
196var orderedParameters = new List<AttributeParameter?>(new AttributeParameter?[customMetadata.Count + 1] /* max possible slots needed */);
Microsoft.Build.Tasks.UnitTests (2)
AssemblyDependency\ResolveAssemblyReferenceTestFixture.cs (1)
3141List<string> searchPaths = new List<string>(DefaultPaths);
TestProgram.cs (1)
12var newArgs = new List<string>(args);
Microsoft.Build.Utilities.Core (1)
MuxLogger.cs (1)
206recordsToShutdown = new List<SubmissionRecord>(_submissionRecords.Values);
Microsoft.Build.Utilities.UnitTests (4)
PlatformManifest_Tests.cs (3)
156var platforms = new List<PlatformManifest.DependentPlatform>(manifest.Manifest.DependentPlatforms); 181var platforms = new List<PlatformManifest.DependentPlatform>(manifest.Manifest.DependentPlatforms); 242var contracts = new List<ApiContract>(manifest.Manifest.ApiContracts);
TestProgram.cs (1)
12var newArgs = new List<string>(args);
Microsoft.Cci.Extensions (2)
HostEnvironment.cs (1)
498List<string> contractSet = new List<string>(GetFilePathsAndAddResolvedDirectoriesToLibPaths(SplitPaths(unsplitContractSet)));
Writers\CSharp\CSDeclarationWriter.Properties.cs (1)
180var parameters = new List<IParameterDefinition>(accessor.Parameters);
Microsoft.CodeAnalysis (1)
PEWriter\NativeResourceWriter.cs (1)
281byte[] data = new List<byte>(r.Data).ToArray();
Microsoft.CodeAnalysis.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (1)
592var sorted = new List<TextSpan>(spans);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (1)
384var interfacesToImplement = new List<INamedTypeSymbol>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\FileBannerFacts\AbstractFileBannerFacts.cs (1)
86var leadingTriviaToKeep = new List<SyntaxTrivia>(node.GetLeadingTrivia());
Microsoft.CodeAnalysis.CSharp (2)
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (1)
894oldDispatches.Add(dispatchLabel, new List<StateMachineState>(from kv in _dispatches.Values from n in kv orderby n select n));
Symbols\SubstitutedNamedTypeSymbol.cs (1)
193return new List<string>(GetTypeMembersUnordered().Select(s => s.Name).Distinct());
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxListExtensions.cs (1)
17var result = new List<T>(syntaxList);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (1)
49var currentUsings = new List<UsingDirectiveSyntax>(usings);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (1)
754var vsixAnalyzerReferences = new List<DiagnosticAnalyzer>(vsixAnalyzers.CastArray<DiagnosticAnalyzer>());
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\CodeGenCapturing.cs (2)
64.Select(list => list == null ? null : new List<string>(list))); 291: (IList<string>)new List<string>(x)).ToList(),
Microsoft.CodeAnalysis.CSharp.Features (5)
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.CallSiteContainerRewriter.cs (2)
296var newList = new List<TSyntax>(list); 324var newMembers = new List<MemberDeclarationSyntax>(members);
GenerateType\CSharpGenerateTypeService.cs (1)
551var containerList = new List<string>(containers);
Organizing\Organizers\MemberDeclarationsOrganizer.cs (1)
114var initialList = new List<MemberDeclarationSyntax>(members);
Organizing\Organizers\ModifiersOrganizer.cs (1)
21var initialList = new List<SyntaxToken>(modifiers);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Compilation\ReferenceManagerTests.cs (1)
843List<string> newParts = new List<string>(parts);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
Syntax\SyntaxAnnotationTests.cs (2)
255var annotations = new List<SyntaxAnnotation>(Enumerable.Range(0, 3).Select(_ => new SyntaxAnnotation())); 385var annotations = new List<SyntaxAnnotation>(Enumerable.Range(0, 10).Select(_ => new SyntaxAnnotation()));
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxListExtensions.cs (1)
17var result = new List<T>(syntaxList);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (1)
49var currentUsings = new List<UsingDirectiveSyntax>(usings);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Classification\AbstractClassifierTests.cs (1)
297var allClassifications = new List<ClassifiedSpan>(semanticClassifications);
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver.UnitTests (1)
Process.cs (1)
24_modules = new List<Module>(modules);
Microsoft.CodeAnalysis.Features (1)
ExtractClass\ExtractClassWithDialogCodeAction.cs (1)
229var remainingResults = new List<ExtractClassMemberAnalysisResult>(memberAnalysisResults);
Microsoft.CodeAnalysis.Rebuild.UnitTests (4)
BasicDeterministicKeyBuilderTests.cs (1)
194var args = new List<string>(new[] { filePath, "/nostdlib", "/vbruntime-", "/langversion:15" });
CSharpDeterministicKeyBuilderTests.cs (1)
370var args = new List<string>(new[] { filePath, "/nostdlib", "/langversion:9", "/checksumalgorithm:sha256" });
RebuildCommandLineTests.cs (2)
339var args = new List<string>(commandLine.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)); 504var args = new List<string>(commandLine.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries));
Microsoft.CodeAnalysis.Test.Utilities (3)
Assert\DiffUtil.cs (2)
82IList<T> expectedList = expected as IList<T> ?? new List<T>(expected); 83IList<T> actualList = actual as IList<T> ?? new List<T>(actual);
CommonTestBase.cs (1)
736new List<object[]>(ExternalPdbFormats)
Microsoft.CodeAnalysis.UnitTests (4)
Collections\ImmutableListTestBase.cs (2)
450var basis = new List<int>(Enumerable.Range(1, 50).Select(n => n * 2)); 492var basis = new List<int>(inputData);
Collections\ImmutableSegmentedListTest.cs (1)
448var expectedList = new List<string>(new[] { "Microsoft", "Windows", "Bing", "Visual Studio", "Comics", "Computers", "Laptops" });
MetadataReferences\AssemblyMetadataTests.cs (1)
37Assert.Throws<ArgumentException>(() => AssemblyMetadata.Create(new List<ModuleMetadata>(new ModuleMetadata[] { m1.Copy(), m2.Copy(), m3.Copy() })));
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (2)
Syntax\SyntaxAnnotationTests.vb (2)
238Dim annotations = New List(Of SyntaxAnnotation)(Enumerable.Range(0, 3).Select(Function(x) 357Dim annotations = New List(Of SyntaxAnnotation)(Enumerable.Range(0, 10).Select(Function(s) New SyntaxAnnotation()))
Microsoft.CodeAnalysis.Workspaces (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (1)
592var sorted = new List<TextSpan>(spans);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (1)
384var interfacesToImplement = new List<INamedTypeSymbol>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\FileBannerFacts\AbstractFileBannerFacts.cs (1)
86var leadingTriviaToKeep = new List<SyntaxTrivia>(node.GetLeadingTrivia());
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Build\ProjectBuildManager.cs (1)
251var targets = new List<string>(requiredTargets);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
VisualStudioMSBuildWorkspaceTests.cs (1)
1864var defines = new List<KeyValuePair<string, object>>(options.PreprocessorSymbols);
Microsoft.CSharp (2)
Microsoft\CSharp\RuntimeBinder\DynamicDebuggerProxy.cs (1)
442List<string> names = new List<string>(mo.GetDynamicMemberNames());
Microsoft\CSharp\RuntimeBinder\Semantics\Conversion.cs (1)
1506List<T> newList = new List<T>(array);
Microsoft.DotNet.Build.Tasks.Packaging (1)
SplitDependenciesBySupport.cs (1)
32List<ITaskItem> splitDependencies = new List<ITaskItem>(dependencies.Where(d => d.TargetFramework != null && d.TargetFramework.Framework != FrameworkConstants.FrameworkIdentifiers.NetStandard).Select(d => d.OriginalItem));
Microsoft.DotNet.Deployment.Tasks.Links (1)
Microsoft.DotNet.Helix.Client (1)
generated-code\HelixApi.cs (1)
409:base(parameters)
Microsoft.DotNet.Helix.Sdk.Tests (2)
FindDotNetCliPackageTests.cs (2)
71List<RequestResponseHelper> requestResponseHelpers = new List<RequestResponseHelper>(GetDefaultRequestResponseHelpers()); 121List<RequestResponseHelper> requestResponseHelpers = new List<RequestResponseHelper>(GetDefaultRequestResponseHelpers());
Microsoft.DotNet.NuGetRepack.Tests (2)
TestHelpers\DiffUtil.cs (2)
79IList<T> expectedList = expected as IList<T> ?? new List<T>(expected); 80IList<T> actualList = actual as IList<T> ?? new List<T>(actual);
Microsoft.DotNet.XUnitAssert.Tests (21)
AsyncCollectionAssertsTests.cs (9)
739 var actual = actualArray is null ? null : new List<int>(actualArray).ToAsyncEnumerable(); 957 var actual = new List<int>(new int[] { 1, 2, 3, 4, 5 }).ToAsyncEnumerable(); 986 var actual = new List<int>(new int[] { 0, 0, 0, 0, 0 }).ToAsyncEnumerable(); 1133 var actual = new List<int>(expected).ToAsyncEnumerable(); 1160 var actual = new List<int>(new[] { 1, 2, 3, 4, 0, 6, 7, 8, 9, 10 }).ToAsyncEnumerable(); 1173 var actual = new List<int>(new int[] { 1, 2, 3, 4, 5 }).ToAsyncEnumerable(); 1183 var actual = new List<int>(new int[] { 0, 0, 0, 0, 0 }).ToAsyncEnumerable(); 1314 var actual = new List<int>(new int[] { 1, 2, 3, 4, 5 }).ToAsyncEnumerable(); 1324 var actual = new List<int>(new int[] { 0, 0, 0, 0, 0 }).ToAsyncEnumerable();
CollectionAssertsTests.cs (12)
955 var actual = new List<int>(expected); 1010 var actual = actualArray is null ? null : new List<int>(actualArray); 1036 var actual = new List<int>(new int[] { 1, 2, 3, 4, 5 }); 1055 var actual = new List<int>(new int[] { 0, 0, 0, 0, 0 }); 1180 var actual = new List<int>(new int[] { 1, 2, 3, 4, 5 }); 1199 var actual = new List<int>(new int[] { 0, 0, 0, 0, 0 }); 1739 var actual = new List<int>(expected); 1756 var actual = new List<int>(new[] { 1, 2, 3, 4, 0, 6, 7, 8, 9, 10 }); 1768 var actual = new List<int>(new int[] { 1, 2, 3, 4, 5 }); 1777 var actual = new List<int>(new int[] { 0, 0, 0, 0, 0 }); 1878 var actual = new List<int>(new int[] { 1, 2, 3, 4, 5 }); 1887 var actual = new List<int>(new int[] { 0, 0, 0, 0, 0 });
Microsoft.Extensions.AI.Abstractions (3)
ChatCompletion\ChatOptions.cs (2)
89options.StopSequences = new List<string>(StopSequences); 94options.Tools = new List<AITool>(Tools);
Embeddings\GeneratedEmbeddings.cs (1)
39_embeddings = new List<TEmbedding>(Throw.IfNull(embeddings));
Microsoft.Extensions.AsyncState.Tests (2)
AsyncStateTests.cs (2)
226var l = new List<object?>(new object?[5]); 234var l = new List<object?>(new object?[5]);
Microsoft.Extensions.Configuration (1)
ReferenceCountedProvidersManager.cs (1)
71_refCountedProviders.Providers = new List<IConfigurationProvider>(_refCountedProviders.Providers)
Microsoft.Extensions.Configuration.KeyPerFile.Tests (1)
KeyPerFileTests.cs (1)
492_list = new List<IFileInfo>(files);
Microsoft.Extensions.DependencyInjection (5)
ServiceLookup\CallSiteChain.cs (1)
51var ordered = new List<KeyValuePair<ServiceIdentifier, ChainItemInfo>>(_callSiteChain);
ServiceLookup\ServiceProviderEngineScope.cs (2)
255public List<ServiceDescriptor> ServiceDescriptors => new List<ServiceDescriptor>(_serviceProvider.RootProvider.CallSiteFactory.Descriptors); 256public List<object> Disposables => new List<object>(_serviceProvider.Disposables);
ServiceProvider.cs (2)
282public List<ServiceDescriptor> ServiceDescriptors => new List<ServiceDescriptor>(_serviceProvider.Root.RootProvider.CallSiteFactory.Descriptors); 283public List<object> Disposables => new List<object>(_serviceProvider.Root.Disposables);
Microsoft.Extensions.FileSystemGlobbing (1)
Internal\Patterns\PatternBuilder.cs (1)
175segmentsPatternStartsWith = new List<IPathSegment>(allSegments);
Microsoft.Extensions.Http.Resilience.Tests (7)
Routing\OrderedRoutingStrategyTest.cs (1)
60var groups = new List<UriEndpointGroup>(options.Groups)
Routing\WeightedRoutingStrategyTest.cs (6)
81var groups = new List<WeightedUriEndpointGroup>(options.Groups) 112var groups = new List<WeightedUriEndpointGroup>(options.Groups) 124var groups = new List<WeightedUriEndpointGroup>(options.Groups) 136var groups = new List<WeightedUriEndpointGroup>(options.Groups) 148var groups = new List<WeightedUriEndpointGroup>(options.Groups) 157var groups = new List<WeightedUriEndpointGroup>(options.Groups)
Microsoft.Extensions.Identity.Stores (1)
UserStoreBase.cs (1)
978var updatedCodes = new List<string>(splitCodes.Where(s => s != code));
Microsoft.Extensions.Options (3)
OptionsFactory.cs (3)
43_setups = setups as IConfigureOptions<TOptions>[] ?? new List<IConfigureOptions<TOptions>>(setups).ToArray(); 44_postConfigures = postConfigures as IPostConfigureOptions<TOptions>[] ?? new List<IPostConfigureOptions<TOptions>>(postConfigures).ToArray(); 45_validations = validations as IValidateOptions<TOptions>[] ?? new List<IValidateOptions<TOptions>>(validations).ToArray();
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\AddDisableRuntimeMarshallingAttributeFixer.cs (1)
32List<Diagnostic> fixedDiagnostics = new(context.Diagnostics.Where(IsRequiresDiableRuntimeMarshallingDiagnostic));
Microsoft.Maui (2)
Animations\AnimationManager.cs (2)
87 var animations = new List<Animation>(_animations); 132 var animations = new List<Animation>(_animations);
Microsoft.Maui.Controls (22)
Cells\Cell.cs (2)
266 _currentContextActions = new List<MenuItem>(_contextActions); 323 var children = new List<Maui.IVisualTreeElement>(LogicalChildrenInternal);
DefinitionCollection.cs (1)
15 internal DefinitionCollection(params T[] items) => _internalList = new List<T>(items);
Element\Element_StyleSheets.cs (1)
78 mergedSheets = new List<StyleSheet>(childSheets);
EnumerableExtensions.cs (1)
56 foreach (IGestureRecognizer item in new List<IGestureRecognizer>(gestures))
FormattedString.cs (1)
86 var removed = new List<Span>(this);
GestureElement.cs (1)
72 List<IGestureRecognizer> removed = new List<IGestureRecognizer>(this);
Handlers\Items\iOS\ListSource.cs (1)
25 _itemsSource = new List<object>(enumerable);
Items\SelectableItemsView.cs (1)
88 var oldSelection = new List<object>(SelectedItems);
Items\SelectionChangedEventArgs.cs (2)
25 PreviousSelection = new List<object>(previousSelection ?? throw new ArgumentNullException(nameof(previousSelection))); 26 CurrentSelection = new List<object>(currentSelection ?? throw new ArgumentNullException(nameof(currentSelection)));
NavigationPage\NavigationPage.cs (1)
660 var immutableNavigationStack = new List<IView>(NavigationStack);
Platform\iOS\ControlsModalWrapper.cs (1)
72 var modalStack = new List<Page>(shell.CurrentItem.CurrentItem.Navigation.ModalStack);
ResourcesExtensions.cs (2)
27 var mergedClassStyles = new List<Style>(resources[res.Key] as List<Style>); 42 var mergedClassStyles = new List<Style>(resources[res.Key] as List<Style>);
Shell\RouteRequestBuilder.cs (1)
183 List<string> currentSet = new List<string>(_matchedSegments);
Shell\ShellSection.cs (1)
330 var navStackCopy = new List<Page>(_navStack);
Shell\ShellUriHandler.cs (3)
149 var segments = new List<string>(RetrievePaths(pathAndQuery[0])); 246 var segments = new List<string>(RetrievePaths(localPath)); 438 List<string> fullRouteWithNewSegments = new List<string>(currentSegments);
SwipeView\SwipeView.cs (1)
418 public HandlerSwipeItems(SwipeItems swipeItems) : base(swipeItems)
VisualElement\VisualElement.cs (1)
1525 var mergedClassStyles = new List<Style>(Resources[value.Key] as List<Style>);
Microsoft.Maui.Controls.Compatibility (2)
iOS\CollectionView\ListSource.cs (1)
14 public ListSource(IEnumerable<object> enumerable) : base(enumerable)
iOS\Platform.cs (1)
720 _previousModals = new List<Page>(_modals);
Microsoft.Maui.Essentials (1)
Connectivity\Connectivity.shared.cs (1)
106 currentProfiles = new List<ConnectionProfile>(ConnectionProfiles);
Microsoft.Maui.Graphics (6)
PathF.cs (6)
50 _points = new List<PointF>(path._points); 56 _subPathsClosed = new List<bool>(path._subPathsClosed); 989 var points = new List<PointF>(_points); 992 var arcSizes = new List<float>(_arcAngles); 995 var arcClockwise = new List<bool>(_arcClockwise); 998 var operations = new List<PathOperation>(_operations);
Microsoft.ML.Data (2)
DataLoadSave\Database\LoadColumnNameAttribute.cs (1)
34Sources = new List<string>(fieldNames);
Dirty\PredictionUtils.cs (1)
83res = new List<string>(args.Take(i));
Microsoft.ML.EntryPoints (1)
CrossValidationMacro.cs (1)
372var warnings = input.Warnings != null ? new List<IDataView>(input.Warnings) : new List<IDataView>();
Microsoft.ML.GenAI.Core (1)
Trainer\CausalLMDataset.cs (1)
23_data = new List<CausalLMModelInput>(data);
Microsoft.ML.OnnxTransformer (1)
OnnxTransform.cs (1)
879_tensorShape = new OnnxShape(tensorShape);
Microsoft.ML.ResultProcessor (5)
ResultProcessor.cs (5)
908var foldLines = new List<string>(lines.Where((s, i1) => i1 >= startLineIdx && i1 < endLineIdx)); 928List<int> allFoldIndices = new List<int>(foldResults.Keys); 949AllValues = new List<float>(from kvp in metricValues.Value 1158+ string.Join(cmd.PerFoldResultSeparator, new List<string>(new List<float>(kvp.Value.AllValues).Select(d => "" + d))));
Microsoft.ML.TensorFlow.Tests (5)
TensorFlowEstimatorTests.cs (2)
65new List<TestData>(new TestData[] { 106new List<TestData>(new TestData[] {
TensorflowTests.cs (3)
189new List<TestData>(new TestData[] { 261return new List<ShapeData>(new ShapeData[] { 380var data = new List<TypesData>(
Microsoft.ML.Tests (1)
OnnxSequenceTypeWithAttributesTest.cs (1)
66var keys = new List<string>(onnxOut.Keys);
Microsoft.ML.TimeSeries (2)
PolynomialUtils.cs (1)
168Coefficients = new List<decimal>(coefficients);
SrCnnAnomalyDetectionBase.cs (1)
274List<Single> cumSumShift = new List<Single>(cumSumList);
Microsoft.ML.Tokenizers (2)
Model\BertTokenizer.cs (2)
247list = new List<int>(ids); 269list = new List<int>(ids);
Microsoft.ML.Tokenizers.Tests (12)
CodeGenTests.cs (12)
552var idList = new List<int>(expectedIds); 554var tokensList = new List<string>(expectedTokens); 575idList = new List<int>(expectedIdsWithSpace); 577tokensList = new List<string>(expectedTokensWithSpace); 685idList = new List<int>(expectedIds); 687tokensList = new List<string>(expectedTokens); 708idList = new List<int>(expectedIdsWithSpace); 710tokensList = new List<string>(expectedTokensWithSpace); 818idList = new List<int>(expectedIds); 821tokensList = new List<string>(expectedTokens); 847idList = new List<int>(expectedIdsWithSpace); 850tokensList = new List<string>(expectedTokensWithSpace);
Microsoft.ML.TorchSharp (1)
NasBert\NasBertTrainer.cs (1)
587List<int> newList = new List<int>(tokenizer.EncodeToConverted(sentence1.ToString()));
Microsoft.ML.TorchSharp.Tests (8)
NerTests.cs (2)
47new List<TestSingleSentenceData>(new TestSingleSentenceData[] { 126new List<TestSingleSentenceData>(new TestSingleSentenceData[] {
QATests.cs (1)
33new List<TestSingleSentenceData>(new TestSingleSentenceData[] {
TextClassificationTests.cs (5)
55new List<TestSingleSentenceData>(new TestSingleSentenceData[] { 118new List<TestSingleSentenceDataNoLabel>(new TestSingleSentenceDataNoLabel[] { 192new List<TestSingleSentenceData>(new TestSingleSentenceData[] { 265new List<TestDoubleSentenceData>(new TestDoubleSentenceData[] { 348new List<TestSentenceSimilarityData>(new TestSentenceSimilarityData[] {
Microsoft.Net.Http.Headers (1)
ObjectCollection.cs (1)
24var list = other == null ? new List<T>() : new List<T>(other);
MSBuild (4)
TaskParameter.cs (1)
793List<string> metadataNames = (_customEscapedMetadata == null) ? new List<string>() : new List<string>(_customEscapedMetadata.Keys);
TypeLoader.cs (1)
59List<string> runtimeAssembliesList = new(runtimeAssemblies);
XMake.cs (2)
1734List<BuildManager.DeferredBuildMessage> messages = new(s_globalMessagesToLogInBuildLoggers) 1986var commandLineArgs = new List<string>(commandLine);
MSBuildTaskHost (1)
TaskParameter.cs (1)
793List<string> metadataNames = (_customEscapedMetadata == null) ? new List<string>() : new List<string>(_customEscapedMetadata.Keys);
PresentationCore (13)
System\Windows\Input\Command\InputBindingCollection.cs (1)
360List<InputBinding> oldInputBindings = new List<InputBinding>(_innerBindingList);
System\Windows\Input\ManipulationDevice.cs (2)
450List<IManipulator> manipulators = new List<IManipulator>(_manipulators); 466List<IManipulator> manipulators = new List<IManipulator>(_manipulators);
System\Windows\Input\Stylus\Common\StylusButtonCollection.cs (1)
19: base(new List<StylusButton>(buttons))
System\Windows\Input\Stylus\Common\StylusPointCollection.cs (1)
86List<StylusPoint> points = new List<StylusPoint>(stylusPoints);
System\Windows\Input\Stylus\Common\StylusPointDescription.cs (1)
49new List<StylusPointPropertyInfo>(stylusPointPropertyInfos);
System\Windows\Input\Stylus\Wisp\WispTabletDeviceCollection.cs (3)
386TabletDevices = new List<TabletDevice>(_tablets); 552TabletDevices = new List<TabletDevice>(_tablets); 573TabletDevices = new List<TabletDevice>(_tablets);
System\Windows\Media\Effects\ShaderEffect.cs (2)
1057_floatRegisters = new List<MilColorF?>(effect._floatRegisters); 1061_samplerData = new List<SamplerData?>(effect._samplerData);
System\Windows\Nrbf\SerializationRecordExtensions.cs (2)
366return new List<T>(new ArraySegment<T>(array, 0, count)); 370List<T> list = new(readOnlyList);
PresentationFramework (21)
MS\Internal\Annotations\AnnotationResourceCollection.cs (1)
74List<AnnotationResource> list = new List<AnnotationResource>(this);
MS\Internal\Data\CommitManager.cs (1)
183return new List<T>(Keys);
MS\Internal\Data\LiveShapingList.cs (1)
689_unusedKeys = new List<string>(this.Keys);
MS\Internal\Ink\ClipboardProcessor.cs (1)
136List<UIElement> elements = new List<UIElement>(inkCanvasSelection.SelectedElements);
MS\Internal\Ink\ElementsClipboardData.cs (1)
35ElementList = new List<UIElement>(elements);
MS\Internal\Ink\InkCanvasSelection.cs (1)
229_selectedElements = new List<UIElement>(elements);
System\Windows\Annotations\Storage\XmlStreamStore.cs (1)
649List<Annotation> annotations = new List<Annotation>((IEnumerable<Annotation>)mapAnnotations.Values);
System\Windows\Controls\Primitives\Selector.cs (1)
2677_list = new List<ItemInfo>(collection._list);
System\Windows\Controls\VirtualizedCellInfoCollection.cs (2)
42_regions = (regions != null) ? new List<CellRegion>(regions) : new List<CellRegion>(); 236_regions = new List<CellRegion>(regions);
System\Windows\Data\BindingExpressionBase.cs (3)
294list = new List<ValidationError>(NotifyDataErrors); 2334toRemove = new List<ValidationError>(previousErrors); 2339toRemove = new List<ValidationError>(previousErrors);
System\Windows\Ink\Events.cs (3)
131new List<UIElement>(selectedElements); 169new List<UIElement>(selectedElements); 310new List<GestureRecognitionResult>(gestureRecognitionResults);
System\Windows\Markup\XamlTypeMapperSchemaContext.cs (1)
79List<string> resultList = new List<string>(_sharedSchemaContext.GetAllXamlNamespaces());
System\Windows\Shell\JumpList.cs (4)
70RejectedItems = new List<JumpItem>(rejectedItems).AsReadOnly(); 71RejectionReasons = new List<JumpItemRejectionReason>(reasons).AsReadOnly(); 97RemovedItems = new List<JumpItem>(removedItems).AsReadOnly(); 279_jumpItems = new List<JumpItem>(items);
PresentationUI (2)
MS\Internal\Documents\Application\ChainOfResponsibility.cs (1)
43_members = new List<T>(members);
MS\Internal\Documents\RMPublishingDialog.cs (1)
85_rmLicenses = new List<RightsManagementLicense>(grantDictionary.Values);
ReachFramework (1)
Serialization\VisualSerializer.cs (1)
1610filteredCharacters = new List<char>(glyphRun.Characters);
Roslyn.VisualStudio.DiagnosticsWindow (2)
VenusMargin\ProjectionBufferMargin.xaml.cs (2)
32TextView.Properties[ProjectionSpanTaggerProvider.PropertyName] = new List<Span>(e.AddedItems.Cast<SnapshotSpan>().Select(ss => ss.Span).Where(ss => !ss.IsEmpty)); 52view.Properties[ProjectionSpanTaggerProvider.PropertyName] = new List<Span>(spansFromBuffer);
System.Collections (1)
System\Collections\Generic\PriorityQueueDebugView.cs (1)
31var list = new List<(TElement Element, TPriority Priority)>(_queue.UnorderedItems);
System.Collections.Immutable (2)
System\Collections\Immutable\ImmutableSortedSet_1.cs (2)
1130list = new List<T>(addedItems); 1141list = new List<T>(this);
System.ComponentModel.Composition (8)
Microsoft\Internal\Collections\CollectionServices.cs (1)
93List<T> result = new List<T>(source);
System\ComponentModel\Composition\Hosting\AggregateCatalog.cs (1)
145aggregateResult = new List<Tuple<ComposablePartDefinition, ExportDefinition>>(result);
System\ComponentModel\Composition\Hosting\CatalogExportProvider.CatalogChangeProxy.cs (1)
24_addedParts = new List<ComposablePartDefinition>(addedParts);
System\ComponentModel\Composition\Hosting\ComposablePartCatalogCollection.cs (3)
36_catalogs = new List<ComposablePartCatalog>(catalogs); 59_catalogs = new List<ComposablePartCatalog>(_catalogs); 196_catalogs = new List<ComposablePartCatalog>(_catalogs);
System\ComponentModel\Composition\Hosting\CompositionBatch.cs (2)
116_partsToAdd = new List<ComposablePart>(_partsToAdd); 140_partsToRemove = new List<ComposablePart>(_partsToRemove);
System.ComponentModel.TypeConverter (5)
System\ComponentModel\EventDescriptorCollection.cs (1)
314List<EventDescriptor?> eventList = new List<EventDescriptor?>(_events);
System\ComponentModel\ExtendedPropertyDescriptor.cs (1)
28List<Attribute> attrList = new List<Attribute>(AttributeArray!)
System\ComponentModel\MemberDescriptor.cs (1)
342list = new List<Attribute>(_attributes!);
System\ComponentModel\PropertyDescriptorCollection.cs (1)
332List<PropertyDescriptor?> propList = new List<PropertyDescriptor?>(_properties);
System\ComponentModel\ReflectTypeDescriptionProvider.ReflectedTypeData.cs (1)
89var attributes = new List<Attribute>(ReflectGetAttributes(_type));
System.Data.Common (4)
System\Data\DataTable.cs (1)
4584_shadowIndexes = new List<Index>(_indexes);
System\Data\EnumerableRowCollection.cs (1)
114_listOfPredicates = new List<Func<TRow, bool>>(source._listOfPredicates);
System\Data\LinqDataView.cs (1)
206new List<object?>(key));
System\Data\XMLSchema.cs (1)
2878_namespacesToIgnore = new List<string>(namespacesToIgnore);
System.Diagnostics.DiagnosticSource (5)
System\Diagnostics\ActivitySource.cs (1)
46var tagList = new List<KeyValuePair<string, object?>>(tags);
System\Diagnostics\Metrics\Instrument.cs (1)
75var tagList = new List<KeyValuePair<string, object?>>(tags);
System\Diagnostics\Metrics\InstrumentAdvice.cs (1)
46List<T> bucketBoundariesCopy = new List<T>(value);
System\Diagnostics\Metrics\Meter.cs (1)
84var tagList = new List<KeyValuePair<string, object?>>(tags);
System\Diagnostics\Metrics\MeterListener.cs (1)
295internal static List<MeterListener>? GetAllListeners() => s_allStartedListeners.Count == 0 ? null : new List<MeterListener>(s_allStartedListeners);
System.Diagnostics.Process (2)
System\Diagnostics\ProcessManager.Linux.cs (1)
15public static int[] GetProcessIds() => new List<int>(EnumerateProcessIds()).ToArray();
System\Diagnostics\ProcessStartInfo.cs (1)
68_argumentList = new Collection<string>(new List<string>(arguments));
System.IO.Packaging (2)
System\IO\Packaging\ZipPackage.cs (2)
580List<ZipPackagePartPiece> pieces = new List<ZipPackagePartPiece>(pieceSet); 1078partPieces = new List<ZipPackagePartPiece>(contentTypeStreamPieces.Keys);
System.Linq (3)
System\Linq\Distinct.SpeedOpt.cs (1)
14public override List<TSource> ToList() => new List<TSource>(new HashSet<TSource>(_source, _comparer));
System\Linq\ToCollection.cs (1)
70return new List<TSource>(source);
System\Linq\Union.SpeedOpt.cs (1)
29public override List<TSource> ToList() => new List<TSource>(FillSet());
System.Linq.Expressions (1)
System\Linq\Expressions\Interpreter\InterpretedFrame.cs (1)
145exception.Data[typeof(InterpretedFrameInfo)] ??= new List<InterpretedFrameInfo>(GetStackTraceDebugInfo()).ToArray();
System.Linq.Parallel (1)
System\Linq\ParallelEnumerable.cs (1)
4868return new List<TSource>(ToArray<TSource>(source));
System.Net.Http (2)
src\libraries\Common\src\System\Net\Security\SslClientAuthenticationOptionsExtensions.cs (1)
22ApplicationProtocols = options.ApplicationProtocols != null ? new List<SslApplicationProtocol>(options.ApplicationProtocols) : null,
System\Net\Http\Headers\HttpHeaders.cs (1)
676return new List<object>(sourceValues);
System.Net.HttpListener (5)
System\Net\Managed\HttpEndPointListener.cs (5)
312var connections = new List<HttpConnection>(_unregisteredConnections); 329future = current != null ? new List<ListenerPrefix>(current) : new List<ListenerPrefix>(); 341future = current != null ? new List<ListenerPrefix>(current) : new List<ListenerPrefix>(); 370future = current != null ? new List<ListenerPrefix>(current) : new List<ListenerPrefix>(); 384future = current != null ? new List<ListenerPrefix>(current) : new List<ListenerPrefix>();
System.Net.Quic (1)
System\Net\Quic\Internal\MsQuicConfiguration.Cache.cs (1)
69ApplicationProtocols = new List<SslApplicationProtocol>(alpnProtocols);
System.Net.Requests (1)
System\Net\WebRequest.cs (1)
248List<WebRequestPrefixElement> prefixList = new List<WebRequestPrefixElement>(PrefixList);
System.Net.WebHeaderCollection (1)
System\Net\WebHeaderCollection.cs (1)
240valueList = new List<string>(values);
System.Numerics.Tensors (3)
System\Numerics\Tensors\netcore\TensorExtensions.cs (3)
2767List<nint> origStrides = new List<nint>(tensor.Strides.ToArray()); 2835List<nint> origStrides = new List<nint>(tensor.Strides.ToArray()); 2906List<nint> origStrides = new List<nint>(tensor.Strides.ToArray());
System.ObjectModel (2)
System\Collections\ObjectModel\ObservableCollection.cs (2)
47public ObservableCollection(IEnumerable<T> collection) : base(new List<T>(collection ?? throw new ArgumentNullException(nameof(collection)))) 61public ObservableCollection(List<T> list) : base(new List<T>(list ?? throw new ArgumentNullException(nameof(list))))
System.Private.CoreLib (12)
src\libraries\Common\src\System\Collections\Concurrent\SingleProducerSingleConsumerQueue.cs (1)
435public T[] Items => new List<T>(_queue).ToArray();
src\libraries\System.Private.CoreLib\src\System\AggregateException.cs (1)
103: this(message, new List<Exception>(innerExceptions ?? throw new ArgumentNullException(nameof(innerExceptions))).ToArray(), cloneExceptions: false)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\StackTrace.cs (1)
142List<StackFrame> frameList = new List<StackFrame>(frames);
src\libraries\System.Private.CoreLib\src\System\IO\Directory.cs (3)
174=> new List<string>(InternalEnumeratePaths(path, searchPattern, SearchTarget.Files, enumerationOptions)).ToArray(); 184=> new List<string>(InternalEnumeratePaths(path, searchPattern, SearchTarget.Directories, enumerationOptions)).ToArray(); 194=> new List<string>(InternalEnumeratePaths(path, searchPattern, SearchTarget.Both, enumerationOptions)).ToArray();
src\libraries\System.Private.CoreLib\src\System\IO\DirectoryInfo.cs (3)
118=> new List<FileInfo>((IEnumerable<FileInfo>)InternalEnumerateInfos(FullPath, searchPattern, SearchTarget.Files, enumerationOptions)).ToArray(); 133=> new List<FileSystemInfo>(InternalEnumerateInfos(FullPath, searchPattern, SearchTarget.Both, enumerationOptions)).ToArray(); 146=> new List<DirectoryInfo>((IEnumerable<DirectoryInfo>)InternalEnumerateInfos(FullPath, searchPattern, SearchTarget.Directories, enumerationOptions)).ToArray();
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (1)
4946CollectionsMarshal.AsSpan(new List<Task>(tasks));
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskScheduler.cs (1)
467activeTasksArray = (new List<Task>(activeTasksSource)).ToArray();
src\libraries\System.Private.CoreLib\src\System\Threading\Timer.cs (1)
106public TimerQueueTimer[] Items => new List<TimerQueueTimer>(_queue.GetTimersForDebugger()).ToArray();
System.Private.DataContractSerialization (2)
System\Runtime\Serialization\DataContractSet.cs (2)
30_referencedTypes = referencedTypes != null ? new List<Type>(referencedTypes) : null; 31_referencedCollectionTypes = referencedCollectionTypes != null ? new List<Type>(referencedCollectionTypes) : null;
System.Private.Windows.Core (1)
System\Collections\Generic\CollectionExtensions.cs (1)
24return new List<T>(new ArraySegment<T>(array, 0, count));
System.Private.Xml (15)
System\Xml\Core\XmlWriterSettings.cs (1)
243clonedSettings.CDataSectionElements = new List<XmlQualifiedName>(CDataSectionElements);
System\Xml\Schema\XdrBuilder.cs (2)
783builder._ElementDef._ElementDecl!.Values = new List<string>((string[])obj); 1081builder._AttributeDef._AttDef!.Values = new List<string>((string[])obj);
System\Xml\Schema\XmlValueConverter.cs (1)
3093return new List<string>(XmlConvert.SplitString(value));
System\Xml\XPath\Internal\CacheAxisQuery.cs (1)
22this.outputBuffer = new List<XPathNavigator>(other.outputBuffer);
System\Xml\XPath\Internal\CacheOutputQuery.cs (1)
27this.outputBuffer = new List<XPathNavigator>(other.outputBuffer);
System\Xml\XPath\Internal\ClonableStack.cs (1)
10private ClonableStack(System.Collections.Generic.IEnumerable<T> collection) : base(collection) { }
System\Xml\XPath\Internal\FollSiblingQuery.cs (1)
24_parentStk = new List<XPathNavigator>(other._parentStk);
System\Xml\XPath\Internal\Function.cs (2)
53_argumentList = new List<AstNode>(argumentList); 61_argumentList = new List<AstNode>(argumentList);
System\Xml\XPath\Internal\SortQuery.cs (1)
30_results = new List<SortKey>(other._results);
System\Xml\Xsl\XmlQueryTypeFactory.cs (3)
81return SequenceType.Create(ChoiceType.Create(PrimeChoice(new List<XmlQueryType>(left), right)), left.Cardinality | right.Cardinality); 97List<XmlQueryType> list = new List<XmlQueryType>(types[0]); 127return SequenceType.Create(ChoiceType.Create(PrimeChoice(new List<XmlQueryType>(left), right)), left.Cardinality + right.Cardinality);
System\Xml\Xsl\Xslt\XslAst.cs (1)
128_content = new List<XslNode>(collection);
System.Reflection.Context (5)
System\Reflection\Context\CollectionServices.cs (1)
54List<object> list = new List<object>(enumerable);
System\Reflection\Context\Custom\AttributeUtils.cs (2)
33List<object> results = new List<object>(attributes); 73List<object> results = new List<object>(attributes);
System\Reflection\Context\Custom\CustomType.cs (2)
60List<PropertyInfo> results = new List<PropertyInfo>(properties); 155List<MethodInfo> results = new List<MethodInfo>(methods);
System.Reflection.Metadata (1)
System\Reflection\Metadata\Ecma335\MetadataBuilder.Heaps.cs (1)
540var sorted = new List<KeyValuePair<string, StringHandle>>(strings);
System.Reflection.MetadataLoadContext (2)
System\Reflection\TypeLoading\Assemblies\RoAssembly.cs (1)
83List<Type> list = new List<Type>(ExportedTypes);
System\Reflection\TypeLoading\General\Helpers.cs (1)
60List<T> list = new List<T>(enumeration);
System.Runtime.Caching (1)
System\Runtime\Caching\MemoryCache.cs (1)
430List<string> keysClone = new List<string>(keys);
System.ServiceModel.Primitives.Tests (1)
ServiceModel\SynchronizedCollection.cs (1)
30SynchronizedCollection<int> coll2 = new SynchronizedCollection<int>(new object(), new List<int>(coll));
System.Text.Json (3)
System\Text\Json\Nodes\JsonArray.cs (1)
151var list = new List<JsonNode?>(items);
System\Text\Json\Schema\JsonSchemaExporter.cs (1)
102List<JsonDerivedType> derivedTypes = new(polyOptions.DerivedTypes);
System\Text\Json\Serialization\ConfigurationList.cs (1)
21_list = source is null ? new List<TItem>() : new List<TItem>(source);
System.Text.RegularExpressions (2)
System\Text\RegularExpressions\RegexAssemblyCompiler.cs (1)
39_assembly = new PersistedAssemblyBuilder(an, typeof(object).Assembly, attribs is not null ? new List<CustomAttributeBuilder>(attribs) : null) ??
System\Text\RegularExpressions\RegexCharClass.cs (1)
1859var temp = new List<KeyValuePair<string, string>>(s_definedCategories);
System.Text.RegularExpressions.Generator (1)
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCharClass.cs (1)
1859var temp = new List<KeyValuePair<string, string>>(s_definedCategories);
System.Threading.Channels (1)
src\libraries\Common\src\System\Collections\Concurrent\SingleProducerSingleConsumerQueue.cs (1)
435public T[] Items => new List<T>(_queue).ToArray();
System.Threading.Tasks.Dataflow (1)
src\libraries\Common\src\System\Collections\Concurrent\SingleProducerSingleConsumerQueue.cs (1)
435public T[] Items => new List<T>(_queue).ToArray();
System.Windows.Forms (2)
System\Windows\Forms\ComponentModel\COM2Interop\COM2PropertyDescriptor.cs (2)
204newAttributes = new(AttributeArray) 221newAttributes = new(AttributeArray)
System.Windows.Forms.Design (3)
System\ComponentModel\Design\InheritedPropertyDescriptor.cs (2)
81List<Attribute> attributes = new(AttributeArray!) 99List<Attribute> attributes = new(AttributeArray!)
System\Windows\Forms\Design\OleDragDropHandler.ComponentDataObject.cs (1)
97selectedComponents = new List<object>(components);
System.Xaml (11)
System\Xaml\Context\NameFixupGraph.cs (2)
267List<string> names = new List<string>(_dependenciesByName.Keys); 297List<object> parentObjs = new List<object>(_dependenciesByParentObject.Keys);
System\Xaml\Context\ObjectWriterContext.cs (1)
323List<XamlType> ceilingTypes = ceilingTypesEnumerable is not null ? new List<XamlType>(ceilingTypesEnumerable) : null;
System\Xaml\Schema\XamlDirective.cs (1)
40List<string> nsList = new List<string>(xamlNamespaces);
System\Xaml\Schema\XamlNamespace.cs (1)
286assemblyNamespacesCopy = new List<AssemblyNamespacePair>(_assemblyNamespaces);
System\Xaml\XamlObjectReader.cs (1)
1124removedProperties = new List<MarkupInfo>(propertiesWithDO);
System\Xaml\XamlSchemaContext.cs (2)
58List<Assembly> listOfAssemblies = new List<Assembly>(referenceAssemblies); 1087_unexaminedAssemblies = new List<Assembly>(ReferenceAssemblies);
System\Xaml\XamlType.cs (2)
672ctorArray = new List<ConstructorInfo>(ctors).ToArray(); 1592return new List<XamlType>(typeArguments).AsReadOnly();
System\Xaml\XamlTypeName.cs (1)
35List<XamlTypeName> typeArgList = new List<XamlTypeName>(typeArguments);
VBCSCompiler.UnitTests (1)
CompilerServerTests.cs (1)
185var arguments = new List<string>(argumentsSingle.Split(' '));
WindowsBase.Tests (4)
System\Windows\WeakEventManagerTests.cs (4)
2098var expectedHandlers = new List<Delegate>(handlers); 2523var expectedListeners = new List<CustomWeakEventListener>(listeners); 5357var expectedListeners = new List<CustomWeakEventListener>(listeners); 5616var expectedHandlers = new List<Delegate>(handlers);
WinFormsControlsTest (1)
UserControls\UserControlWithObjectCollectionEditor.cs (1)
26get { return new List<int>(new int[] { 1, 2, 3 }); }
xunit.console (1)
common\AssemblyResolution\DependencyContextAssemblyCache.cs (1)
95var result = new List<string>(GetFallbacks(dependencyContext.RuntimeGraph).Fallbacks);