TypeDefinition.FullName is incompatible with Type.FullName on nested classes. #150
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Nested classes are represented with a "+" by
Type.FullNamebutTypeDefinition.FullNameuses "/". Is that an intended difference?First of all, consider the following code:
The output of shown program:
So, is that by design? Should those match?
My usecase was that I use Mono.Linker which uses a configuration file which looks like this:
I generate these on the fly via attributes...turned out the Mono.Linker, using Cecil, expected the Cecil variant of
Type.FullName. That the documentation failed to mention is of course a problem on the end of Mono.Linker, but the difference stroke me as odd.Yes that's intended. Cecil uses the ECMA-335 naming for types.
Is there some API for converting
name from TypeDefinition.FullName
to one matching Type.FullName,
or vice versa?
How would you go with making those two match?
Just ran into this as well. Might be nice to have it documented. Is the + to / the only difference?
@marko-vasic I don't think we have an API for that. We have an internal API to convert a Type FullName to a TypeReference (TypeParser) but that's about it.
@Ziflin basically the ECMA-335 is the (somewhat large) documentation that was used here. I agree it would be nice to sum it up in a wiki page.