Edge: how can i use C# original dll

Created on 15 Jan 2018  路  3Comments  路  Source: tjanczuk/edge

is there a way that I can directly to use C# .dll through edge?

All 3 comments

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 Invoke(object input)", it would be a long work

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()

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sz30313484 picture sz30313484  路  7Comments

borgold picture borgold  路  12Comments

harivasista picture harivasista  路  5Comments

0xF6 picture 0xF6  路  4Comments

kneumei picture kneumei  路  10Comments