129 references to ImmutableList
Aspire.Dashboard (1)
Microsoft.AspNetCore.App.Analyzers (4)
Microsoft.AspNetCore.Components.Endpoints (1)
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)
Microsoft.Build (13)
Microsoft.Build.Framework (7)
Microsoft.CodeAnalysis (11)
Microsoft.CodeAnalysis.CodeStyle (11)
Microsoft.CodeAnalysis.Collections.Package (7)
Microsoft.CodeAnalysis.CSharp.Features (1)
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)
Microsoft.CodeAnalysis.Workspaces (13)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (11)
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)
Microsoft.DotNet.Build.Tasks.Feed.Tests (1)
Microsoft.DotNet.Internal.DependencyInjection.Testing (2)
Microsoft.Extensions.AI.Abstractions.Tests (1)
Shared.Tests (1)
System.Collections.Immutable (5)
System.Text.Json.SourceGeneration (1)