Skip to content

Conversation

@DustinCampbell
Copy link
Member

@DustinCampbell DustinCampbell commented Jun 22, 2023

As I work on the legacy editor shim, I'm trying to pull bits of clean up and minor improvements into separate PRs.

  • Renamed ImmutableArray<T>.Builder.SetCapacityIfNeeded(...) extension method to SetCapacityIfLarger to match other similar extension methods.
  • Add ItemCollection.TryGetValue<TKey, TValue>(...) method to clean up calling code.
  • Add ImmutableArray<T>.Builder.DrainToImmutable() extension method.
  • Return ImmutableArray<T> from RazorSyntaxTreeExtensions.GetClassifiedSpans() and RazorSyntaxTreeExtensions.GetTagHelperSpans().
  • Add ImmutableArray<T>.SelectAsArray(...) extension method.

@DustinCampbell DustinCampbell requested review from a team as code owners June 22, 2023 20:22
Copy link
Member

@davidwengier davidwengier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay!

Copy link
Member

@333fred 333fred left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM. Couple of small comments.

@DustinCampbell DustinCampbell enabled auto-merge June 23, 2023 00:08
@DustinCampbell DustinCampbell merged commit 98b5141 into dotnet:main Jun 23, 2023
@DustinCampbell DustinCampbell deleted the use-immutable-array branch June 23, 2023 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants