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

Cleanup and add documentation for IndentedStringBuilder #20530

Merged
merged 1 commit into from
Apr 7, 2020

Conversation

ajcvickers
Copy link
Member

Fixes #20383

Looked at making it pubternal or internal again, but it seems to be fundamental to the C# code generators in the design assembly. Considered moving it to design, but that would result in duplicate internal code other places. So just documented and cleaned up the surface--in particular, it only handles strings so that any possible locale-specific string conversions are forced to happen outside.

@ajcvickers ajcvickers requested a review from a team April 4, 2020 22:49
Fixes #20383

Looked at making it pubternal or internal again, but it seems to be fundamental to the C# code generators in the design assembly. Considered moving it to design, but that would result in duplicate internal code other places. So just documented and cleaned up the surface--in particular, it only handles strings so that any possible locale-specific string conversions are forced to happen outside.
@ajcvickers ajcvickers requested review from smitpatel and a team April 5, 2020 15:13
@ajcvickers ajcvickers merged commit bdaeee1 into master Apr 7, 2020
@ajcvickers ajcvickers deleted the IndentYourselfClean0404 branch April 7, 2020 15:46
@roji
Copy link
Member

roji commented Apr 15, 2020

When syncing EFCore.PG, it's somewhat annoying to have to do ToString on every integer I need to render in SQL...

Is there any reason here to be more restrictive than standard StringBuilder, which does accept object (and does ToString)? It doesn't seem like that much of a pit of failure to me...

@roji
Copy link
Member

roji commented Apr 15, 2020

If we really don't want object, we could at least have some overloads for common types such as int.

@roji
Copy link
Member

roji commented Apr 15, 2020

(turned out not to happen that much in my codebase, though)

roji added a commit to roji/efcore.pg that referenced this pull request Apr 15, 2020
roji added a commit to npgsql/efcore.pg that referenced this pull request Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IndentedStringBuilder is internal
4 participants