-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Align API surface of immutable collections and their corresponding builder types #66550
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
Tagging subscribers to this area: @dotnet/area-system-collections Issue DetailsResolve #822
|
...es/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.Builder.cs
Show resolved
Hide resolved
...es/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.Builder.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.cs
Show resolved
Hide resolved
...ies/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.Builder.cs
Show resolved
Hide resolved
...ies/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.Builder.cs
Show resolved
Hide resolved
Hi @eiriktsarpalis Could you take a look on this PR ? 😃 |
@RaymondHuy I'm backlogged at the moment, will follow up with reviewing later. Thanks. |
src/libraries/System.Collections.Immutable/ref/System.Collections.Immutable.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Collections.Immutable/ref/System.Collections.Immutable.cs
Outdated
Show resolved
Hide resolved
...es/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.Builder.cs
Show resolved
Hide resolved
...es/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.Builder.cs
Show resolved
Hide resolved
...es/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.Builder.cs
Show resolved
Hide resolved
...es/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.Builder.cs
Show resolved
Hide resolved
...es/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.Builder.cs
Show resolved
Hide resolved
...ies/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.Builder.cs
Show resolved
Hide resolved
...ies/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.Builder.cs
Show resolved
Hide resolved
...es/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.Builder.cs
Outdated
Show resolved
Hide resolved
...es/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.Builder.cs
Show resolved
Hide resolved
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.cs
Outdated
Show resolved
Hide resolved
...ies/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.Builder.cs
Outdated
Show resolved
Hide resolved
...ies/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.Builder.cs
Outdated
Show resolved
Hide resolved
...ies/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.Builder.cs
Outdated
Show resolved
Hide resolved
...ies/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.Builder.cs
Outdated
Show resolved
Hide resolved
...ystem.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.Builder.cs
Outdated
Show resolved
Hide resolved
...ystem.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.Builder.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Collections.Immutable/tests/ImmutableArrayBuilderTest.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor feedback concerning implementation and XML documentation. CI also seems to be failing because of parameter mismatches between reference source and implementation.
src/libraries/System.Collections.Immutable/ref/System.Collections.Immutable.cs
Outdated
Show resolved
Hide resolved
@@ -702,8 +720,14 @@ public sealed partial class Builder : System.Collections.Generic.ICollection<T>, | |||
public int LastIndexOf(T item, int startIndex, int count) { throw null; } | |||
public int LastIndexOf(T item, int startIndex, int count, System.Collections.Generic.IEqualityComparer<T>? equalityComparer) { throw null; } | |||
public bool Remove(T item) { throw null; } | |||
public void Remove(T value, IEqualityComparer<T>? equalityComparer) { throw null; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the above, cc @terrajobst
public void Remove(T value, IEqualityComparer<T>? equalityComparer) { throw null; } | |
public bool Remove(T item, IEqualityComparer<T>? equalityComparer) { throw null; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RaymondHuy could you please update the return type? It should match that of the existing overload.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @eiriktsarpalis I have updated the PR.
src/libraries/System.Collections.Immutable/ref/System.Collections.Immutable.cs
Outdated
Show resolved
Hide resolved
@@ -486,14 +487,17 @@ public bool Remove(T element) | |||
/// The equality comparer to use in the search. | |||
/// If <c>null</c>, <see cref="EqualityComparer{T}.Default"/> is used. | |||
/// </param> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a <returns />
element as above.
@@ -463,6 +463,7 @@ public void AddRange(Builder items) | |||
|
|||
/// <summary> | |||
/// Removes the first occurrence of the specified element from the builder. | |||
/// If no match is found, the builder remains unchanged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're adding this, shouldn't it be included in the new overload as well?
src/libraries/System.Collections.Immutable/tests/ImmutableArrayBuilderTest.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Resolve #822