How can I add my custom C# assemblies to Monaco Editor, so the editor would recognize/complete my assembly types?
And how could I choose and limit the .net libraries that Monaco Editor can use?
Thanks in advance.
No simple way. .Net is a framework that could not be easily analyzed with JS, especially if you need to read all types in binary dependencies (dlls).
So you will also need some sort of a backend engine (probably WebApi). Loading a project in Monaco could ask the Backend to read all exported types from the binary references (see Reflection) and send them to the frontend.
If you expect those things to change real time (someone creates a new class, for example), you may get into significantly more complex scenario where you will need to have both - the code in Monaco Editor and the project in the backend constantly synced (see Roslyn).
If you only need to support read + types, you can do something like:
If your Monaco editor IS NOT read only - you are also expected to sync the backend and frontend, so positions always match.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With