Skip to content
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

Use interpolated string handler for Contract.ThrowIf methods #58173

Merged
merged 7 commits into from
Feb 7, 2022

Conversation

Youssef1313
Copy link
Member

@Youssef1313 Youssef1313 commented Dec 7, 2021

Closes #58165

cc @333fred @sharwell @CyrusNajmabadi

I'm not sure if I'm doing it right

@Youssef1313 Youssef1313 requested review from a team as code owners December 7, 2021 20:21
@ghost ghost added the Community The pull request was submitted by a contributor who is not a Microsoft employee. label Dec 7, 2021

public void AppendLiteral(string value) => _stringBuilder?.Append(value);

public void AppendFormatted<T2>(T2 value) => _stringBuilder?.Append(value?.ToString());
Copy link
Member Author

Choose a reason for hiding this comment

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

Couldn't find good names for the type parameters.

@Youssef1313 Youssef1313 requested review from a team as code owners December 8, 2021 05:36
@Youssef1313 Youssef1313 force-pushed the heavy-allocations branch 2 times, most recently from fe7a3a7 to 78b91d8 Compare December 8, 2021 07:52
@Youssef1313
Copy link
Member Author

@333fred Anything left here?

@333fred
Copy link
Member

333fred commented Jan 4, 2022

@sharwell @dotnet/roslyn-ide for review.

@Youssef1313
Copy link
Member Author

@sharwell for review.

@Youssef1313
Copy link
Member Author

@sharwell Can you review please? Thanks!

…ities/Contract.InterpolatedStringHandlers.cs

Co-authored-by: Sam Harwell <[email protected]>
Youssef1313 and others added 2 commits January 19, 2022 22:21
…ities/Contract.InterpolatedStringHandlers.cs

Co-authored-by: Sam Harwell <[email protected]>
…ities/Contract.InterpolatedStringHandlers.cs

Co-authored-by: Sam Harwell <[email protected]>
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.

@dotnet/roslyn-compiler for a second review of the compiler files.

@333fred
Copy link
Member

333fred commented Jan 20, 2022

@jaredpar any more feedback?

@Youssef1313 Youssef1313 requested a review from jaredpar January 21, 2022 14:38
@Youssef1313
Copy link
Member Author

@jaredpar Can you take a look please? Thanks!

@sharwell sharwell merged commit cc888b2 into dotnet:main Feb 7, 2022
@ghost ghost added this to the Next milestone Feb 7, 2022
@Youssef1313 Youssef1313 deleted the heavy-allocations branch February 8, 2022 02:45
@RikkiGibson RikkiGibson modified the milestones: Next, 17.2.P2 Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Community The pull request was submitted by a contributor who is not a Microsoft employee.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Heavy allocation in formatting an unused error message
5 participants