How to put the entry point of an Azure Function inside a .NET DLL?

前端 未结 2 1154
醉酒成梦
醉酒成梦 2021-02-11 07:57

The Azure Functions samples illustrate how to put the process entry point within a C# script file .csx. However, how can I achieve the behavior with a regular C# li

2条回答
  •  太阳男子
    2021-02-11 08:07

    Joannes,

    This is not currently supported, but you can publish your assembly with your function as described here and just have your function entry point call the appropriate method in your assembly:

    #r "MyAssembly.dll"
    
    public static void Run(/*...args...*/)
    {
        MyAssembly.MyMethod(/*..args...*/);
    }
    

提交回复
热议问题