[英]How to make nodejs code call csharp code in asp.net core (with JavascriptService) application?
I'm using asp.net core for a simple web api server (with deepstream, actually). 我正在将asp.net内核用于简单的Web api服务器(实际上是使用Deepstream)。 While c# can call nodejs code flawlessly with NodeServices.InvokeExportAsync, when I try to pass Action/Func as parameter of NodeServices.InvokeExportAsync to nodejs, I get 虽然c#可以使用NodeServices.InvokeExportAsync完美地调用nodejs代码,但是当我尝试将Action / Func作为NodeServices.InvokeExportAsync的参数传递给nodejs时,却得到了
System.AggregateException: 'One or more errors occurred. (Serializing delegates is not supported on this platform.)'
The error is quite self-explanatory, just wondering is there anyway to get around this? 该错误是不言自明的,只是想知道是否仍然可以解决此问题? Maybe not passing delegate to nodejs, but through some other mechanism, to make calls from nodejs to csharp? 也许不将委托传递给nodejs,而是通过其他某种机制来进行从nodejs到csharp的调用?
Thanks 谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.