How to use edge-js - 5 common examples

To help you get started, we’ve selected a few edge-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Miramac / node-office-script / lib / powerpoint / edge / application.js View on Github external
/* global __dirname */
'use strict'
var path = require('path')
var edge = require('edge-js')

var application = edge.func({
  assemblyFile: path.join(__dirname, '../../../dist/OfficeScript.dll'),
  typeName: 'OfficeScript.Startup',
  methodName: 'PowerPointApplication'
})

module.exports = application
github oxygenhq / oxygen / lib / dispatcher-dotnet.js View on Github external
module.exports = function (homeDir, context, logger) {
    var module = {};
    var path = require('path');
    var ctx = context;
    var DotNetError = require('../errors/DotNetError');
    const STATUS = require('../model/status.js');
    // edge-js - edge fork that adds support for Mono v4.8 needed by XSLTransform
    // TODO: revert to upstream edge once the support is added there
    var edge = require('edge-js'); 

    var multiplexer = null;
    try {
        multiplexer = edge.func({
            assemblyFile: path.resolve(homeDir, 'lib/native/Oxygen.dll'),
            typeName: 'CloudBeat.Oxygen.Dispatcher',
            methodName: 'Invoke'
        });
    }
    catch (e) {
        logger.error('Error initializing DotNet Dispatcher', e);
        throw e;
    }

    module.execute = function (module, cmd, args) {
        try {
            return multiplexer({ module: module, method: cmd, args: args, ctx: ctx }, true);
        } catch (exc) {
            throw new DotNetError(exc.Source + ': ' + exc.message, exc.StackTrace);
        }
github dtjohnson / xlsx-populate / test / e2e-generate / e2e-generate.spec.js View on Github external
.then(() => new Promise((resolve, reject) => {
                    const wbPath = path.resolve(`${testCase}out.xlsx`);
                    const parseSource = fs.readFileSync(`${testCase}parse.cs`);
                    const parseTemplate = fs.readFileSync("./template.cs");
                    const source = parseTemplate + parseSource;

                    const parse = edge.func({
                        source,
                        references: ["System.Drawing.dll", interopPath]
                    });

                    parse({ path: wbPath, password }, (err, results) => {
                        if (err) return reject(err);
                        resolve(results);
                    });
                }))
                .then(results => {
github austinsc / signal-arr-proxygen / src / scan.js View on Github external
import edge from 'edge-js';
import path from 'path';

export const reflect = edge.func(path.join(__dirname, '../Scan.cs'));

export function scan(assembly,) {
  return new Promise((resolve, reject) => {
    reflect(assembly, (error, result) => {
      if(error) {
        return reject(error);
      }
      resolve(result);
    });
  });
}
github mike-eason / oledb / index.js View on Github external
const edge = require('edge-js');
const data = edge.func(__dirname + '/Data.cs');

const COMMAND_TYPES = {
    QUERY: 'query',
    SCALAR: 'scalar',
    COMMAND: 'command',
    PROCEDURE: 'procedure',
    PROCEDURE_SCALAR: 'procedure_scalar'
};

const PARAMETER_DIRECTIONS = {
    INPUT: 1,
    OUTPUT: 2,
    INPUT_OUTPUT: 3,
    RETURN_VALUE: 6
};

edge-js

Edge.js: run .NET and Node.js in-process on Windows, Mac OS, and Linux

MIT
Latest version published 19 days ago

Package Health Score

78 / 100
Full package analysis

Popular edge-js functions