如何将Azure函数的入口点放在.NET DLL中?
Azure Functions示例说明了如何将进程入口点放在C#脚本文件.csx
。 但是,如何使用常规C#库(DLL)来实现此行为? 我可以让Kudu首先编译库,就像为Webapp做的那样吗?
截至撰写此问题时,它不受支持,但现在却是!
https://github.com/Azure/azure-webjobs-sdk-script/wiki/Precompiled-functions
来自wiki的摘录:
{ "scriptFile": "PreCompiledFunctionSample.dll", "entryPoint": "PreCompiledFunctionSample.MyFunction.Run", "bindings": [ { "authLevel": "function", "name": "req", "type": "httpTrigger", "direction": "in" }, { "name": "$return", "type": "http", "direction": "out" } ], "disabled": false }
乔安妮斯,
目前不支持此function,但您可以使用此处所述的函数发布程序集,只需让函数入口点调用程序集中的相应方法:
上述就是C#学习教程:如何将Azure函数的入口点放在.NET DLL中?分享的全部内容,如果对大家有所用处且需要了解更多关于C#学习教程,希望大家多多关注—计算机技术网(www.ctvol.com)!
#r "MyAssembly.dll" public static void Run(/*...args...*/) { MyAssembly.MyMethod(/*..args...*/); }
本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。
ctvol管理联系方式QQ:251552304
本文章地址:https://www.ctvol.com/cdevelopment/986702.html