-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add DefaultInterpolatedStringHandler.Text/Clear #112171
base: main
Are you sure you want to change the base?
Conversation
Note regarding the
|
Note regarding the
|
I am wondering if concerns about exposing ValueStringBuilder are not applicable here too. Soon I've copied ValueStingBuilder in our codebase and build a handler like DefaultInterpolatedStringHandler but storage was VSB. Then was asked by colleagues what will happen if they forgot about calling Clear(Dispose in our case). |
An ArrayPool array may not be returned to the pool. |
@@ -13418,6 +13418,8 @@ public void AppendFormatted<T>(T value, int alignment) { } | |||
public void AppendFormatted<T>(T value, int alignment, string? format) { } | |||
public void AppendFormatted<T>(T value, string? format) { } | |||
public void AppendLiteral(string value) { } | |||
public void Clear() { 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.
Nit: isn't the convention just { }
if there's no return/out?
public void Clear() { throw null; } | |
public void Clear() { } |
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.
Yup.
Fixes #110505