Creating an intellisense Javascript file for a .NET class

I have a .net control that is designed to be used as an ActiveX control on web pages, created this way:

<object id="TheControl" name="TheControl" classid="clsid:012937D0-E1D8-4a80-A17F-DEADBEEFF00D"></object> 

Is there a way to take the XML documentation generated by Visual Studio for TheControl and convert it to a .js file that Visual Studio can use to provide intellisense for the control instance on the page?

+6
source share
1 answer

You need to either use .NET Reflection to get a list of all the properties and methods, or write an XML parser tool to get the same list, and then generate the .JS source code.

I think both of them will require the same effort to write, but the Reflection approach can only be used with an ActiveX file — unless you have Visual Studio to create XML documentation.

If all you need is an "empty shell" .JS file for properties and methods, then the code in this article should provide a good foundation:

http://www.codeproject.com/KB/dotnet/Reflection.aspx

0
source

Source: https://habr.com/ru/post/885417/


All Articles