is there a way that I can directly to use C# .dll through edge?
Hello World!
take Excel.dll as an example. C# already has interface about Excel, How can I use it directly? if every function about Excel should follow "public async Task
You should get that C# interface or wrapper and compile with csc.exe. Edge will not work with any build from VS Then, you can reference it in JS like this:
var edge = require('./lib/edge');
var invokeAction = edge.func({
//assemblyFile: 'Sample105.dll',
source: () => {
/* Your C# code with Invoke */
},
references: ['Excel.dll', 'ExcelWrapper.dll'];
I suggest you use a switch inside invoke method to handle multiple C# local methods. When you want to call a function or object from ExcelWrapper or another library, use the full prefix and don't import with using ExcelWrapper;
but instead use it's namespace and class if static: ExcelWrapper.SomeClass.SomeMethod()