-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a better way to import multiple functions? #114
Comments
Not sure I understand what you mean by |
The code itself isn't bad really I dont think. It works, and seemingly well. My concern is mostly that I'm loading the dlls for each export, which seems inefficient, but considering they all use the open connection under the hood well I'm guessing its optimized and only loads it once. I couldn't see any multiple export methods in the docs, but wanted to make sure I wasn't missing something obvious as a syntax like below to export what I'm doing makes a lot of sense, or is it an abnormal use case to export a bunch of functions as none of the examples do it?
|
Are you sure, you are submitting the issue in the right repo? Coz, there is no API as |
Well that's embarrassing. |
I have a communications library I'm basically porting to nodejs from .Net and have a number of functions inside .Net I need to expose.
I find it a bit clunky to import them all separately, is there a better way?
I was thinking of just using dynamic iputs and outputs and creating a method that allowed me to use all the functions via a switch statement but again that feels clunky and not optimal.
I have it working perfectly, but before I add another 10+ functions I just wanted to see if there was something better as I didn't see a way in the docs to import multiple methods.
I would be looking to import them like
let Coms = edge.func(......etc
Then be able to use
Coms.Open
Coms.GetAlarms
etc
The text was updated successfully, but these errors were encountered: