Skip to content

How to deal the .NET's event with the nodejs event's handler. #330

@gentlecolder

Description

@gentlecolder

the problem code is bellow:
/the edge code bellow: edged.js/
var stractData = edge.func(function () {/*

async (dynamic input) => {
       Box.DataMonitorValueChanged +=input.DataChangedHandler;
}   

*/});

module.exports.stractData=stractData;

/the nodejs code bellow:/
var databox=require('edged.js');

var util = require('util');

var input = {
DataChangedHandler: function (object sender, IList e) {
foreach (DataMonitorValueChangedArgs monitorValue in e)
{

              Console.log(monitorValue.ToString()+";"+monitorValue.Uid.ToString() + ':' +                     monitorValue.Value + '\n');
            }
}

};

databox.stractData(input);

is there any good solution ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions