Add collection literal support for immutable collections (#88470)
authorStephen Toub <stoub@microsoft.com>
Mon, 17 Jul 2023 20:31:17 +0000 (16:31 -0400)
committerGitHub <noreply@github.com>
Mon, 17 Jul 2023 20:31:17 +0000 (16:31 -0400)
commitec025ad673802fb0d41c53a06afe5c9ea0ad840a
tree761f8f89a0f5363d382fe3069cba6bbf57c649d4
parent58bca2c54dcd1cc3b76989657bf218621668d836
Add collection literal support for immutable collections (#88470)

* Add collection literal support for immutable collections

Add the CollectionBuilderAttribute and use it on the supported immutable collections

* Address feedback
13 files changed:
src/libraries/System.Collections.Immutable/ref/System.Collections.Immutable.cs
src/libraries/System.Collections.Immutable/ref/System.Collections.Immutable.csproj
src/libraries/System.Collections.Immutable/src/System.Collections.Immutable.csproj
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.cs
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableHashSet_1.cs
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.cs
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableQueue_1.cs
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.cs
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableStack_1.cs
src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/CollectionBuilderAttribute.cs [new file with mode: 0644]
src/libraries/System.Runtime/ref/System.Runtime.cs
src/libraries/System.Runtime/tests/System/Runtime/CompilerServices/AttributesTests.cs