-
Notifications
You must be signed in to change notification settings - Fork 458
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
TypeUtil.ToCSharpString(this Type) does not handle nested generic types correctly #404
Comments
Sorry, I should have given the full name: |
Yep, looks like unbound generic types are being passed recursively through the |
Not quite. The thing is this:
To fix the formatting of nested generic types, you'd have to:
|
Migrated from castleproject/Core#365.
@pmg23 wrote:
The useful extension method
TypeUtil.ToCSharpString(this Type)
does not correctly deal with types nested within generic types [as of Core 4.2.1]. For example:@stakx replied:
(Shameless advertisement:)
Type name formatting is surprisingly complex because there are quite a few corner cases to deal with. I happen to have written a small library recently (stakx/TypeNameFormatter) that would solve this problem. It's available as a source code NuGet package.
@stakx replied:
That being said, I cannot seem to find a method
TypeUtil.ToCSharpString(this Type)
in Castle Core (this repository). Did you mean this method in Castle Windsor (castleproject/Windsor)?The text was updated successfully, but these errors were encountered: