using System.Threading.Tasks; namespace Sample105 { public class Startup { public async Task<object> Invoke(object input) { return this.Add7((int)input); } int Add7(int v) { return Helper.Add7(v); } } static class Helper { public static int Add7(int v) { return v + 7; } } }
E:\dev>"C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\csc.exe" /target:library /debug Sample105.cs
E:\dev> npm install edge-js
var edge = require('edge-js'); var add5 = edge.func('Sample105.dll'); add5(22, function (error, result) { if(error) throw error; console.log(result); });
E:dev> node edgeCAll.js 29