129 references to ImmutableList
Aspire.Dashboard (1)
Components\Pages\ConsoleLogs.razor.cs (1)
329var builder = ImmutableList.CreateBuilder<SelectViewModel<ResourceTypeDetails>>();
Microsoft.AspNetCore.App.Analyzers (4)
Infrastructure\VirtualChars\AbstractVirtualCharService.cs (1)
157var result = ImmutableList.CreateBuilder<VirtualChar>();
Infrastructure\VirtualChars\CSharpVirtualCharService.cs (3)
137var result = ImmutableList.CreateBuilder<VirtualChar>(); 214var result = ImmutableList.CreateBuilder<VirtualChar>(); 307var runeResults = ImmutableList.CreateBuilder<VirtualChar>();
Microsoft.AspNetCore.Components.Endpoints (1)
FormMapping\Converters\CollectionAdapters\ImmutableListBufferAdapter.cs (1)
10public static ImmutableList<TElement>.Builder CreateBuffer() => ImmutableList.CreateBuilder<TElement>();
Microsoft.AspNetCore.Components.Endpoints.Tests (2)
Binding\FormDataMapperTests.cs (2)
817var expected = ImmutableList.CreateRange(new[] { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 }); 857var expected = ImmutableList.CreateRange(new[] { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 });
Microsoft.AspNetCore.Http.Extensions (1)
src\Components\Endpoints\src\FormMapping\Converters\CollectionAdapters\ImmutableListBufferAdapter.cs (1)
10public static ImmutableList<TElement>.Builder CreateBuffer() => ImmutableList.CreateBuilder<TElement>();
Microsoft.Build (13)
Definition\Project.cs (1)
2544_globs = ImmutableList.CreateBuilder<IMSBuildGlob>(),
Evaluation\LazyItemEvaluator.cs (1)
259ImmutableList<I>.Builder items = ImmutableList.CreateBuilder<I>();
Evaluation\LazyItemEvaluator.IncludeOperation.cs (1)
43ImmutableList<string>.Builder excludePatterns = ImmutableList.CreateBuilder<string>();
Evaluation\LazyItemEvaluator.OrderedItemDataCollection.cs (1)
211return new Builder(ImmutableList.CreateBuilder<ItemData>());
Evaluation\LazyItemEvaluator.RemoveOperation.cs (1)
114public ImmutableList<string>.Builder MatchOnMetadata { get; } = ImmutableList.CreateBuilder<string>();
Evaluation\LazyItemEvaluator.UpdateOperation.cs (2)
52_itemsToUpdate ??= ImmutableList.CreateBuilder<ItemBatchingContext>(); 80_itemsToUpdate ??= ImmutableList.CreateBuilder<ItemBatchingContext>();
Globbing\Visitor\ParsedGlobCollector.cs (1)
12private readonly ImmutableList<MSBuildGlob>.Builder _collectedGlobs = ImmutableList.CreateBuilder<MSBuildGlob>();
Graph\ProjectGraph.cs (3)
624var entryTargets = ImmutableList.CreateRange(entryPointNode.ProjectInstance.DefaultTargets); 639var entryTargets = ImmutableList.CreateRange(entryPointNode.ProjectInstance.DefaultTargets); 666ProjectGraphBuildRequest entryEdge = new(node, ImmutableList.CreateRange(node.ProjectInstance.DefaultTargets));
Graph\ProjectInterpretation.cs (2)
494ImmutableList<TargetSpecification>.Builder targetsForOuterBuild = ImmutableList.CreateBuilder<TargetSpecification>(); 495ImmutableList<TargetSpecification>.Builder targetsForInnerBuild = ImmutableList.CreateBuilder<TargetSpecification>();
Microsoft.Build.Framework (7)
ImmutableSegmentedList.cs (7)
13/// <inheritdoc cref="ImmutableList.Create{T}()"/> 17/// <inheritdoc cref="ImmutableList.Create{T}(T)"/> 21/// <inheritdoc cref="ImmutableList.Create{T}(T[])"/> 25/// <inheritdoc cref="ImmutableList.CreateBuilder{T}()"/> 29/// <inheritdoc cref="ImmutableList.CreateRange{T}(IEnumerable{T})"/> 33/// <inheritdoc cref="ImmutableList.ToImmutableList{TSource}(IEnumerable{TSource})"/> 42/// <inheritdoc cref="ImmutableList.ToImmutableList{TSource}(ImmutableList{TSource}.Builder)"/>
Microsoft.CodeAnalysis (11)
InternalUtilities\ImmutableListExtensions.cs (4)
16return ImmutableList.Create<T>(); 19return ImmutableList.Create<T>(items); 26return ImmutableList.Create<T>(); 29return ImmutableList.CreateRange<T>(items);
src\Dependencies\Collections\ImmutableSegmentedList.cs (7)
13/// <inheritdoc cref="ImmutableList.Create{T}()"/> 17/// <inheritdoc cref="ImmutableList.Create{T}(T)"/> 21/// <inheritdoc cref="ImmutableList.Create{T}(T[])"/> 25/// <inheritdoc cref="ImmutableList.CreateBuilder{T}()"/> 29/// <inheritdoc cref="ImmutableList.CreateRange{T}(IEnumerable{T})"/> 33/// <inheritdoc cref="ImmutableList.ToImmutableList{TSource}(IEnumerable{TSource})"/> 42/// <inheritdoc cref="ImmutableList.ToImmutableList{TSource}(ImmutableList{TSource}.Builder)"/>
Microsoft.CodeAnalysis.CodeStyle (11)
src\Compilers\Core\Portable\InternalUtilities\ImmutableListExtensions.cs (4)
16return ImmutableList.Create<T>(); 19return ImmutableList.Create<T>(items); 26return ImmutableList.Create<T>(); 29return ImmutableList.CreateRange<T>(items);
src\Dependencies\Collections\ImmutableSegmentedList.cs (7)
13/// <inheritdoc cref="ImmutableList.Create{T}()"/> 17/// <inheritdoc cref="ImmutableList.Create{T}(T)"/> 21/// <inheritdoc cref="ImmutableList.Create{T}(T[])"/> 25/// <inheritdoc cref="ImmutableList.CreateBuilder{T}()"/> 29/// <inheritdoc cref="ImmutableList.CreateRange{T}(IEnumerable{T})"/> 33/// <inheritdoc cref="ImmutableList.ToImmutableList{TSource}(IEnumerable{TSource})"/> 42/// <inheritdoc cref="ImmutableList.ToImmutableList{TSource}(ImmutableList{TSource}.Builder)"/>
Microsoft.CodeAnalysis.Collections.Package (7)
ImmutableSegmentedList.cs (7)
13/// <inheritdoc cref="ImmutableList.Create{T}()"/> 17/// <inheritdoc cref="ImmutableList.Create{T}(T)"/> 21/// <inheritdoc cref="ImmutableList.Create{T}(T[])"/> 25/// <inheritdoc cref="ImmutableList.CreateBuilder{T}()"/> 29/// <inheritdoc cref="ImmutableList.CreateRange{T}(IEnumerable{T})"/> 33/// <inheritdoc cref="ImmutableList.ToImmutableList{TSource}(IEnumerable{TSource})"/> 42/// <inheritdoc cref="ImmutableList.ToImmutableList{TSource}(ImmutableList{TSource}.Builder)"/>
Microsoft.CodeAnalysis.CSharp.Features (1)
Completion\CompletionProviders\InternalsVisibleToCompletionProvider.cs (1)
38builder ??= ImmutableList.CreateBuilder<SyntaxNode>();
Microsoft.CodeAnalysis.UnitTests (27)
Collections\ImmutableSegmentedListTest.cs (27)
375list2 = System.Collections.Immutable.ImmutableList.Remove(list2, 30); 379list2 = System.Collections.Immutable.ImmutableList.Remove(list2, 100); 383list2 = System.Collections.Immutable.ImmutableList.Remove(list2, 10); 457Assert.Equal(expectedList.IndexOf(newElement), System.Collections.Immutable.ImmutableList.IndexOf(list, newElement.ToUpperInvariant(), StringComparer.OrdinalIgnoreCase)); 464Assert.Equal(expectedList.IndexOf(existingElement), System.Collections.Immutable.ImmutableList.IndexOf(list, existingElement.ToUpperInvariant(), StringComparer.OrdinalIgnoreCase)); 491(b, v, i) => System.Collections.Immutable.ImmutableList.IndexOf(b, v, i), 492(b, v, i, c) => System.Collections.Immutable.ImmutableList.IndexOf(b, v, i, c), 497(b, v, i) => System.Collections.Immutable.ImmutableList.IndexOf(b, v, i), 498(b, v, i, c) => System.Collections.Immutable.ImmutableList.IndexOf(b, v, i, c), 507(b, v) => System.Collections.Immutable.ImmutableList.LastIndexOf(b, v), 508(b, v, eq) => System.Collections.Immutable.ImmutableList.LastIndexOf(b, v, eq), 509(b, v, i) => System.Collections.Immutable.ImmutableList.LastIndexOf(b, v, i), 510(b, v, i, c) => System.Collections.Immutable.ImmutableList.LastIndexOf(b, v, i, c), 514(b, v) => System.Collections.Immutable.ImmutableList.LastIndexOf(b, v), 515(b, v, eq) => System.Collections.Immutable.ImmutableList.LastIndexOf(b, v, eq), 516(b, v, i) => System.Collections.Immutable.ImmutableList.LastIndexOf(b, v, i), 517(b, v, i, c) => System.Collections.Immutable.ImmutableList.LastIndexOf(b, v, i, c), 529Assert.Equal<int>(new[] { 4, 5, 8 }, System.Collections.Immutable.ImmutableList.Replace((System.Collections.Immutable.IImmutableList<int>)list, 3, 4)); 530Assert.Equal<int>(new[] { 3, 6, 8 }, System.Collections.Immutable.ImmutableList.Replace((System.Collections.Immutable.IImmutableList<int>)list, 5, 6)); 531Assert.Equal<int>(new[] { 3, 5, 9 }, System.Collections.Immutable.ImmutableList.Replace((System.Collections.Immutable.IImmutableList<int>)list, 8, 9)); 537Assert.Equal<int>(new[] { 4, 3, 5 }, System.Collections.Immutable.ImmutableList.Replace((System.Collections.Immutable.IImmutableList<int>)list, 3, 4)); 538Assert.Equal<int>(new[] { 4, 4, 5 }, System.Collections.Immutable.ImmutableList.Replace(System.Collections.Immutable.ImmutableList.Replace((System.Collections.Immutable.IImmutableList<int>)list, 3, 4), 3, 4)); 555var updatedIface = System.Collections.Immutable.ImmutableList.Replace(iface, list[0], newAge); 651Assert.Equal(new[] { 2 }, System.Collections.Immutable.ImmutableList.RemoveRange((System.Collections.Immutable.IImmutableList<int>)list, new[] { 1, 3, 5 })); 660Assert.Throws<ArgumentNullException>("items", () => System.Collections.Immutable.ImmutableList.RemoveRange((System.Collections.Immutable.IImmutableList<int>)ImmutableSegmentedList.Create(1, 2, 3), null!)); 661Assert.Equal(new[] { 1, 3 }, System.Collections.Immutable.ImmutableList.RemoveRange((System.Collections.Immutable.IImmutableList<int>)ImmutableSegmentedList.Create(1, 2, 3), new[] { 2 }));
Microsoft.CodeAnalysis.VisualBasic.Features (1)
Completion\CompletionProviders\InternalsVisibleToCompletionProvider.vb (1)
38builder = If(builder, ImmutableList.CreateBuilder(Of SyntaxNode)())
Microsoft.CodeAnalysis.Workspaces (13)
src\Compilers\Core\Portable\InternalUtilities\ImmutableListExtensions.cs (4)
16return ImmutableList.Create<T>(); 19return ImmutableList.Create<T>(items); 26return ImmutableList.Create<T>(); 29return ImmutableList.CreateRange<T>(items);
src\Dependencies\Collections\ImmutableSegmentedList.cs (7)
13/// <inheritdoc cref="ImmutableList.Create{T}()"/> 17/// <inheritdoc cref="ImmutableList.Create{T}(T)"/> 21/// <inheritdoc cref="ImmutableList.Create{T}(T[])"/> 25/// <inheritdoc cref="ImmutableList.CreateBuilder{T}()"/> 29/// <inheritdoc cref="ImmutableList.CreateRange{T}(IEnumerable{T})"/> 33/// <inheritdoc cref="ImmutableList.ToImmutableList{TSource}(IEnumerable{TSource})"/> 42/// <inheritdoc cref="ImmutableList.ToImmutableList{TSource}(ImmutableList{TSource}.Builder)"/>
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
508var documentIds = ImmutableList.CreateBuilder<DocumentId>();
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (1)
320var translationActionsBuilder = ImmutableList.CreateBuilder<TranslationAction>();
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (11)
src\Compilers\Core\Portable\InternalUtilities\ImmutableListExtensions.cs (4)
16return ImmutableList.Create<T>(); 19return ImmutableList.Create<T>(items); 26return ImmutableList.Create<T>(); 29return ImmutableList.CreateRange<T>(items);
src\Dependencies\Collections\ImmutableSegmentedList.cs (7)
13/// <inheritdoc cref="ImmutableList.Create{T}()"/> 17/// <inheritdoc cref="ImmutableList.Create{T}(T)"/> 21/// <inheritdoc cref="ImmutableList.Create{T}(T[])"/> 25/// <inheritdoc cref="ImmutableList.CreateBuilder{T}()"/> 29/// <inheritdoc cref="ImmutableList.CreateRange{T}(IEnumerable{T})"/> 33/// <inheritdoc cref="ImmutableList.ToImmutableList{TSource}(IEnumerable{TSource})"/> 42/// <inheritdoc cref="ImmutableList.ToImmutableList{TSource}(ImmutableList{TSource}.Builder)"/>
Microsoft.CodeAnalysis.Workspaces.UnitTests (5)
SolutionTests\SolutionTests.cs (5)
4597solution = solution.WithProjectDocumentsOrder(pid, ImmutableList.CreateRange([did5, did4, did3, did2, did1])); 4622solution = solution.WithProjectDocumentsOrder(pid, ImmutableList.CreateRange([did5, did4, did3, did2, did1])); 4661Assert.Throws<ArgumentException>(() => solution = solution.WithProjectDocumentsOrder(pid, ImmutableList.Create<DocumentId>())); 4663Assert.Throws<InvalidOperationException>(() => solution = solution.WithProjectDocumentsOrder(pid, ImmutableList.CreateRange([did5, did3, did2, did1]))); 4664Assert.Throws<ArgumentException>(() => solution = solution.WithProjectDocumentsOrder(pid, ImmutableList.CreateRange([did3, did2, did1])));
Microsoft.DotNet.Build.Tasks.Feed (2)
src\model\TargetChannelConfig.cs (2)
161return new TargetFeedSpecification(ImmutableList.Create(tuple.type), tuple.feed, AssetSelection.All); 166return new TargetFeedSpecification(ImmutableList.Create(tuple.type), tuple.feed, tuple.assets);
Microsoft.DotNet.Build.Tasks.Feed.Tests (1)
SetupTargetFeedConfigV3Tests.cs (1)
37private static ImmutableList<string> FilesToExclude = ImmutableList.Create(
Microsoft.DotNet.Internal.DependencyInjection.Testing (2)
DependencyInjectionValidation.cs (2)
16private static readonly ImmutableList<string> s_exemptTypes = ImmutableList.Create( 28private static readonly ImmutableList<string> s_exemptNamespaces = ImmutableList.Create(
Microsoft.Extensions.AI.Abstractions.Tests (1)
test\Shared\JsonSchemaExporter\TestTypes.cs (1)
800yield return new TestData<ImmutableList<string>>(ImmutableList.Create("one", "two", "three"), """{"type":["array","null"],"items":{"type":["string","null"]}}""");
Shared.Tests (1)
JsonSchemaExporter\TestTypes.cs (1)
800yield return new TestData<ImmutableList<string>>(ImmutableList.Create("one", "two", "three"), """{"type":["array","null"],"items":{"type":["string","null"]}}""");
System.Collections.Immutable (5)
System\Collections\Immutable\IImmutableList.cs (2)
17[CollectionBuilder(typeof(ImmutableList), nameof(ImmutableList.Create))]
System\Collections\Immutable\ImmutableList_1.cs (2)
16[CollectionBuilder(typeof(ImmutableList), nameof(ImmutableList.Create))]
System\Collections\Immutable\ImmutableList_1.Node.cs (1)
1064ImmutableList.CreateRange(list) :
System.Text.Json.SourceGeneration (1)
Helpers\KnownTypeSymbols.cs (1)
283factoryTypeFullName = typeof(ImmutableList).FullName;