microsoft / node-api-dotnet

Advanced interoperability between .NET and JavaScript in the same process.
MIT License
484 stars 52 forks source link

Add full support for types/interfaces/delegates without namespaces #262

Open DmitriySft opened 5 months ago

DmitriySft commented 5 months ago

All kinds of .Net types without namespaces should be supported. Currently, types without namespaces are just ignored.

1) Class 2) Structs 3) Interfaces 4) Enums 5) Delegates 6) etc.

jasongin commented 5 months ago

I didn't mean to close this one with #265. Though that has some related fixes, I think there is still more work and testing to be done with un-namespaced types.

jasongin commented 3 weeks ago

360 resolves issues with the module source generator and un-namespaced types.

Support for dynamic invocation of un-namespaced types is still not implemented. I am unsure whether it is a good idea to support that at all: with the way types from all loaded assemblies are merged into a combined namespace hierarchy, it could be easy to encounter name conflicts among un-namespaced types. The same is true for ordinary assembly references in C#, which is why it is a very bad practice to publish libraries without namespacing.

I am moving this issue to the Backlog milestone for future consideration. I don't think it's a priority right now.