문서의 선택한 두 판 사이의 차이를 보여줍니다.
— |
develop:node:edgejs [2019/09/06 02:11] (현재) starlits 만듦 |
||
---|---|---|---|
줄 1: | 줄 1: | ||
+ | ====== nodejs에서 c# dll 연동하기 (edgejs) ====== | ||
+ | |||
+ | ===== .net dll 테스트코드 ===== | ||
+ | - 파일명 : Sample105.cs < | ||
+ | using System.Threading.Tasks; | ||
+ | namespace Sample105 | ||
+ | { | ||
+ | | ||
+ | { | ||
+ | public async Task< | ||
+ | { | ||
+ | | ||
+ | } | ||
+ | |||
+ | |||
+ | int Add7(int v) | ||
+ | { | ||
+ | | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | | ||
+ | { | ||
+ | public static int Add7(int v) | ||
+ | { | ||
+ | | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ===== C# source Code Compile ===== | ||
+ | - command 명령어로 library compile 을 한다. < | ||
+ | E: | ||
+ | </ | ||
+ | |||
+ | ===== node 설치 ===== | ||
+ | - node install 명령으로 node_module 를 설치한다. < | ||
+ | E:\dev> npm install edge-js | ||
+ | </ | ||
+ | |||
+ | ===== node sourceCode ===== | ||
+ | - 파일명 : edgeCall.js < | ||
+ | var edge = require(' | ||
+ | |||
+ | var add5 = edge.func(' | ||
+ | |||
+ | add5(22, function (error, result) { | ||
+ | | ||
+ | | ||
+ | }); | ||
+ | </ | ||
+ | |||
+ | ===== edge-js 로 C# dll 호출하기 ===== | ||
+ | - node 명령을 실행한다. < | ||
+ | E:dev> node edgeCAll.js | ||
+ | 29 | ||
+ | </ | ||
+ | |||
+ | ===== 참고링크 ===== | ||
+ | - http:// | ||
+ | - http:// |