Open jakubmisek opened 4 years ago
I ran into this with https://github.com/dotnet/roslyn/issues/40500.
Would reimplementing the Cci.ITypeDefinition.GetMethods
interface method be a good workaround, or are there cases where GetMethods is not called using the interface?
/cc @jcouv
thank you! An implementation of Cci.ITypeDefinition.GetMethods
providing some extension points would be sufficient.
As of now we had to re-implement the class just to make GetMethods
to return a symbol for our .cctor
I understand this feature request is to enhance Roslyn's APIs to support 3rd party compilers. Supporting 3rd party compilers is not a goal of Roslyn, but I'll keep this feature request open.
That's alright, thank you. It can be workarounded by copy-pasting the RootModuleType source.
A proposal to make methods on
Microsoft.Cci.RootModuleType
virtual so it can be overridden. 3rd party compilers would be able to define static module constructors and other methods in there (which is in comply with MSIL specs)Especially helpful would be to alter the method
GetMethods
https://github.com/dotnet/roslyn/blob/e09c42a1e779208b97f6dc122d47e27c2679004b/src/Compilers/Core/Portable/PEWriter/RootModuleType.cs#L139 to